krishna0506/Document_Intelligence
0
1---2title: Document Intelligence3emoji: ๐ค4colorFrom: blue5colorTo: purple6sdk: docker7app_port: 78608pinned: false9---10 11# Document Intelligence RAG System12 13A Retrieval-Augmented Generation (RAG) based document question-answering14system built using FastAPI, LangChain, ChromaDB, and Groq LLM.15 16This project allows users to ingest documents, create embeddings,17retrieve relevant context, and generate AI-powered answers.18 19------------------------------------------------------------20 21## Features22 23- Document ingestion and chunking24- Vector embeddings using ChromaDB25- Semantic search and retrieval26- LLM-based answer generation27- FastAPI REST API28- Modular project structure29 30------------------------------------------------------------31 32## Project Structure33 34document_intelligence/35โ36โโโ app/37โ โโโ api.py38โ โโโ chunking.py39โ โโโ embeddings.py40โ โโโ generator.py41โ โโโ guardrails.py42โ โโโ ingest.py43โ โโโ main.py44โ โโโ retriever.py45โ โโโ schemas.py46โ โโโ vector_store.py47โ48โโโ data/49โ โโโ client_x_requirements.txt50โ โโโ screening_checklist_python.txt51โ โโโ compliance_policy.txt52โ โโโ rate_card_2026.txt53โ โโโ placement_checklist.txt54โ55โโโ requirements.txt56โโโ README.md57 58------------------------------------------------------------59 60## Setup Instructions61 62### 1. Create Virtual Environment63 64Windows:65python -m venv .venv66.venv\Scripts\activate67 68Mac/Linux:69python -m venv .venv70source .venv/bin/activate71 72------------------------------------------------------------73 74### 2. Install Dependencies75 76pip install -r requirements.txt77 78------------------------------------------------------------79 80### 3. Environment Variables81 82Create a file named `.env` in the project root:83 84GROQ_API_KEY=your_api_key_here85 86------------------------------------------------------------87 88### 4. Run the Application89 90uvicorn document_intelligence.app.main:app --reload91 92Open in browser:93http://127.0.0.1:8000/docs94 95------------------------------------------------------------96 97## How It Works98 991. Add documents to the data/ folder.1002. Run ingestion to create embeddings.1013. Ask questions through API endpoints.1024. The system retrieves relevant content and generates answers.103 104------------------------------------------------------------105 106## Technologies107 108- Python109- FastAPI110- LangChain111- ChromaDB112- Groq LLM113 114------------------------------------------------------------115 116## Notes117 118- Keep documents organized inside the data folder.119- Update paths in ingest.py if you change folder structure.120- Store API keys securely using .env file.121 122------------------------------------------------------------123 124## License125 126Educational and internal project use.