Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Chatbot-SIH (Chandigarh University CampusBot)

An AI-powered Campus Assistant that answers student queries about fees, eligibility, scholarships, and courses at Chandigarh University.

Built with a hybrid AI pipeline:

  • 📊 CSV → fee structures (100% accurate, no hallucinations)
  • 📝 YAML → rules, scholarships, eligibility, specializations
  • 📑 TXT (narratives) → About Us, course descriptions (via RAG)
  • 🤖 Local LLM (KunoRZN - Llama-3-3B) → natural language rephrasing & narratives
  • 🎤 Speech support → ASR (speech-to-text) and TTS (text-to-speech)

🚀 Features

  • ✅ Hybrid Intent Detection (rules + fuzzy matching + AI fallback) → understands typos/Hinglish (“BA fers” → “BA fees”)
  • ✅ Structured + AI combo → CSV/YAML for accuracy, LLM for fluency
  • ✅ CU-lock → answers strictly about Chandigarh University
  • ✅ Speech-enabled → supports both voice input/output
  • ✅ Runs fully offline with llama.cpp (no API costs)

📂 Project Structure

chatbot-sih/
│── src_deepgram/
│   ├── asr_deepgram.py        # Speech-to-text
│   ├── chatbot_deepgram.py    # Main chatbot interface
│   ├── ingest.py              # Build embeddings index
│   ├── query_router.py        # Hybrid router (CSV, YAML, RAG)
│   ├── rag.py                 # Narrative RAG (CU-only)
│   ├── tts_gtts.py            # Text-to-speech
│
│── src_llm/
│   ├── llm_local.py           # Local Llama (Kuno) for rephrasing
│
│── data/
│   ├── csv/                   # Fee tables
│   ├── yaml/                  # Scholarships, eligibility
│   ├── narrative/             # About Us, course descriptions
│   ├── chroma/                # Vector DB (auto-generated, ignore)
│
│── models/
│   ├── KunoRZN-Llama-3-3B.Q5_K_M.gguf   # Local model (download separately)
│
│── requirements.txt
│── README.md

⚙️ Installation 1️⃣ Clone the Repository

git clone https://github.com/DarkBytezz/chatbot-sih.git
cd chatbot-sih

2️⃣ Create Virtual Environment

python -m venv venv
venv\Scripts\activate      # (Windows)
# OR
source venv/bin/activate   # (Linux/Mac)

3️⃣ Install Dependencies

pip install -r requirements.txt

Install any library yourself which is not mentioned in requirements.txt

🦙 Download Kuno Model (Required) The chatbot uses a local Llama model via llama.cpp.

Download the model file: 👉 KunoRZN-Llama-3-3B.Q5_K_M.gguf

Place it inside the models/ folder:

chatbot-sih/models/KunoRZN-Llama-3-3B.Q5_K_M.gguf

▶️ Usage

1️⃣ Build Index for Narratives (only once)

python -m src_deepgram.ingest

2️⃣ Run the Chatbot (Text Mode)

python -m src_deepgram.query_router

📌 Example:

❓ BA fees?
🤖 📊 Fee structure for BA:

| Course | Specialization | Fee per Year      | Duration | Total Fee         | Exam Fee | Security Fee |
|--------|----------------|-------------------|----------|------------------|----------|--------------|
| BA     | English        | 70,000-85,000 INR | 3 years  | 2.1-2.55 lakh INR | 2500 INR | 2000 INR     |

3️⃣ Run the Chatbot (Voice Mode)

python -m src_deepgram.chatbot_deepgram

👉 Press Enter → Speak your query 👉 Bot replies with voice + text

🧠 How It Works Query Router → decides whether query is about fees (CSV), rules (YAML), or general info (RAG)

Fuzzy Intent Detection → handles typos & Hinglish (“mca feez”, “kharcha kitna”)

Structured Data → CSV/YAML answers shown exactly, no hallucinations

LLM (Kuno) → rephrases RAG/narratives into natural language

CU-lock → answers restricted to Chandigarh University only

📌 Example Queries

BA fees
MCA Data Science fees
eligibility for MCA
scholarship info for BA
specializations under BCA
about Chandigarh University
when does registration close for MCA?

🤝 Contributing Fork the repo

Create a branch → git checkout -b feature-x

Commit → git commit -m "Added feature x"

Push → git push origin feature-x

Open a Pull Request 🚀

⚠️ Notes ❌ Do NOT push model files → keep them in /models (too big for GitHub)

❌ data/chroma/ is auto-generated → safe to ignore (can rebuild with ingest.py)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages