How konulj/pdf-rag-app works
PDF RAG is a local Streamlit application for indexing uploaded PDFs and answering questions with page-level citations. The main workflow runs from upload through PDF extraction, chunking, embedding and persistent indexing; chat queries retrieve relevant chunks, stream a locally generated answer, and display source details. The graph separates ingestion, retrieval, and UI responsibilities while retaining the configuration and local model/store integrations. Relationships are based on the shown source and README; config.py was not sampled, so its internal settings are not expanded.
Main entry points: app.py Streamlit app · indexer.py Index management · retriever.py Query and retrieval · config.py RAG configuration
Components 11
User interface
- Streamlit app
app.py
PDF ingestion
- Index management
rag/indexer.py - PDF extraction
rag/indexer.py - Text chunking
rag/indexer.py - Chunk embeddings
rag/indexer.py
Retrieval and answers
- Query and retrieval
rag/retriever.py - Source extraction
rag/retriever.py
Local services
- RAG configuration
rag/config.py - Persistent vector store
- Ollama models
Other components
- PDF user
Connections 17
- PDF user → Streamlit app: uploads and asks
README.md - Streamlit app → Index management: indexes PDFs
app.py - Index management → RAG configuration: reads settings
rag/indexer.py - Index management → PDF extraction: loads PDF
rag/indexer.py - Index management → Text chunking: chunks text
rag/indexer.py - Index management → Chunk embeddings: embeds chunks
README.md - Index management → Persistent vector store: persists index
rag/indexer.py - Streamlit app → Index management: loads index
app.py - Streamlit app → Query and retrieval: queries index
app.py - Query and retrieval → RAG configuration: reads top-k
rag/retriever.py - Query and retrieval → Persistent vector store: retrieves chunks
README.md - Query and retrieval → Ollama models: generates answer
README.md - Streamlit app → Source extraction: extracts sources
app.py - Source extraction → Streamlit app: returns citations
app.py - Streamlit app → PDF user: streams answer
app.py - Streamlit app → PDF user: shows citations
app.py - Chunk embeddings → Ollama models: embeds locally
README.md