Project Overview
An intelligent chatbot assistant built with Retrieval-Augmented Generation (RAG) that helps recruiters and visitors learn about my background, experience, and projects. The chatbot uses vector embeddings to find relevant context from my portfolio and generates accurate, context-aware responses.
Key Features
Vector Search RAG
Uses OpenAI embeddings with cosine similarity to find the most relevant portfolio information for each question, ensuring accurate and contextual responses.
Knowledge Base
Structured portfolio content organized into 20+ knowledge entries covering experience, skills, projects, and education for comprehensive coverage.
Real-Time Streaming
Streams responses in real-time using the Vercel AI SDK for a responsive, ChatGPT-like user experience with immediate feedback.
Intelligent Context
Dynamically retrieves top 3 most relevant knowledge entries for each query using vector similarity, providing precise answers without hallucination.
Technical Implementation
Architecture
The chatbot implements a RAG (Retrieval-Augmented Generation) pattern:
- User submits a question through the chat interface
- Question is converted to a vector embedding using OpenAI's text-embedding-3-small model
- Cosine similarity compares the question against all knowledge base entries
- Top 3 most relevant entries are retrieved as context
- GPT-4o-mini generates a response using the retrieved context
- Response streams back to the user in real-time
Technologies Used
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS
- AI/ML: OpenAI GPT-4o-mini, text-embedding-3-small, Vercel AI SDK v3
- Vector Search: Custom cosine similarity implementation
- Deployment: Vercel with Edge Runtime support
Cost Optimization
Uses GPT-4o-mini instead of GPT-4 for cost-effective responses (~$0.001-0.003 per conversation). Text embeddings cost approximately $0.0001 per query. Total monthly cost for 100-200 conversations: $1-2.
Try the Chatbot
Click the chat button in the bottom-right corner to start asking questions about my background, experience, skills, and projects.
Suggested questions: "What is Charles' experience with Azure?", "Tell me about the AI/ML projects", or "What technologies does Charles work with?"
Disclaimer
This AI assistant uses information from my portfolio but may not reflect my exact words or opinions. AI responses can occasionally be inaccurate or incomplete. For important inquiries, please contact me directly.