Documentation

Chat

  • Getting Started
  • Installation
  • Core Concepts
  • Escalation System
  • Widget Keys
  • Secret Keys (sk_)
  • REST API
  • Channels & Integrations
  • Messaging Platform API

Voice

  • Voice Agent
  • Setup Guide
  • Phone Numbers
  • Outbound Campaigns

Platform

  • Billing & Pricing
  • Glossary
  • FAQ

RAG (Retrieval-Augmented Generation)

AI & ML

A technique where the AI retrieves relevant documents from your knowledge base before generating a response, ensuring answers are grounded in your data.

Retrieval-Augmented Generation (RAG) is the technique that grounds your AI's responses in your actual data. Instead of making things up, the AI retrieves relevant information from your knowledge base before answering.


How RAG works
User question

→

Search KB

→

Retrieve chunks

→

Inject context

→

LLM generates
Without RAG

"I think the check-in time is around 2pm..." (hallucinated)

With RAG

"Check-in is at 3pm and check-out is at 11am." (from your docs)


Search methods
  • BM25 (voice) — Fast keyword search (~50-200ms). Used for voice calls where latency matters.

  • Hybrid (chat) — BM25 + vector similarity. More accurate but slower (~1-2s with embedding).


Knowledge base sources
  • File uploads (PDF, DOCX, TXT, Markdown)

  • Web page crawling (automatic scraping)

  • Manual content entry

Ready to transform your customer experience?

Join businesses already using Sampan to serve customers 24/7 and boost revenue with AI.

sampan.club

AI-powered customer service for businesses.

SAMPAN TECH
202603046389 (003825593-A)

Product

© 2026 SAMPAN TECH, trading as Sampan Club (sampan.club). All rights reserved.