baleybots
← All guides
A reliable AI workflow moving through interpretation, checks, review, and handoff
Workflow design

· Baleybots

How to define inputs and outputs for an AI workflow

Before choosing a model, write the record your workflow receives and the record it must produce. A clear input and output contract exposes problems that a natural-language task description can hide.

Specify what absent information means

An invoice extractor might receive a document and return vendor, invoice number, currency, total, and due date. Decide whether an unreadable due date becomes null, an error, or a review request. Those outcomes have different consequences. Also distinguish a value copied from the document from one calculated by your software. If the total includes tax, specify that; otherwise two apparently correct outputs can disagree.

Workflow at a glanceSpecify what absent information meansUse this sequence as a small fixture before you scale the work.
  1. 1Create a sample input with a stable…Create a sample input with a stable identifier.
  2. 2Define field types, required fields, and allowed…Define field types, required fields, and allowed nulls.
  3. 3Write one example each for success, missing…Write one example each for success, missing information, and invalid input.

Try it on a small example

  1. Create a sample input with a stable identifier.
  2. Define field types, required fields, and allowed nulls.
  3. Write one example each for success, missing information, and invalid input.

What to verify

Validate the returned object before writing it anywhere. A JSON-shaped answer can still contain a wrong currency or an impossible date. Baleybots callable document runs require a supported processor output with an object JSON Schema. Treat that schema as the start of validation, then add checks for relationships such as subtotal plus tax equaling total. Make those checks deterministic where possible.

Product details checked against the Public API reference on October 4, 2026. These guides describe documented behavior; availability depends on your account and the deployed service. Baleybots is in invite-only beta.