ask
Query a knowledge base with logical reasoning to find all provable answers. Use ?-prefixed variables for unknowns, apply rules and match facts. Optionally retrieve full proof chains. Supports confidence thresholds and scope filtering.
Instructions
Query the knowledge base using multi-step logical reasoning (backward chaining with unification). Finds all provable answers by applying rules and matching facts. Use ?-prefixed variables for unknowns; optionally returns full proof chains. Side effects: none (read-only). Auth: requires X-Tenant-ID header; FACT_READ permission when auth is enabled. Rate-limited per principal. Errors: VALIDATION_ERROR on bad args; result set bounded by INFERENCE_MAX_RESULTS (default 10,000) to prevent OOM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| predicate | Yes | What you're asking about (e.g., 'grandparent', 'can_access') | |
| args | Yes | Use ?x, ?who for unknowns, concrete values to constrain (e.g., ['?who', 'charlie']) | |
| scope | No | Optional scope filter — omit to query all scopes | |
| withProof | No | If true, include the full reasoning chain showing how each answer was derived (fact matches and rule applications) | |
| minConfidence | No | Minimum confidence threshold 0.0–1.0. Filters out facts and derivations below this confidence. |