Documentation Index

Fetch the complete documentation index at: https://docs.ursahealth.com/llms.txt

Use this file to discover all available pages before exploring further.

Dispositions

Prev Next

A disposition is a structured determination of what was learned from a session. While findings capture individual query outputs, a disposition captures the session's overall conclusion in a machine-readable format.

Use of Dispositions

Dispositions are useful when sessions are part of a repeatable workflow — for example, investigating a series of cost anomalies where each session should conclude with a risk level, estimated savings, and notes. The disposition schema ensures that every session in the workflow produces a consistent, comparable output.

A disposition has two parts:

  • Disposition Schema — Defined by the user when creating or editing a session. Specifies the legal fields and their types. Think of this as a form template.
  • Disposition — The actual values, set by the AI during the session when the user agrees. Think of this as the filled-in form.

Disposition Schema

The disposition schema is a JSON object where each key is a field name and each value describes the field's type. For example:

{
  "risk_level": "NONE|LOW|MEDIUM|HIGH",
  "estimated_savings": "Number",
  "notes": "String"
}

The schema is injected into the AI's prompt context so it knows what fields are available and what values are legal.

Defining a Schema

You can define a disposition schema in two places:

  1. When creating a new session — The new session form includes a "Disposition Schema" editor below the starting request. This is the recommended approach, since the schema is included in the AI's initial prompt.

  2. When editing an existing session — From the diagnostic detail page, click the pencil icon on a session to open the edit panel, which includes the disposition schema editor. Note that editing the schema on an existing session updates it for future interactions but does not retroactively change the AI's initial prompt.

Schema Field Types

Type Editor Selection Schema Value AI Constraint
Number "Number" "Number" Value must be a numeric type (integer or decimal)
String "String" "String" Value must be a text string
Enumerated List "Custom List" "A|B|C" Value must be exactly one of the pipe-separated options

All fields are optional — the AI can set a partial disposition containing only some of the schema's fields. This allows incremental determination where the AI sets known fields first and fills in others as the investigation progresses.

How the AI Sets a Disposition

The AI sets a disposition using the SET_DISPOSITION tool. This tool is only available when the session has a disposition schema defined. The flow is:

  1. The AI investigates the user's request through database queries and metadata lookups.
  2. When the AI has reached a conclusion, it proposes a disposition to the user using PROMPT_USER (e.g., "Based on my analysis, I'd recommend a disposition of risk_level: HIGH with estimated_savings: 50000. Shall I set this?").
  3. The user agrees (or asks for adjustments).
  4. The AI calls SET_DISPOSITION with a JSON object: SET_DISPOSITION {"risk_level": "HIGH", "estimated_savings": 50000}
  5. The system validates the disposition against the schema and either accepts it or returns an error to the AI.
  6. On success, the disposition appears in the session workspace and on the diagnostic's session list.

Validation Rules

Beyond the type constraints above, a disposition must be a valid JSON object and every key in it must exist in the schema — unknown keys are rejected. Missing keys are allowed, since partial dispositions are valid. If validation fails, the AI receives an error message describing the problem and can retry.

Viewing Dispositions

Once set, a disposition appears at the top of the session workspace's Findings pane, showing each field and its value. It also appears as tags below the session name on the diagnostic detail page's session list, which gives a quick overview of session outcomes without opening each one.

Dispositions update in real-time — when the AI sets a disposition during an active session, it appears immediately without requiring a page refresh.

Editing a Schema After Creation

You can modify a session's disposition schema after creation using the session edit panel (pencil icon on the diagnostic detail page). Changes to the schema:

  • Take effect for future AI interactions in the session.
  • Do not retroactively change the initial prompt that was sent when the session started.
  • Do not invalidate an existing disposition (the existing disposition is retained even if it no longer matches the updated schema).

For best results, define the disposition schema before starting the session so the AI has the full context from the beginning.

Example Workflow

Scenario: A team is reviewing a set of pharmacy cost anomalies. Each anomaly gets its own session, and every session should conclude with a risk assessment.

A diagnostic called "Pharmacy Cost Anomaly Review" is created, and each anomaly gets a session whose disposition schema defines risk_level as a custom list of NONE|LOW|MEDIUM|HIGH, estimated_annual_impact as a Number, and recommended_action as a String.

The AI investigates the first anomaly and reports back: "This appears to be a high-risk anomaly with an estimated annual impact of $120,000. I'd recommend a formulary review. Shall I set the disposition?" You agree, and it calls:

SET_DISPOSITION {"risk_level": "HIGH", "estimated_annual_impact": 120000, "recommended_action": "Formulary review"}

Repeated across every anomaly, the diagnostic's session list ends up showing disposition tags for the whole review — a dashboard-like overview of which anomalies are high-risk and what each is estimated to be worth.