Here’s a markdown documentation draft for your publication:
This project explores the creation of an AI-powered chatbot tailored for universities, leveraging Retrieval-Augmented Generation (RAG) techniques. The chatbot integrates advanced language models and semantic search to provide accurate, contextually relevant answers to user queries. It is specifically designed to support tasks such as answering university-related FAQs, assisting with educational content, and streamlining administrative interactions.
Modern educational institutions require efficient tools to manage communication and address user queries. Our chatbot combines semantic search with generative AI to provide precise answers, sourced from university-specific datasets, using a robust backend powered by PostgreSQL with pgvector.
The system consists of the following components:
Sentence Embedding Model:
all-MiniLM-L6-v2
from Hugging Face.Language Model:
llama-3.3-70b-versatile
accessed via Groq API.from sentence_transformers import SentenceTransformer model = SentenceTransformer('all-MiniLM-L6-v2') embedding = model.encode("Sample question")
The backend is built using Flask, enabling efficient communication with the database and external APIs. It integrates the following key functionalities:
Embedding Similarity Search:
Retrieves top-n similar questions based on vector similarity.
Response Generation:
Combines the retrieved context with a user query to generate responses.
SELECT sr_no, topic_id, question, 1 - (embedding <=> %s::VECTOR) AS similarity FROM questions ORDER BY similarity DESC LIMIT %s;
Challenge: Data Collection.
Challenge: Efficiently handling user feedback.
This project demonstrates how RAG techniques can enhance chatbot performance in educational settings. By integrating semantic search and generative AI, the chatbot provides contextually relevant responses, improving user satisfaction and engagement.
Suggested Links:
- GitHub Repository for source code.
- Documentation for pgvector.