Product boundaries¶
Outcome: Refuse clearly out-of-scope prompts locally (zero model tokens).
Prerequisites¶
Daemon running; decide product domain topics.
Steps¶
Copy examples/boundaries/fintech-assist.yaml into ~/.daari/config.yaml, or PATCH /v1/daari/config:
boundaries:
enabled: true
mode: warn # dry-run first
product_name: "Credit Assist"
allow_topics: ["credit score", "credit card"]
deny_topics: ["python", "wedding"]
refuse_message: "I only help with credit questions."
clear_out_threshold: 0.75
clear_in_threshold: 0.75
When confident, set mode: block. Ambiguous prompts can take a local quorum
(stages_b2, quorum_votes) and, if you enable it, a budget-capped frontier
judge (stages_b3, frontier_judge_daily_budget_usd). B0 uses the L1 embedder
for cosine scoring when embeddings are available.
Verify¶
python scripts/smoke_boundaries.py
# or curl with X-Daari-Meta โ expect tier=boundary on deny topics
Troubleshoot¶
| Problem | Fix |
|---|---|
| Too many refuses | Lower thresholds or use mode: warn; expand allow_topics / examples_in |
| Never refuses | Confirm enabled: true and restart / PATCH rebuilds engine |
Observe¶
Boundary decisions increment daari_boundary_decisions_total (labels stage
and label). The overview Grafana dashboard charts them under Boundary
decisions by stage. Series definition and scrape setup:
metrics-prometheus.md.