How shrirang45/documind-ai works
DocuMind AI is a local PDF question-answering application. Its main workflow runs from PDF upload and ingestion through extraction, chunking, embedding, and ChromaDB storage; questions then pass through safety checks, document retrieval, and context-based answer generation, with answers and source references shown in the chat UI. The graph also includes documented chat history and multiple-chat support. Some source excerpts omit implementation details, so those relationships are cited to the README rather than presented as inspected code.
Main entry points: app.py Streamlit App · rag.py Retrieval Agent · data_ingestion.py PDF Extraction
Components 16
Chat Interface
- Streamlit App
app.py - Chat Sessions
app.py - PDF Upload
app.py - Source References
app.py - Contextual Answer
app.py
Document Ingestion
- PDF Extraction
src/data_ingestion.py - Text Chunking
src/data_ingestion.py - Embeddings
src/data_ingestion.py
RAG Answering
- Semantic Retrieval
src/rag.py - Query Safety
src/rag.py - Retrieval Agent
src/rag.py - Answer Agent
src/rag.py
Local Data & Models
- Chat History
app.py - ChromaDB Store
src/data_ingestion.py - Ollama Mistral
Other components
- User
Connections 17
- User → Streamlit App: uses
README.md - Streamlit App → PDF Upload: accepts PDFs
README.md - Streamlit App → Chat Sessions: manages chats
app.py - Chat Sessions → Chat History: saves history
README.md - Streamlit App → PDF Extraction: starts ingestion
README.md - PDF Extraction → Text Chunking: splits text
README.md - Text Chunking → Embeddings: generates vectors
README.md - Embeddings → ChromaDB Store: stores vectors
README.md - Streamlit App → Semantic Retrieval: initializes
app.py - Streamlit App → Query Safety: submits query
app.py - Query Safety → Retrieval Agent: continues workflow
src/rag.py - Retrieval Agent → Semantic Retrieval: requests evidence
src/rag.py - Semantic Retrieval → ChromaDB Store: searches chunks
README.md - Retrieval Agent → Answer Agent: passes evidence
src/rag.py - Answer Agent → Ollama Mistral: generates answer
README.md - Streamlit App → Source References: shows references
README.md - Streamlit App → Contextual Answer: displays answer
README.md