DocsMind is a simple document chat app. You upload documents, index them, and then ask questions about the uploaded content.
The app uses:
- Streamlit for the web interface
- LangChain for the RAG pipeline
- ChromaDB for storing document embeddings
- Ollama for local embeddings and chat responses
- Upload PDF, TXT, and DOCX files
- Split documents into smaller chunks
- Store document chunks in a local Chroma vector database
- Ask questions in a chat interface
- See the source text used to answer each question
- Keep short chat history during the session
app.py- Streamlit user interfacepipeline.py- document loading, chunking, retrieval, and answer generationrequirements.txt- Python packages needed to run the appchroma_db/- local vector database created by Chroma
You need Python and Ollama installed on your machine.
Install and start Ollama, then pull the models used by the project:
ollama pull nomic-embed-text
ollama pull qwen3.5:0.8bIf you want to use another Ollama chat model, change the llm_model value in pipeline.py.
Create a virtual environment:
python -m venv .venvActivate it on Windows:
.venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtRun the app:
streamlit run app.pyThen open the local Streamlit link in your browser.
- Upload one or more PDF, TXT, or DOCX files.
- Click
Index Documents. - Wait until the documents are processed.
- Ask a question in the chat box.
- Open
Sourcesif you want to see the text used for the answer.
DocsMind loads the uploaded files and converts them into text documents. It splits the text into chunks, creates embeddings with Ollama, and stores those chunks in ChromaDB.
When you ask a question, the app searches for the most relevant chunks. Those chunks are sent to the local Ollama chat model, which writes an answer using the retrieved document context.
DocsMind includes an automated LLM-as-a-Judge telemetry suite (evaluate.py) that evaluates RAG accuracy locally without exposing data to external APIs.
- Context Relevance (1–5): Measures whether ChromaDB successfully retrieves the precise context needed for the query.
- Faithfulness (1–5): Evaluates whether the generated response strictly aligns with facts in the source document without hallucinating.
- Guardrail Compliance: Verifies intent routing between document-grounded queries and general conversational interactions.
- Fact Extraction (Operation Searchlight): Relevance
5/5| Faithfulness5/5 - Comparative Retrieval (Political Stability Index): Relevance
5/5| Faithfulness5/5 - Intent Routing / Fallback (Out-of-domain query): Handled via prompt guardrails.
- Ensure your target document is processed in ChromaDB.
- Run the evaluation script:
python evaluate.py
This project is licensed under the MIT License.