How abhinandan151142/documind-rag-based-faq works
DocuMind is a document-grounded FAQ assistant. A user uploads a UTF-8 .txt file, which the API saves and indexes; the user then asks a question, the API retrieves relevant chunks, requests an answer grounded in those chunks, logs the interaction, and returns the answer with its sources. The UI also shows knowledge status and recent conversation/upload history. The source excerpts support the API, retrieval, model, database, and main UI links shown; other README capabilities are represented where their implementation is not sampled only when the tree supports a path.
Components 16
Web client
- Chat and upload UI
API workflows
- FastAPI routes
- Document upload
- Question answering
- History and status
Retrieval and answers
- RAG index
- Text chunking
- Embedding and search
- Grounded generation
- FAISS or NumPy search
Knowledge and history
- Active text file
- PostgreSQL
- Database operations
Other components
- User
- Groq LLaMA API
- Sentence Transformer
Connections 22
- User → Chat and upload UI: asks or uploads
- Chat and upload UI → FastAPI routes: calls API
- FastAPI routes → Document upload: dispatches upload
- FastAPI routes → Question answering: dispatches question
- FastAPI routes → History and status: serves status and history
- Document upload → RAG index: saves and rebuilds
- RAG index → Active text file: reads active file
- Document upload → Active text file: writes uploaded text
- RAG index → Text chunking: chunks documents
- RAG index → Embedding and search: builds and queries
- Embedding and search → Sentence Transformer: encodes text
- Embedding and search → FAISS or NumPy search: searches vectors
- Question answering → RAG index: retrieves top chunks
- Question answering → Grounded generation: passes question and sources
- Grounded generation → Groq LLaMA API: requests grounded answer
- Groq LLaMA API → Grounded generation: returns answer
- Question answering → Database operations: logs interaction
- Document upload → Database operations: logs document
- History and status → Database operations: fetches records
- Database operations → PostgreSQL: reads and writes
- Question answering → Chat and upload UI: returns answer and sources
- History and status → Chat and upload UI: returns status and history