> ## Documentation Index
> Fetch the complete documentation index at: https://help.hiredata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Score, summarise and sort candidates automatically with Ask AI

> Use the Ask AI step to give every match a fit score or a summary, then match, decline or pre-screen the candidate based on the answer.

Ask AI is the step in an automation that reads the run's data and gives back the answers you ask for: a fit score, a summary, a category, or one clean value pulled out of a longer text. The answers are stored as fields, so the next steps can write them to a record or decide what happens next.

A typical example: every new match gets a fit score against the vacancy. Based on that score, the automation matches the candidate, declines them, or invites them to a pre-screening. Another: every match gets a short summary for the recruiter with strengths, gaps and red flags.

You decide how the answers are used. Later steps can act on them automatically, without anyone checking first, and answers can vary between runs. So test before you let an answer decline a candidate or send a message.

This guide walks through the setup, testing and common problems. For a description of every setting, see the [Prompt reference](https://help.hiredata.com/reference/automations/steps/prompt.md).

## Before you start

Decide two things first:

* **The one question you want answered.** For example: "Is this candidate a good match for this vacancy?" A step that answers one clear question is easier to test and to trust than one that does five jobs.
* **What happens with the answer.** Write it to the match, route the candidate, or send a message. If nothing uses the answer, the step only adds time and cost to every run.

## Set up the step

### 1. Add Ask AI to the automation

Open the automation, click **+** where the step should go, and choose **Prompt**. The drawer that opens is headed **Ask AI**.

Place the step after the trigger or task that loads the data it needs. Ask AI can only read what the run already has.

### 2. Choose what the AI should do

Under **What should the AI do?**, pick the job that fits:

| Choose | When you want to |
| - | - |
| **Extract** | Pull specific values out of a text, such as a street name from an address |
| **Summarize** | Turn a long text into a few lines for a recruiter |
| **Classify** | Put a record in one of your own categories |
| **Write** | Draft or rewrite a text in a chosen tone |
| **Translate** | Turn a text into another language |
| **Analyze** | Judge something, such as how well a candidate fits a vacancy |
| **Evaluate** | Check a text against criteria you describe |
| **Custom** | Write the whole instruction yourself |

![The What should the AI do? panel listing Custom, Extract, Summarize, Classify, Write, Translate, Analyze, and Evaluate, each with a one-line description](https://mintcdn.com/hiredata/mYCMki4Cx7M3RvFn/images/automations/39-prompt-intents.png?fit=max\&auto=format\&n=mYCMki4Cx7M3RvFn\&q=85\&s=afa6a355cda85ff8bf1e90177100bb62)

Every option except **Custom** creates the output fields that job usually returns, so you start from fields that already exist.

### 3. Give it the data and the instruction

Under **What will you provide to the AI?**:

* In **Input**, write the instruction and insert the variables it needs, such as the vacancy's job title and the candidate's experience.
* In **Variables**, add fields to pass alongside the instruction without writing them into the text.

Use **Hints for the AI (optional)** for context and rules, such as "You are a recruiter. If the CV does not mention a driving licence, say so instead of guessing."

### 4. Decide what comes back

Under **What should the AI return?**, add one output field per answer:

* **Use an existing field** to map the answer onto a field the automation already knows.
* **Create custom** to define a new field. Pick the type that matches the answer: **Number** for a score, **Yes / No** for a check, **List** for one of your own options, **Text** for a summary. For a **List**, add the allowed values under **Options**.
* Fill in **What is it for? (optional)**. It tells the model what belongs in the field.

Give each field its own **Reference as** name. That name is how later steps find the answer.

> [!TIP]
>
> Use a **List** or **Yes / No** field for anything a later step branches on. A list can only return one of your options; free text gives a different sentence every time.

### 5. Set the language and model options

* **Language**: leave it on **None** to answer in the input's language, or set a fixed language when the record or message expects one.
* **Advanced**: choose **Speed vs quality**, **Creativity** and **Answer length**. For scores and checks, **Precise** gives the most consistent answers.

![The Ask AI drawer with Custom chosen, a prompt in the Input tab, an empty Hints box, one output field, Language set to None, and the Advanced section open on Fast, Precise, and Auto](https://mintcdn.com/hiredata/mYCMki4Cx7M3RvFn/images/automations/17-prompt-drawer.png?fit=max\&auto=format\&n=mYCMki4Cx7M3RvFn\&q=85\&s=9ff566c9ccb7de28446240a99912e070)

Once saved, the step shows on the canvas with its prompt, a chip per output field and the Advanced settings:

![An Ask AI: Custom card on the canvas with the prompt text, an output chip, and the chips Fast, Precise, and Auto](https://mintcdn.com/hiredata/mYCMki4Cx7M3RvFn/images/automations/27-prompt-card.png?fit=max\&auto=format\&n=mYCMki4Cx7M3RvFn\&q=85\&s=daf5d91954e8b99d9e136922c4716909)

## Test it with Preview

Click **Preview** in the drawer footer, then **Generate an example** to fill in realistic sample data, and run the step before you save. You can edit the example values to test a specific case. Check every output field, not only the first one.

Test more than one case: a strong candidate, a weak one, and a record with missing information. If the answer for the missing case is a guess, add a hint that says what to do when the information is not there.

## Use the answer in later steps

In later steps, find each answer under the step's automatic name, with a key based on its **Reference as** value, such as `output.fit_score`. If Ask AI is inside a [Loop](https://help.hiredata.com/reference/automations/steps/loop.md), use the answer or write it to a record inside that Loop; steps after the Loop cannot read it. The step also records:

| Variable | Holds |
| - | - |
| `is_successful` | Whether the model returned an answer that fits the fields |
| `reasoning` | How the model reached the answer |
| `error_message` | Why it could not answer, empty on success |

Common next steps:

* **Write it to the record.** An [Update](https://help.hiredata.com/reference/automations/steps/update.md) task writes the summary or score to the match or candidate.
* **Continue only when it fits.** A [Filter](https://help.hiredata.com/reference/automations/steps/filter.md) lets the run continue only when a score or list value meets a condition. Runs that don't meet it stop there.
* **Send different outcomes down different paths.** A [Split](https://help.hiredata.com/reference/automations/steps/split.md) with a Filter in each branch, for example one branch to match, one to decline and one to invite to a pre-screening.

## Things to be aware of

* **The answer is used as soon as it is returned.** Test with Preview and a few real records before the automation acts on the answer, especially before it declines a candidate or sends a message.
* **A step that gets no answer stops its run.** When the model cannot answer, the step shows as Cancelled with the reason in the timeline, and the steps after it do not run. Inside a [Split](https://help.hiredata.com/reference/automations/steps/split.md) or [Loop](https://help.hiredata.com/reference/automations/steps/loop.md), only that branch or iteration stops; other branches and the steps after the Split or Loop can still run. See [Run cancellation reasons](https://help.hiredata.com/knowledge-base/run-cancellation-reasons.md).
* **An unexpected answer does not stop the run.** If a later step depends on the answer, check it first with a [Filter](https://help.hiredata.com/reference/automations/steps/filter.md).
* **For one line inside an email**, an [AI variable](https://help.hiredata.com/variables/ai-variables.md) in the template is simpler than a step. Use Ask AI when the answer has to be stored or has to steer the run.

## Troubleshoot Ask AI

| What you see | What to check |
| - | - |
| The answer is vague or ignores this record | The instruction has no variables. Insert the fields it needs in **Input** or add them under **Variables**. |
| One output field is always empty or overwritten | Two fields share the same **Reference as**. Give each field its own name. |
| The answer is in the wrong language | **Language** is set to **None**, so it follows the input. Set a fixed language. |
| Answers differ a lot between similar records | Set **Creativity** to **Precise** and make the instruction more specific about what a good answer contains. |
| The run shows Cancelled at the Ask AI step | The model could not return an answer that fits the fields. Read the reason in the timeline, check the inputs, and simplify the fields. |
| A later step uses a wrong value | Check the output with a **Filter** before that step, and test the case in **Preview**. |
| The step name on the canvas did not change | **Step name** only changes the drawer header. The card and the variable names keep the automatic name. |

If the step still does not behave as expected, contact [support@hiredata.com](mailto:support@hiredata.com) with the automation name, the Ask AI step, an example record, and the answer you expected.


## Related topics

- [What's new this month](https://help.hiredata.com/whats-new.md)
- [Pre-screen every form response automatically with knock-out questions and scores](https://help.hiredata.com/knowledge-base/cookbook/set-up-form-evaluations.md)
- [Screen and score applicants with a pre-screening form](https://help.hiredata.com/knowledge-base/cookbook/pre-screening-form.md)
- [Form evaluation overview](https://help.hiredata.com/reference/forms/evaluation/overview.md)
- [HireData recipes for recruitment workflows](https://help.hiredata.com/knowledge-base/cookbook/introduction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.