Spaces:
Running
license: mit
title: DocuMind
sdk: docker
colorFrom: red
colorTo: indigo
short_description: Enterprise RAG Chatbot
emoji: π
π§ DocuMind: Enterprise RAG Chatbot
DocuMind is a production-ready, highly accurate Enterprise Retrieval-Augmented Generation (RAG) system. It allows organizations to ingest .pdf, .docx, and .txt documents and interact with them securely using a ChatGPT-style interface, completely circumventing LLM hallucinations by enforcing strict source-grounding.
π Key Features
- Multi-Format Document Ingestion: Seamlessly upload APIs and TXTs locally or through the UI drag-and-drop.
- High-Accuracy RAG Pipeline: Combines dense retrieval via ChromaDB (
all-MiniLM-L6-v2) with precision reranking via a CrossEncoder (ms-marco-MiniLM-L-6-v2) to pull only the 3 most strictly relevant context chunks. - Citation-Backed UI: The Streamlit interface displays the exact ReRanker context chunks drawn from the documents, allowing users to verify LLM claims instantly.
- Conversation Memory: Maintains multi-turn context awareness seamlessly using LangChain's conversational buffer memory.
- Enterprise-Ready Middleware: API endpoints are secured with
slowapirate limiting. - Instant Deployment: Fully dockerized with multi-container
docker-composerouting, alongside a unifiedDockerfilefor HuggingFace Space hosting.
π οΈ Tech Stack
- Backend Framework: FastAPI, Uvicorn
- Frontend UI: Streamlit
- RAG Orchestrator: LangChain
- Embeddings & ReRanker: HuggingFace
sentence-transformers - Vector Database: ChromaDB (Local SQLite Persistence)
- Generation LLM: LLaMA-3.1-8B (via Groq API)
π Getting Started Locally
1. Requirements
Ensure you have Docker installed. Clone this repository and execute:
git clone https://your-repo-link/DocuMind.git
cd DocuMind
2. Configure Environment Variables
Create a .env file in the root directory and add your Groq inference key:
GROQ_API_KEY=gsk_YOUR_GROQ_API_KEY_HERE
3. Spin up the Containers
Boot the unified backend, vector store, and frontend seamlessly using Docker Compose:
docker-compose up --build -d
Access the application by navigating to http://localhost:8501 in your browser.
π Deploying to Hugging Face Spaces
This project contains a unified Dockerfile and run.sh script precisely tuned to bypass HF networking permissions and boot the application perfectly.
- Create a New Space on Hugging Face using the Docker SDK (Blank Template).
- Clone your Space, copy the contents of this repository into it, and
git push. - Go to the Settings > Variables and secrets tab of the Space.
- Create a new Secret named
GROQ_API_KEYand provide your token. - Hugging Face will automatically execute the build and render the Streamlit app!
π Security & Model Boundaries
Please review MODEL_CARD.md for detailed descriptions on token chunking logic, LLM fallback behaviors limiting false generation, and privacy constraints.