Make a decision
decideEvaluate a query against a domain's rule set to return a deterministic, auditable decision, with an explanation generated from policy documents.
Instructions
Make a deterministic, auditable decision in a domain.
The verdict comes from the domain's rule set (Rete engine, never the LLM), so it is reproducible and compliant. The explanation is generated from the domain's ingested policy documents.
Args:
domain: Rule-set domain, e.g. "loan", "fraud", "clinical".
query: Natural-language question or decision request.
facts: Structured facts for working memory, e.g.
{"credit_score": 710, "annual_income": 85000}. Use list_rules
to see which fields a domain's rules test.
unstructured_text: Optional free text (an application, a case note);
facts are extracted from it automatically and merged.
response_mode: "verdict_only" (fastest), "verdict_with_explanation",
or "full_audit" (every rule evaluation + retrieved chunks, available
on every plan including the free tier).
rule_firings come back in causal order: a rule that matched a fact
asserted by an earlier firing appears after it, with the derived
facts listed under asserted_facts.
filter_retrieval_with_rules: Pattern 01 — run the rules first and let a
fired rule's retrieval_scope action narrow which documents the
retrieval searches before it runs.
extract_from_retrieval: Pattern 02 — parse the retrieved documents into
facts and assert them into working memory, so rules fire on what was
actually read (not just the facts you passed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| facts | No | ||
| query | Yes | ||
| domain | Yes | ||
| response_mode | No | verdict_with_explanation | |
| unstructured_text | No | ||
| extract_from_retrieval | No | ||
| filter_retrieval_with_rules | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |