ChoiceAgents

Request clarity

Decide whether an agent has enough to act on a request, or should ask a clarifying question first.

F@f

Problem

Agents guess when a request is missing a detail or can be read two ways, then act on the guess. Users find out after the wrong thing happened.

Goal

Act on clear requests, and ask one specific question when a required detail is missing or the request is ambiguous.

Input / state

The user's request, recent conversation, and what the available tasks require.

request
The user's latest message.
context
A short summary of the conversation so far.
required_details
Details your tasks require, such as an order number or date range.

Decision question

ChoiceQuestion key request_clarity

Is this request clear enough to act on?

Options

  • clearOne reasonable reading, with the required details present or available in context.
  • missing_required_detailOne reading, but a required detail is missing.
  • multiple_interpretationsCould reasonably mean different things that lead to different actions.

Allowed outcomes

Decided in your code from the answer and its confidence. Thresholds are yours to set and test.

  • ActChoice is clear and confidence meets your threshold.
  • Ask for the detailChoice is missing_required_detail and confidence meets your threshold.
  • Ask which oneChoice is multiple_interpretations and confidence meets your threshold.
  • Ask or hand offConfidence is below your threshold: probability is spread across options.

Example scenarios

Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.

Example state

{
  "context": "",
  "request": "Where's order A-48213?",
  "required_details": [
    "order number"
  ]
}

Outcome

Illustrative
Act

Choice is clear and confidence meets your threshold.

Why

One reading, order number present.

Using it well

  • List required details per task; "enough information" is easier to judge against a concrete list.
  • Ask one question at a time, offering the likely options when there are a few.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "request": "<request>",
    "context": "<context>",
    "required_details": "<required_details>"
  },
  "questions": {
    "request_clarity": {
      "type": "choice",
      "instructions": "Is this request clear enough to act on?",
      "criteria": {
        "clear": "One reasonable reading, with the required details present or available in context.",
        "missing_required_detail": "One reading, but a required detail is missing.",
        "multiple_interpretations": "Could reasonably mean different things that lead to different actions."
      }
    }
  }
}

Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.

Version History

v1Current Versionabout 8 hours ago@f

Initial version

Comments (0)