Assumptions
What an answer is based on (assumptions, unknowns and limits), with a way for the user to correct them so the agent can redo the work.
≈ 1,282 tokens per use (tool 698 · guidance 293 · typical payload 291)How token costs are estimated
Example: Assumptions
How much will a week in Lisbon cost us?
What this is based on
For: Budget for a week in Lisbon
When to use
- The answer rests on guesses the user could easily correct: party size, budget, dates, rates, jurisdiction.
- Something the agent needed was missing or cut off, and the user should know before relying on the answer.
- A wrong assumption would change the answer a lot, such as an estimate, a forecast or a recommendation.
When not to use
- Nothing was assumed. Don't invent assumptions to look careful.
- The agent needs an answer before it can start at all. Ask the question instead.
- The point is where the answer came from or what the agent did. Use Citations for sources and the Activity Trail for steps.
How the agent should use it
- Show it right after the answer it explains, once per answer.
- One plain sentence per item. Put the reason in
basis: "From your message on Monday", "Industry average". It's shown while the user corrects that item and read to screen readers, not on every row. - Set
impacthonestly. High-impact items are listed first in their group and flagged "High impact", so reservehighfor things that change the answer materially. Low-confidence items are flagged "Low confidence"; other ratings are read to screen readers only. - Add a
correctionwhenever the user could give the real value, and set itsvalueto what was assumed. Without one, the item can only be acknowledged. - On
redo, redo the work with the corrected values and show a new set of assumptions. Onconfirm-all, keep the answer. - Lifecycle: when the agent redoes the work, mark this call superseded by the new one (
supersededBy). It doesn't needexpiresAt; if the data has a cutoff, say so in adata-limititem rather than relying onfetchedAt.
How the user corrects it
Items are grouped into Assumed, Not known and Limits (constraints and data limits). The appliesTo line is read to screen readers; the answer above already names it. Within a group, items are sorted by impact (high first), then by confidence (least certain first).
| Control | Shown for | Effect |
|---|---|---|
| Correct | Items with a correction | Opens the typed input inline (text, number with unit, select, or yes/no) with Save and Cancel. The item then shows the new value under the struck-through statement |
| I can tell you | Unknowns with a correction | Same as Correct |
| Looks right | Assumptions | Marks the item confirmed. Unknowns say "Fine without it" and limits say "Understood" |
Saving the value that was already assumed counts as a confirmation, not a correction. Redo with corrections is enabled once there's at least one correction; Everything looks right is enabled while there are none.
Installation
npx shadcn@latest add https://your-site.com/r/assumptions.json
Usage
import { tool } from "ai"
import { assumptionsTool } from "@/components/genui/assumptions.schema"
const tools = {
// No execute(): the call is completed by the user's corrections in the UI.
[assumptionsTool.name]: tool({
description: assumptionsTool.description,
inputSchema: assumptionsTool.inputSchema,
}),
}The agent receives one of:
{ action: "redo", corrections: [{ id: "travellers", value: 3 }], confirmed: ["meals"] }
{ action: "confirm-all" }Correction values are typed: a number for number, one of the options for select, true/false for boolean, and trimmed text for text.
With LangGraph
Push it from a graph node with ui.push({ name: "show_assumptions", props: { toolCallId, ...args } }, { message }), and render the thread's UI messages with the Renderer.
Restoring from history
Pass the stored result back as result. The component shows the read-only record (corrected values, confirmations and "Sent 2 corrections") and never calls onResult again.
<Assumptions
{...part.input}
result={part.state === "output-available" ? part.output : undefined}
/>Schema
| Prop | Type | Notes |
|---|---|---|
title | string? | Default "What this is based on" |
appliesTo | string? | The answer these sit behind, e.g. "Budget for a week in Lisbon". Screen readers only |
items | AssumptionItem[] | 1–12 |
AssumptionItem
| Field | Type | Notes |
|---|---|---|
id | string | Returned in the result |
kind | assumption | unknown | constraint | data-limit | Sets the group |
statement | string | One plain sentence |
basis | string? | Why it was assumed |
confidence | low | medium | high | How sure the agent is |
impact | low | medium | high | How much the answer changes if it's wrong |
correction | { type, options?, unit?, value? } | type is text, number, select or boolean. options is required for select. A unit starting with a currency symbol goes before the number ("€/night" → "€140/night") |
sourceUrl | string? | Data-bound. http(s) link to where the basis came from |
Host props: status (streaming, ready, corrected, confirmed), onResult, result and className.