> For the complete documentation index, see [llms.txt](https://guide.plumber.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.plumber.gov.sg/user-guides/actions/pair.md).

# Pair

You can use Pair actions to automatically process text or images — summarising feedback, categorising responses, extracting information from documents, and more — without writing any code.

These actions are powered by AI models hosted on [Foundry](https://foundry.pair.gov.sg), which also powers [Pair](https://pair.gov.sg/). Note that these are not [Pair](https://pair.gov.sg) (the AI assistant) or Pair Assistants. They are standalone AI actions within Plumber.

## Actions

### Use Pair

Enter a prompt to tell Pair what to do with your data. Pair will return structured outputs that you can use as variables in later steps.

#### Fields

| Field                                                  | Description                                                                                                                    | Require |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------- |
| Describe what you want Pair to do                      | Your prompt. You can use variables from previous steps (e.g. a form response) to pass in the content you want Pair to work on. | ✔️      |
| Define how you want Pair to structure what it extracts | The list of outputs you want Pair to return. Each output becomes a variable you can use in later steps.                        | ✔️      |

#### Presets

To get started quickly, you can choose from four presets. Each preset fills in a template prompt and suggested output fields that you can customise. You can edit the preset prompt after selecting it, or write your own from scratch.

<table><thead><tr><th width="165.0703125">Preset</th><th>What it does</th></tr></thead><tbody><tr><td><strong>Summarise</strong></td><td>Pulls out the key points and main takeaways</td></tr><tr><td><strong>Analyse</strong></td><td>Finds patterns, strengths, weaknesses, and recommendations</td></tr><tr><td><strong>Categorise</strong></td><td>Groups responses into themes or labels</td></tr><tr><td><strong>Write</strong></td><td>Generates content from a brief</td></tr></tbody></table>

#### Output

For each output, you define:

<table><thead><tr><th width="169.34765625">Sub-field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Type</strong></td><td>The data type Pair should return: <strong>Text</strong>, <strong>Number</strong>, or <strong>Category</strong></td></tr><tr><td><strong>Output name</strong></td><td>The name of this output (e.g. <code>Summary</code>, <code>Priority level</code>). This becomes the variable name in later steps.</td></tr><tr><td><strong>Categories</strong></td><td><em>(Category type only)</em> A comma-separated list of allowed values (e.g. <code>High, Medium, Low</code>). Pair will only return one of these values.</td></tr></tbody></table>

**Output types:**

* **Text** — a free-form text response (e.g. a summary or recommendation)
* **Number** — a numeric value (e.g. a score or count)
* **Category** — one of a fixed set of values you define (e.g. `Positive`, `Negative`, `Neutral`)

> **Tip:** Use the Category type when you need to route or filter based on Pair's output in a later step, since the values are predictable.

#### Check step

Click **Check step** to test your configuration. Pair will run against your test data and show you what it returns for each output field.

### Process image

Extract specific information from an image or PDF. You describe what you want Pair to look for, and it returns a structured value for each item.

| Field                        | Description                                                                                                                              | Required? |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| Image                        | Select a file variable from a previous step (e.g. an attachment from a FormSG submission). Only one image or PDF at a time is supported. | ✔️        |
| What do you want to extract? | The list of things you want Pair to look for in the image. Each item becomes a variable you can use in later steps.                      | ✔️        |

> **Note:** The image must come from a variable in a previous step. You cannot upload a file directly in this step.

#### Output fields

For each item you want to extract, you define:

| Sub-field            | Description                                                                                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **What to look for** | A description of what Pair should find in the image (e.g. `Whether the image contains a handwritten signature`, `The total amount shown on the receipt`) |
| **Output name**      | The name of this output (e.g. `Signature present`, `Total amount`). This becomes the variable name in later steps.                                       |

#### Check step

Click **Check step** to test your configuration. Pair will process your test image and show you what it extracted for each item.

## FAQ

<details>

<summary>What kinds of content can I pass into Use Pair?</summary>

Any text you have as a variable in your pipe — for example, a form response, a row from Tiles, or the body of an email. Paste the variable into your prompt where you want Pair to read it.

</details>

<details>

<summary>What file types does Process an image support?</summary>

Images (PNG, JPG) and PDFs only. One file per step. Zip files and other formats are not supported.

</details>

<details>

<summary>Can I store a knowledge base for Pair to reference?</summary>

Not currently. Pair actions work on a per-step basis - you pass in content via your prompt or the Process image action, and Pair processes it in that execution only. There's no persistent knowledge base or document store.

If this is something you need, let us know your use case at <https://go.gov.sg/plumber-support>.

</details>

<details>

<summary>Can I have multiple Pair steps in the same pipe?</summary>

Yes. You can chain multiple Pair steps, and each step's outputs are available as variables in all subsequent steps.

</details>

<details>

<summary>What is the data classification for content processed by Pair?</summary>

PAIR is cleared for Restricted and Sensitive (Normal) data only. Do not pass in data classified Sensitive (High) or above, even if the rest of your pipe handles it

</details>
