AI Customer Support with RAG is an intelligent customer service chatbot designed to answer customer inquiries using company-specific knowledge. The system leverages Retrieval-Augmented Generation (RAG) to retrieve relevant information from a knowledge base before generating responses, reducing reliance on the language model's internal knowledge and improving response accuracy
This project was developed to explore how Retrieval-Augmented Generation (RAG) can improve the reliability of AI-powered customer support systems. The goal was to build a chatbot that answers customer questions based only on company knowledge, while reducing hallucinations through prompt engineering, guardrails, and semantic retrieval techniques. In addition to providing accurate responses, the project focuses on building a modular, production-oriented AI pipeline that is easy to maintain, monitor, and extend.
- AI-powered customer support chatbot using Retrieval-Augmented Generation (RAG)
- Semantic search with BAAI/bge-m3 embeddings and ChromaDB
- Custom document chunking for structured company knowledge
- Input and Output Guardrails for safer AI responses
- Prompt engineering to restrict responses to the knowledge base
- Conversation history management with PostgreSQL
- FastAPI backend with Vue.js frontend
Python | Javascript | Vue.js | Uvicorn | FastAPI | FastAPI | LLama (Groq) | PostgreSQL | ChromaDB | Pydantic
Through this project, I gained hands-on experience in designing and implementing an end-to-end Retrieval-Augmented Generation (RAG) system. I learned how to preprocess and chunk knowledge documents, generate vector embeddings, perform semantic retrieval with ChromaDB, and integrate large language models into a production-style application. I also explored prompt engineering, guardrail design, and debugging techniques to improve response reliability and reduce hallucinations. Most importantly, this project strengthened my understanding of AI system architecture and the practical challenges of deploying LLM-based applications.
Loads raw knowledge documents from text files and converts them into a unified document format for further processing in the RAG pipeline.
Preprocesses raw text by removing unnecessary whitespace, formatting inconsistencies, and unwanted characters to improve document quality before chunking.
Splits documents into smaller semantic chunks while preserving their structure and metadata, enabling more accurate retrieval during question answering.
Generates dense vector embeddings for each text chunk using the BAAI/bge-m3 embedding model, allowing semantic similarity search instead of keyword matching.
Stores vector embeddings and metadata for all knowledge chunks, enabling efficient semantic retrieval of the most relevant information based on user queries.
Validates user input before processing by detecting invalid, malicious, or out-of-scope requests to protect the system from prompt injection and unsafe inputs.
Constructs the final prompt by combining the system instructions, retrieved knowledge context, and the user's question before sending it to the language model.
Validates the generated response to ensure it is consistent with the retrieved context and reduces the risk of hallucinated or unsupported information.
Stores conversation history, including user messages and AI responses, to support multi-turn conversations, session management, and future analytics.









