How kvkrpm/chatty-llama-ai-document-intelligence-system works
This is an offline, multimodal PDF question-answering application. The main workflow is: a user uploads a report, the Streamlit app extracts text, tables, and image OCR, chunks the resulting documents, builds a searchable index, then retrieves context for a local LLM answer. The app also provides raw-page inspection, retrieved-chunk debugging, supporting images, and sample-query evaluation. A CLI offers a text-only indexing and retrieval path. Edges reflect calls shown in excerpts or explicit README claims; unsampled details are not inferred.
Main entry points: streamlit_app.py Streamlit App · rag_retriever.py RAG Retriever · main.py CLI Pipeline · ollama_llm.py Local LLM Client
Components 12
User Interfaces
- Streamlit App
app/streamlit_app.py - CLI Pipeline
main.py
PDF Ingestion
- Text Extraction
ingestion/text_parser.py - Table Extraction
ingestion/table_parser.py - Image OCR
ingestion/image_ocr.py - Document Chunking
utils/chunker.py
Search and Indexing
- RAG Retriever
retriever/rag_retriever.py - Text Embedder
embeddings/multi_modal_embedder.py - FAISS Index
vectorstore/faiss_store.py
Answer Generation
- Local LLM Client
llm/ollama_llm.py - Ollama Runtime
Other components
- User
Connections 13
- User → Streamlit App: uploads report, asks
README.md - User → CLI Pipeline: enters query
main.py - Streamlit App → Text Extraction: extracts text
app/streamlit_app.py - Streamlit App → Table Extraction: extracts tables
app/streamlit_app.py - Streamlit App → Image OCR: extracts OCR
app/streamlit_app.py - Streamlit App → Document Chunking: chunks documents
app/streamlit_app.py - Streamlit App → RAG Retriever: builds, queries
app/streamlit_app.py - Streamlit App → Local LLM Client: requests answers
app/streamlit_app.py - CLI Pipeline → Text Extraction: extracts text
main.py - CLI Pipeline → RAG Retriever: builds, queries
main.py - RAG Retriever → Text Embedder: embeds text
retriever/rag_retriever.py - RAG Retriever → FAISS Index: indexes, searches
retriever/rag_retriever.py - Local LLM Client → Ollama Runtime: sends chat prompt
llm/ollama_llm.py