AI Support Chatbot
This example demonstrates how to build a production-grade customer support widget that can answer questions based on your own knowledge base (FAQ, documentation, etc.) using Retrieval-Augmented Generation (RAG).
Architecture
The application follows a simple client-server flow (or direct client-SDK in this demo) where user questions are processed through Jabrod’s RAG pipeline.SDK Implementation
This example relies on three key Jabrod SDK features: Knowledge Bases, Chat Builder, and Streaming.1. Creating the Knowledge Base
First, we ingest the FAQ data. The SDK handles chunking and embedding automatically.2. The Chat Loop
We use thechatBuilder pattern to construct a conversational pipeline. This allows us to inject system prompts and bind the knowledge base.
3. Handling the Stream
The SDK returns an async iterator that yields chunks of the response as they are generated, providing a snappy user experience.View Source Code
The complete source code is available on GitHub. It includes the HTML/CSS for the chat widget and the full JavaScript logic.View on GitHub
Check out the full implementation of ex1-support-bot