CoolFace
Apppublic

krishna0506/Document_Intelligence

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
README.md126 linesDownload Raw Back to root
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.