Skip to content
On this page

Helpway's AI agent answers from your knowledge, with guardrails against hallucination.

The pipeline #

Code
Widget → sendMessage → Queue → AI pipeline → WebSocket → Widget
  1. Retrieve — the incoming message is embedded and matched against your knowledge base (Vectorize, cosine similarity).
  2. Decide — a gate checks whether the question is in scope and whether the AI should answer, escalate, or stay quiet.
  3. Answer — the model drafts a grounded reply citing only retrieved context.
  4. Stream — the reply streams back to the widget in real time.

Grounding #

The system prompt forbids answering beyond retrieved context. If the knowledge base doesn't cover a question, the AI escalates instead of guessing. See Escalation.

Loop prevention #

The AI never replies to its own messages, and once a human joins, the agent steps back.