Skip to content

CesarPuentes/local-document-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Agent

Personal document Q&A using RAG with Ollama.

Quick Start

# Activate environment
source .venv/bin/activate

# Run with a document
python rag_agent.py document.txt

Usage

# Single file
python rag_agent.py notes.txt

# Multiple files
python rag_agent.py *.txt report.pdf

# PDF support (install first)
pip install pypdf
python rag_agent.py document.pdf

Example Session

📄 Loading documents...
  ✓ antiaging.txt
✓ 22 chunks created
🧠 Creating embeddings...
✓ Ready!

==================================================
RAG Agent - Ask questions about your documents
Type 'quit', 'exit', or 'bye' to stop
==================================================

You: What is this document about?
Agent: This document describes GPT-4b micro, a model for protein engineering...

You: quit
Goodbye!

Requirements

  • Python 3.10+
  • Ollama with qwen2.5:7b model
  • Dependencies: pip install -r requirements.txt

Setup

# 1. Create virtual environment
python -m venv .venv
source .venv/bin/activate

# 2. Install dependencies
pip install -r requirements.txt

# 3. Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# 4. Download model
ollama pull qwen2.5:7b

Features

  • ✅ TXT and PDF support
  • ✅ Conversation memory
  • ✅ Multiple file loading
  • ✅ 100% local (no API keys)

About

Ask questions about your documents using local AI. Built with RAG, LangChain, and Ollama

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors