Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Karweiii/Jarvis

Repository files navigation

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.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open 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.

RAG (Retrieval Augmented Generation) Setup

The project uses RAG to provide accurate course information responses. Here's how to set up the RAG component:

Prerequisites

  1. Install required packages:

    pip install langchain-google-genai langchain faiss-cpu python-dotenv
  2. Set up environment variables in .env:

    GEMINI_API_TOKEN=your_gemini_api_key
    LANGCHAIN_API_KEY=your_langchain_api_key
    

RAG Components

The RAG system consists of three main files:

  1. createvdb.py - Creates the vector database from course data
  2. chatbot.py - Implements the RAG-powered chatbot
  3. app.py - FastAPI server for handling chat requests

Setup Steps

  1. Prepare the Course Data

    • Place your course information in courses.csv
    • CSV should contain columns: course_name, category, level, description, etc.
  2. 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"
  3. Start the Chat Server

    python RAG/app.py

    The server will run on http://localhost:8000

RAG Architecture

┌─────────────────┐
│   courses.csv   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   Vector DB    │
│    (FAISS)     │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│    Chatbot     │
│   (Gemini AI)   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│   FastAPI      │
│    Server      │
└─────────────────┘

Tech Stack

Next.js React TypeScript Tailwind CSS FastAPI Python Node.js Bun shadcn/ui Radix UI

AI/ML

LangChain Google Gemini FAISS

Development

Git VS Code Postman Vercel

Frontend

  • 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

Backend

  • 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

AI Components

  • Vector Database: FAISS
  • Embeddings: Google Generative AI Embeddings
  • LLM: Gemini-1.5-pro
  • Framework: LangChain

Development Tools

  • Version Control: Git
  • Package Manager:
    • npm (Frontend)
    • pip (Backend)
  • Editor: VS Code
  • API Testing: Postman

Infrastructure

  • Development: Local development server
  • Environment: Python 3.8+, Node.js 18+

About

Final Year Project - Intelligent Course Consultation System (RAG Chatbot)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published