Skip to content

Conversational Grounding Architecture

Summary

The assistant now uses always-on claim-level grounding to reduce hallucinations without forcing turn-level refusals.

Core behavior: - Detect missing evidence for factual claims. - Rewrite only unsupported factual claims. - Preserve conversational flow and persona style. - Keep high-risk responses structured for reliability.

Pipeline

  1. Classification + tool plan from router.
  2. Tool execution with execution metadata:
  3. requested tools
  4. executed tools
  5. unsupported tools
  6. failed tools
  7. Evidence ledger construction per turn.
  8. Response generation with:
  9. connected-service context
  10. high-risk structured output
  11. normal persona generation for low/medium risk
  12. Post-generation claim-level rewrite if evidence is missing.
  13. Re-render rewritten bubbles in persona voice.
  14. Emit grounding analytics outcome.

Evidence Ledger

The ledger captures: - intent - risk_level - required_evidence - grounded_evidence - missing_evidence - tool execution metadata - rewrite count

This enables deterministic gating on factual claims without blocking natural conversation.

Uncertainty Voice Model

Uncertainty fallback is not hardcoded per character.

Instead: - infer style profile from persona passport tone/behavior - generate fallback in that style profile - re-render through persona voice rules for final output

This makes new personas inherit uncertainty behavior from existing passport design automatically.

Design Decisions

  • Always-on grounding in current environment (no A/B gating path).
  • Conversational fail-close defaults:
  • conversational uncertainty enabled
  • strict hard-refusal mode disabled
  • High-risk intents use structured response schema.

Key Files

  • app/orchestrator/grounding.py
  • app/orchestrator/message_handler.py
  • app/orchestrator/response_generator.py
  • app/orchestrator/tool_executor.py
  • app/orchestrator/smart_message_router.py

Metrics

See implementation plan: - docs/implementation/CONVERSATIONAL_GROUNDING_METRICS_PLAN.md