Skip to content
WebChat AI
HomeFeaturesHow it worksIntegrationsPricingDocs
WebChat AI

Build intelligent AI assistants trained on your website content.

Connect with us

Product

  • Features
  • How it works
  • Integrations
  • Pricing
  • Security

Resources

  • Documentation
  • API reference

Legal

  • Privacy Policy
  • Terms of Service

© 2026 WebChat AI. All rights reserved.

Get Started
OverviewQuickstart
Knowledge sourcesFile uploadsRAG & grounding
EmbedCustomizationConfigurationTesting
ConversationsAnalytics & usage
API referenceSecurityTroubleshooting
Changelog

Ready to launch?

Get Started Free
DocsKnowledgeRAG & Grounding

RAG & Answer Grounding Engine

How WebChat AI transforms visitor questions into grounded, source-backed answers without fabricating unverified information.

What is Retrieval-Augmented Generation (RAG)?

RAG connects general-purpose Large Language Models (LLMs) to your specific documentation. Rather than relying on the LLM's pre-trained memory, WebChat AI searches your indexed knowledge base, retrieves the most relevant passages, and feeds them directly into the context window as authoritative evidence.

What happens when a visitor asks a question?

The 8-stage pipeline executed per user message.

STAGE 1 • SANITIZATION & INJECTION GUARD

Input Validation & Safety Screening

Incoming questions are trimmed, sanitized, and evaluated against common prompt injection patterns. The system rejects abusive payloads before any embedding or generation compute is spent.

STAGE 2 • QUERY REWRITING & MEMORY

Context-Aware Disambiguation

If the user asks a follow-up question (e.g. "How much does it cost?"), the query rewriter uses prior conversation memory to expand pronouns and implicit references into a self-contained search query.

STAGE 3 • HYBRID SEARCH RETRIEVAL

Dual-Path Vector + Lexical Search

WebChat AI retrieves passages using two complementary strategies:

  • Dense Vector Search: Measures cosine similarity against chunk embeddings using the tenant's locked embedding provider.
  • Lexical Frequency Matching: Evaluates token frequency, inverse document frequency (IDF), and passage length normalization.
STAGE 4 • RECIPROCAL RANK FUSION (RRF) & RERANKING

Merging and Reordering Candidate Chunks

Results from vector search and lexical search are merged using Reciprocal Rank Fusion (RRF) and scored with embedding-based reranking with lexical awareness. A maximum chunk limit per source prevents a single document from crowding out others.

STAGE 5 • CONFIDENCE & ANSWERABILITY ASSESSMENT

The Hallucination Guard

Before calling the language model, the system evaluates chunk relevance scores. If the knowledge base contains no sufficiently relevant material, the assistant returns a graceful fallback message immediately without invoking the LLM, ensuring ungrounded facts are not fabricated.

STAGE 6 • CONTEXT OPTIMIZATION

Deduplication & Character Budgets

Retrieved chunks are stripped of near-duplicates and compressed to fit within a strict context character budget. This reduces latency and ensures only high-signal information reaches the model.

STAGE 7 • STREAMING GENERATION

Server-Sent Events (SSE) Output

The model synthesizes the answer strictly based on the provided context passages. Tokens stream back to the widget UI in real time over Server-Sent Events (SSE).

STAGE 8 • CITATION GROUNDING

Traceable Document Attribution

Every factual response includes structured source cards linking visitors directly to the crawled web URL or uploaded document that supplied the evidence.

Ingestion provider locking

Preventing vector space corruption across re-crawls.

When an assistant first indexes content, WebChat AI permanently records the embedding provider, model, and vector dimensions on the website record. All subsequent document uploads, retries, and visitor search queries are locked to that identical model. This ensures vector search spaces never suffer dimensionality or semantic drift.

Related documentation

Knowledge Sources Guide

Learn how to configure website crawls and uploaded files.

Read guide

Conversations & Citations

Inspect live visitor conversation transcripts and retrieved source chunks.

Read guide

Security & Tenant Isolation

How tenant data is completely isolated in vector databases.

Read guide

PreviousFile uploadsNext Customization

Ready to build?

Register a website and get a live assistant in minutes.

Get Started Free