The Personal RAG Chatbot is a Retrieval-Augmented Generation (RAG) AI chatbot integrated into my portfolio site. It is designed to answer questions about my professional experience, projects, skills, and hobbies, offering an interactive way for visitors (including recruiters) to learn more about me.
By leveraging Cohere's language model and a retrieval-based system, this chatbot dynamically retrieves relevant information from my personal knowledge base to provide accurate, real-time answers.
Dynamic Question-Answering: Responds to queries about my work experience, projects, and hobbies using retrieval-augmented generation.
Context-Aware Responses: Retrieves relevant data from a vector database to generate precise, context-specific answers.
Up-to-Date Knowledge: The retrieval system allows for easy updates, ensuring the chatbot reflects the latest information about my skills and projects.
The system consists of the following components:
A React-based portfolio site that provides the user interface.
-
FastAPI: Serves as the API backend for the chatbot.
-
Cohere: Used for generating responses based on retrieved data.
-
Vector Database (e.g., Pinecone/Supabase/FAISS): Stores embeddings of my personal data for efficient retrieval.
-
Embeddings are created using Cohere's embedding model.
-
User queries are processed to retrieve the most relevant information from the vector database.
-
The retrieved context is combined with the user query and passed to Cohere's language model for response generation.
Frontend: React, TypeScript
Backend: FastAPI (Python)
NLP & Embeddings: Cohere API
Database: Supabase (PostgreSQL) / Pinecone / FAISS (for vector search)
Deployment: Vercel (Frontend), Docker (Backend)
git clone https://github.com/yourusername/personal-rag-chatbot.git
cd personal-rag-chatbot
Create a .env
file and add your Cohere API key and database credentials.
(Refer to .env.example
file)
COHERE_API_KEY=<API Key Here>
cd backend/
pip install -r requirements.txt
fastapi dev main.py
cd chatbot-ui/
npm install
npm run dev
Go to http://localhost:5173 to see frontend
-
"Tell me about your experience at TD"
-
"What projects have you worked on related to full-stack development?"
-
"What are your hobbies outside of software engineering?"
-
Improved Contextual Understanding: Enhance retrieval with more granular context to improve the quality of answers.
-
User Feedback Loop: Incorporate a feedback mechanism to learn from user interactions and improve responses.
-
Enhanced Knowledge Base: Expand the dataset with more detailed information about recent projects and skills.