← All Projects

TwoFour Digital (Product)

AiAssist

RAG-powered knowledge base chatbot with expert training loop

// The Challenge

Support teams spend hours answering the same questions repeatedly, and knowledge base articles go unread. We wanted to build a chatbot that could actually answer questions accurately using existing documentation — not hallucinate — and get smarter over time as subject matter experts correct its responses.

// The Solution

We built a RAG pipeline that syncs knowledge base articles on a schedule, chunks them into ~400-token segments with semantic overlap, and generates vector embeddings using OpenAI's text-embedding-3-large model. When a user asks a question, the system performs cosine similarity search to find relevant context, then generates an answer with GPT-4o — always citing the source articles. The key differentiator is the ground truth system. When an expert reviews a conversation and corrects an answer, that correction is embedded and stored as ground truth. Future queries that match closely (>0.95 similarity) return the expert-verified answer directly, creating a feedback loop that continuously improves accuracy.

// Key Features

01Automatic knowledge base sync (every 3 hours)
02Text chunking with semantic overlap (~400 tokens)
03Vector embeddings via OpenAI text-embedding-3-large
04Semantic similarity search for relevant context
05GPT-4o answer generation with source citations
06Ground truth system for expert-corrected answers
07Admin dashboard with review queue and statistics
08AI Training Mode for subject matter experts
09Conversation logging and audit trail
10Data export capabilities

// Results

RAG pipeline accurately answers questions from existing documentation
Ground truth system improves accuracy over time with expert feedback
Citation tracking ensures every answer is verifiable
Automated KB sync keeps the chatbot current without manual effort

Tech Stack

ReactTypeScriptViteExpress.jsOpenAI API (GPT-4o)OpenAI EmbeddingsDrizzle ORMPostgreSQLFreshdesk APITailwind CSS

Client

TwoFour Digital (Product)

Category

ai

// Let's talk

Ready to build
something real?

Book a free discovery call. No pitch decks, no sales funnels — just a conversation about your project and how we can help.