A Context-Bound QA System that answers student questions only based on uploaded academic notes. It uses RAG (Retrieval Augmented Generation) to ensure grounded answers and strict hallucination control.
- Text Chunking: Splits large academic PDFs into manageable logical chunks.
- Semantic Search: Uses Local Embeddings (
HuggingFace) to find relevant content without API rate limits. - Context-Bound AI: Answering engine (
Llama-3via Groq) is strictly prompted to admit ignorance if data is missing. - Hallucination Control: Returns "Information not available in the notes" for out-of-scope questions.
- Source Attribution: Cites the specific page number and file name for every answer.
- Backend: Flask (Python)
- Vector DB: ChromaDB (Persistent storage)
- LLM: Llama-3.3-70b (via Groq)
- Embeddings: all-MiniLM-L6-v2 (HuggingFace)
- Framework: LangChain
-
Clone the Repository
git clone <your-repo-url> cd academic-notes-ai
-
Install Dependencies
pip install -r requirements.txt
-
Setup Environment Variables Create a
.envfile in the root directory:GROQ_API_KEY=gsk_your_key_here...
-
Run the Server
python app.py
Uploads a PDF or Text file to the knowledge base.
- Body:
form-data-> key:files(File)
Asks a question based on the uploaded notes.
- Body:
raw JSON{ "question": "What is the definition of mitosis?" }