How it works
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- Retrieve — the incoming message is embedded and matched against your knowledge base (Vectorize, cosine similarity).
- Decide — a gate checks whether the question is in scope and whether the AI should answer, escalate, or stay quiet.
- Answer — the model drafts a grounded reply citing only retrieved context.
- 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.