Skip to content

An intelligent chatbot that allows users to upload text-based Ayurveda PDFs and ask questions based on the content using RAG (Retrieval-Augmented Generation) combining semantic search and LLM-based responses.

Notifications You must be signed in to change notification settings

VaidehiShyara14/Ayurveda-PDF-Q-A-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

🌿 Ayurveda Q/A Chatbot

An intelligent chatbot that allows users to upload text-based Ayurveda PDFs and ask questions based on the content using RAG (Retrieval-Augmented Generation) combining semantic search and LLM-based responses.

Features

  • Upload Ayurveda PDFs (text-based only)
  • Ask natural-language questions based on uploaded content
  • Chunk text smartly using LangChain
  • Semantic search with MiniLM embeddings
  • Fast retrieval using FAISS
  • Powered by LLaMA 3 via Groq API
  • Based on the RAG architecture (Retrieval-Augmented Generation)
  • Easy-to-use interface via Streamlit

Tech Stack

Component Technology
Frontend Streamlit
Backend FastAPI
Embeddings HuggingFace MiniLM-L6-v2
Vector Search FAISS
Language Model LLaMA 3 via Groq API
PDF Processing PyMuPDF + LangChain
Prompting LangChain + Custom PromptTemplate
Environment Var python-dotenv

How It Works (RAG Workflow)

  1. Upload: User uploads a text-based PDF
  2. Text Extraction: PDF is read using PyMuPDF
  3. Chunking: Text is broken into smaller pieces using RecursiveCharacterTextSplitter
  4. Embedding: Chunks are embedded using HuggingFace MiniLM
  5. Vector DB: Chunks are stored in a FAISS vector store
  6. Q&A:Question → Similar chunks retrieved Chunks + Question → sent to LLaMA 3 LLM generates a final context-based answer This is a Retrieval-Augmented Generation (RAG) system.

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/yourusername/ayurveda-chatbot.git
cd ayurveda-chatbot

2. Create a Virtual Environment

python -m venv ayurveda_env
ayurveda_env\Scripts\activate  

3. Install Dependencies

pip install -r requirements.txt

4. Add Your .env File

Create a .env file with your Groq key:

GROQ_API_KEY=your_groq_api_key

5. Run the Backend

python app.py

6. Run the Streamlit Frontend

streamlit run streamlit_app.py

About

An intelligent chatbot that allows users to upload text-based Ayurveda PDFs and ask questions based on the content using RAG (Retrieval-Augmented Generation) combining semantic search and LLM-based responses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages