How brianmarulanda/ai-document-assistant-rag works
This is a local RAG document assistant. Its main workflow ingests a PDF, splits it into chunks, embeds and persists them, then accepts questions, retrieves relevant chunks, and generates answers with a local Ollama model. Users can query through the Streamlit chat interface or a command-line sample; the UI also displays source excerpts. The graph focuses on runtime modules shown in the excerpts. The README documents the local model and storage choices; no separate source for those services is present in the tree.
Main entry points: query_engine.py RAG query engine · run_ingest.py Ingestion runner · store.py Vector store manager · app.py Streamlit chat
Components 11
Document ingestion
- Ingestion runner
run_ingest.py - PDF loader and splitter
src/ingester/loader.py - Vector store manager
src/vectorstore/store.py
Query and answers
- RAG query engine
src/retriever/query_engine.py
User interfaces
- Streamlit chat
app.py - CLI query runner
run_query.py
Local services
- Embedding model
- Persistent Chroma store
- Ollama LLM
Other components
- User
- Input PDF
Connections 13
- User → Ingestion runner: starts ingestion
README.md - Ingestion runner → PDF loader and splitter: loads and splits
run_ingest.py - Input PDF → PDF loader and splitter: provides PDF
- Ingestion runner → Vector store manager: indexes chunks
run_ingest.py - Vector store manager → Embedding model: embeds chunks
src/vectorstore/store.py - Vector store manager → Persistent Chroma store: persists vectors
src/vectorstore/store.py - User → Streamlit chat: asks questions
README.md - User → CLI query runner: runs sample query
README.md - Streamlit chat → RAG query engine: submits question
app.py - CLI query runner → RAG query engine: submits question
run_query.py - RAG query engine → Embedding model: embeds query
src/retriever/query_engine.py - RAG query engine → Persistent Chroma store: retrieves chunks
src/retriever/query_engine.py - RAG query engine → Ollama LLM: generates answer
src/retriever/query_engine.py