> For the complete documentation index, see [llms.txt](https://help.tillit.cloud/tillit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/integrations/wire-flow/task-types-and-integrations/ai-and-validation.md).

# AI & Validation

## Bedrock AI

Invokes an AI model to classify, extract, or summarise data within a workflow.

<figure><img src="/files/2IQ3hWRQ6eGdDFj15ZfP" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mLUetGnCBHQRwi1hSz50" alt=""><figcaption></figcaption></figure>

| Field             | Description                                                             |
| ----------------- | ----------------------------------------------------------------------- |
| **Model ID**      | The AI model to use (e.g., `anthropic.claude-3-haiku-20240307-v1:0`)    |
| **Prompt**        | Supports `{$.body.field}` placeholders or a JSONPath to a prompt string |
| **System Prompt** | Optional system instructions                                            |
| **Max Tokens**    | Maximum response length (default: 1024)                                 |

The next task receives the model's response in this format:

```json
{
  "statusCode": 200,
  "body": {
    "content": [{ "type": "text", "text": "The model's response..." }]
  }
}
```

Extract the response text in a downstream JSONata task: `$states.input.body.content[0].text`

**Use cases:** classification, data extraction from unstructured text, summarisation, decision support.

## Schema Validator

Validates the step input against a JSON Schema. If validation fails, the step errors — catchable with an Error Boundary.

<figure><img src="/files/LppBMteVdLZtQ60HPgvQ" alt=""><figcaption></figcaption></figure>

| Field           | Description                                  |
| --------------- | -------------------------------------------- |
| **JSON Schema** | Standard JSON Schema definition              |
| **Edit**        | Opens an editor with live validation preview |

If validation passes, the input is passed through unchanged to the next step.
