Spaces:
Runtime error
Runtime error
skrYugadharshini commited on
Commit Β·
a55e1ea
1
Parent(s): 71a1180
Update README with full technical documentation
Browse files
README.md
CHANGED
|
@@ -17,6 +17,87 @@ An intelligent document assistant powered by RAG, LangChain, Groq LLaMA 3, and F
|
|
| 17 |
- Get accurate answers powered by LLaMA 3
|
| 18 |
- Chat history support
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## π οΈ Built With
|
| 21 |
- LangChain
|
| 22 |
- Groq (LLaMA 3)
|
|
@@ -28,4 +109,21 @@ An intelligent document assistant powered by RAG, LangChain, Groq LLaMA 3, and F
|
|
| 28 |
1. Clone the repo
|
| 29 |
2. Install dependencies: `pip install -r requirements.txt`
|
| 30 |
3. Add your Groq API key in `.env`
|
| 31 |
-
4. Run: `streamlit run app.py`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
- Get accurate answers powered by LLaMA 3
|
| 18 |
- Chat history support
|
| 19 |
|
| 20 |
+
---
|
| 21 |
+
title: DocuMind-AI
|
| 22 |
+
emoji: π
|
| 23 |
+
colorFrom: blue
|
| 24 |
+
colorTo: purple
|
| 25 |
+
sdk: docker
|
| 26 |
+
pinned: false
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
# π DocuMind-AI β Intelligent Document Assistant
|
| 30 |
+
|
| 31 |
+
An enterprise-grade RAG (Retrieval Augmented Generation) chatbot that allows users to upload any PDF and interact with it using natural language. Built with LangChain, Groq LLaMA 3, FAISS, and Streamlit.
|
| 32 |
+
|
| 33 |
+
π Live Demo: [huggingface.co/spaces/Yugadharshini/DocuMind-AI](https://huggingface.co/spaces/Yugadharshini/DocuMind-AI)
|
| 34 |
+
π GitHub: [github.com/skrYugadharshini/DocuMind-AI](https://github.com/skrYugadharshini/DocuMind-AI)
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## π Features
|
| 39 |
+
|
| 40 |
+
- Upload any PDF document
|
| 41 |
+
- Ask questions in natural language
|
| 42 |
+
- Semantic search using FAISS vector store
|
| 43 |
+
- Fast and accurate answers powered by Groq LLaMA 3
|
| 44 |
+
- Chat history support
|
| 45 |
+
- Clean and intuitive Streamlit UI
|
| 46 |
+
- Deployed on Hugging Face Spaces using Docker
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## π οΈ Tech Stack
|
| 51 |
+
|
| 52 |
+
| Technology | Purpose |
|
| 53 |
+
|---|---|
|
| 54 |
+
| Python | Core programming language |
|
| 55 |
+
| LangChain | LLM orchestration framework |
|
| 56 |
+
| Groq LLaMA 3 | Large Language Model for answer generation |
|
| 57 |
+
| FAISS | Vector store for semantic search |
|
| 58 |
+
| HuggingFace Sentence Transformers | Text embeddings (all-MiniLM-L6-v2) |
|
| 59 |
+
| Streamlit | Frontend UI |
|
| 60 |
+
| PyPDF | PDF loading and parsing |
|
| 61 |
+
| Docker | Containerization for deployment |
|
| 62 |
+
| Hugging Face Spaces | Cloud deployment |
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
## βοΈ Full Technical Process
|
| 67 |
+
|
| 68 |
+
### Step 1 β PDF Loading
|
| 69 |
+
- User uploads any PDF through the Streamlit UI
|
| 70 |
+
- PyPDF loads and extracts text from all pages
|
| 71 |
+
|
| 72 |
+
### Step 2 β Text Chunking
|
| 73 |
+
- Document split into chunks of 500 characters
|
| 74 |
+
- 50 character overlap between chunks to preserve context
|
| 75 |
+
- Uses LangChain RecursiveCharacterTextSplitter
|
| 76 |
+
|
| 77 |
+
### Step 3 β Vector Embeddings
|
| 78 |
+
- Each chunk converted to a 384-dimensional vector
|
| 79 |
+
- Uses HuggingFace sentence-transformers (all-MiniLM-L6-v2)
|
| 80 |
+
- Captures semantic meaning of text
|
| 81 |
+
|
| 82 |
+
### Step 4 β Vector Store
|
| 83 |
+
- All vectors stored in FAISS index
|
| 84 |
+
- Enables fast similarity search across all chunks
|
| 85 |
+
- Finds most relevant chunks for any question
|
| 86 |
+
|
| 87 |
+
### Step 5 β RAG Chain
|
| 88 |
+
- User asks a question
|
| 89 |
+
- Question converted to vector
|
| 90 |
+
- FAISS retrieves top 4 most relevant chunks
|
| 91 |
+
- Chunks + question sent to Groq LLaMA 3
|
| 92 |
+
- LLaMA 3 generates accurate answer based on context
|
| 93 |
+
|
| 94 |
+
### Step 6 β Response
|
| 95 |
+
- Answer displayed in Streamlit chat UI
|
| 96 |
+
- Chat history maintained during session
|
| 97 |
+
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
|
| 101 |
## π οΈ Built With
|
| 102 |
- LangChain
|
| 103 |
- Groq (LLaMA 3)
|
|
|
|
| 109 |
1. Clone the repo
|
| 110 |
2. Install dependencies: `pip install -r requirements.txt`
|
| 111 |
3. Add your Groq API key in `.env`
|
| 112 |
+
4. Run: `streamlit run app.py`
|
| 113 |
+
|
| 114 |
+
## π― Future Improvements
|
| 115 |
+
|
| 116 |
+
- Add chat history memory across sessions
|
| 117 |
+
- Support multiple PDF uploads
|
| 118 |
+
- Highlight source chunks in the PDF
|
| 119 |
+
- Add support for other document types (DOCX, TXT)
|
| 120 |
+
- Fine-tune chunk size for better accuracy
|
| 121 |
+
- Add user authentication
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## π©βπ» Author
|
| 126 |
+
|
| 127 |
+
**Yugadharshini**
|
| 128 |
+
- GitHub: [@skrYugadharshini](https://github.com/skrYugadharshini)
|
| 129 |
+
- Hugging Face: [@Yugadharshini](https://huggingface.co/Yugadharshini)
|