You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optional decision model integration for gates, tool ranking, guards and approvals #77
Several places in an agent run ask a small question that does not need a full chat completion: should this input start a run at all, which tools are relevant to this request, is this answer acceptable, should this tool call be allowed. Today each of these is either a full LLM call or not available.
pydecide answers typed questions (Choice, Score, Noul) with small decision models in milliseconds, and passes a question it is not confident about to a stronger backend through a confidence gate.
Proposal An optional integration, installed with cyclops[decide], in its own module. The core never imports it.
Run gate. A helper that decides, before start(), whether an input needs a run, from the input plus caller-supplied context. It only reports a decision with its probability; skipping is the caller's choice, so a wrong answer can only cost a run, never drop one, when used with a high threshold.
Tool ranking for deferred tool loading (Deferred tool loading through a search tool #74). Rank tools against the request with a Score question and send the top matches, falling back to the search tool when confidence is low.
Decision guard (Tool-call middleware and an end-of-run guard #27). A guard that checks the final answer against a question such as "does the answer address the request?" and sends the model back below a threshold.
Each piece takes a decide.Client from the caller, so backends, models and thresholds stay the application's choice. Tests use a fake client; docs show each piece with the confidence trade-off stated plainly (where a wrong decision costs a call and where it would change behaviour).
Activity