This is my final year project, a Intelligent Course Consultation System. The Intelligent Course Consultation System is a university website demo enhanced with an AI-powered chatbot. Built using the Retrieval-Augmented Generation (RAG) technique, the system provides students with the latest course information and personalized recommendations based on their interests and qualifications. This project aims to streamline course selection and improve accessibility to academic resources.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
The project uses RAG to provide accurate course information responses. Here's how to set up the RAG component:
-
Install required packages:
pip install langchain-google-genai langchain faiss-cpu python-dotenv
-
Set up environment variables in
.env:GEMINI_API_TOKEN=your_gemini_api_key LANGCHAIN_API_KEY=your_langchain_api_key
The RAG system consists of three main files:
createvdb.py- Creates the vector database from course datachatbot.py- Implements the RAG-powered chatbotapp.py- FastAPI server for handling chat requests
-
Prepare the Course Data
- Place your course information in
courses.csv - CSV should contain columns: course_name, category, level, description, etc.
- Place your course information in
-
Create Vector Database
python RAG/createvdb.py
This will:
- Load course data from CSV
- Split content into chunks
- Create embeddings using Google's Generative AI
- Save vector database locally as "course_vdb"
-
Start the Chat Server
python RAG/app.py
The server will run on
http://localhost:8000
┌─────────────────┐
│ courses.csv │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Vector DB │
│ (FAISS) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Chatbot │
│ (Gemini AI) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ FastAPI │
│ Server │
└─────────────────┘
- Framework: Next.js 14 (React)
- Runtime & Package Manager:
- Bun (for fast JavaScript runtime and package management)
- npm (alternative package manager)
- Styling:
- Tailwind CSS
- CSS Modules
- UI Components:
- shadcn/ui (Re-usable components built on Radix UI)
- Radix UI (Headless UI primitives)
- Custom components
- State Management:
- React Hooks
- Context API
- Type Safety: TypeScript
- API Server: FastAPI
- AI/ML:
- LangChain for RAG implementation
- Google Gemini Pro for text generation
- FAISS for vector storage
- Python Libraries:
- langchain-google-genai
- python-dotenv
- uvicorn
- Vector Database: FAISS
- Embeddings: Google Generative AI Embeddings
- LLM: Gemini-1.5-pro
- Framework: LangChain
- Version Control: Git
- Package Manager:
- npm (Frontend)
- pip (Backend)
- Editor: VS Code
- API Testing: Postman
- Development: Local development server
- Environment: Python 3.8+, Node.js 18+