# Test your assistant

URL: https://docs.assistantcore.com/en/tests

Save the questions your assistant must keep answering well, and run them after every change to see what got better and what got worse.

Save the questions your customers ask most, say what a good answer does, and run them whenever you change the assistant's instructions, knowledge base, or tools. Each run grades every answer and shows which tests got better or worse since the run before.

## Before you begin [#before-you-begin]

- You have the **Assistant Owner** or **Assistant Admin** role on the assistant. Running the tests with instructions you haven't saved needs **Assistant Owner**.
- A run uses the credits of the person who starts it. See [What a run costs](#what-a-run-costs).

## Add a test [#add-a-test]

1. In the [Admin Panel](https://admin.assistantcore.com), open the assistant and select **Tests** in the sidebar.
2. Click **Add test**.
3. In **Customer's question**, type the question the way a customer would ask it.
4. Optional: click **Add a follow-up message** to have the customer write again in the same conversation. See [Tests with several messages](#tests-with-several-messages).
5. In **A good answer**, say what a good answer does, in plain words. An AI judge reads the whole conversation against this sentence.
6. Optional: under **Your assistant must also**, choose a tool in **Use this tool**, a tool in **Not use this tool**, or a document in **Cite this document**. An attempt that doesn't use the required tool, uses the forbidden one, or doesn't cite the document fails, whatever it says.
7. Click **Save**.

An assistant keeps up to 50 tests, holding up to 100 customer messages together (questions and follow-up messages).

### Tests with several messages [#tests-with-several-messages]

A test can have up to 4 follow-up messages after its question. Use them when what you want to check only shows after the first reply, such as a customer asking "What about the large size?" after a price question, or asking for a person after the assistant has answered.

- **The messages are sent one after another in one conversation**, word for word, whatever the assistant replied. Write messages that still make sense if the assistant answers differently.
- **The judge grades once, over the whole conversation.** With follow-up messages, **A good answer** becomes **A good conversation**. What your assistant must do may happen in any reply, unless you name the turn. What it must not do counts in every reply: a promise it takes back later still fails the test.
- **A failed attempt marks the reply that failed it**, when one reply decides the grade. **Fix this answer** then opens for that reply.
- **Tools and documents are checked over the whole conversation.** A forbidden tool, for example, must not be used in any turn.
- **Each message is one more charged reply** every time the test is asked.

### Add from Test chat [#add-from-test-chat]

While trying the assistant in **Test chat**, click **Add to tests** under a reply. The messages you sent up to that reply are filled in: the first as the question, the rest as follow-up messages. The assistant's reply shows below them to help you write **A good answer**. The reply is only there for reference; it isn't saved with the test.

If the chat is longer than 5 messages, the test keeps the latest 5. Remove any the check doesn't need.

### Write a good answer the judge can check [#write-a-good-answer-the-judge-can-check]

| Instead of                      | Write                                                                      |
| ------------------------------- | -------------------------------------------------------------------------- |
| "Answers correctly"             | "States the monthly price of the Premium plan and doesn't promise a discount" |
| "Is polite and helpful"         | "Offers to pass the customer to a staff member"                            |
| Several rules in one long test  | One test for each thing you want to check                                  |

The judge passes a reply that does what the sentence asks and fails one that doesn't. It doesn't mark a reply down for style or length unless the sentence asks about them.

## Run the tests [#run-the-tests]

1. On **Tests**, click **Run tests**. A dialog says how many replies the run makes.
2. Under **Times to ask each test**, keep **3 times** or choose **Once** to spend fewer credits. See [Choose how many times to ask](#choose-how-many-times-to-ask).
3. Click **Run tests** to confirm.

The page shows **Running the tests…** and counts the replies as they come in. You can leave the page; the run continues. **Stop run** skips the replies not made yet; the ones already made are still charged.

During a run, the assistant:

- **Asks every test 3 times by default**, each in a new conversation. An assistant doesn't answer the same way twice, and one attempt can't tell a real problem from chance.
- **Answers as a customer on the [Web Widget](/en/web-widget) would.** It uses the same instructions, knowledge base, and tools, and has no memory of earlier chats.
- **Doesn't carry out actions.** A tool call that would change something, such as saving a [lead](/en/leads), passing the chat to a [staff member](/en/staff-handoff), or an API tool that creates an order, is recorded as done but not run. Tools that only read, such as searching the knowledge base, run as usual.
- **Leaves no conversation behind.** Test replies don't show in **Conversations** and don't count as customer conversations. A test conversation can appear in **Conversations** for the few seconds it is being answered.

One run at a time for each assistant, and up to 20 runs an hour for each person.

### Choose how many times to ask [#choose-how-many-times-to-ask]

| Times to ask | Cost                                  | What the results tell you                                                                                   |
| ------------ | ------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **3 times**  | 3 replies for every customer message  | Which tests passed, failed or are **Unstable**, and which got **Better** or **Worse** since the run before. |
| **Once**     | 1 reply for every customer message    | Only **Passed** or **Failed**. One attempt can't tell a real problem from chance, so there is no **Unstable** and no **Better** or **Worse**. |

Use **Once** for a quick look while you are editing, and **3 times** before you trust the result. A run is compared only with an earlier run that asked the same number of times.

### Rerun some tests [#rerun-some-tests]

After fixing what made a few tests fail, you do not have to pay to ask every test again:

- **Rerun the tests not passed.** Click **Rerun N not passed** next to **Run tests**. The run asks only the tests that are **Failed**, **Unstable**, **Incomplete**, **Not run yet** or edited since the last run. The button is hidden when every test passed.
- **Run one test.** Open the test's menu and choose **Run this test only**.

The confirmation dialog prices only the tests being run. The other tests keep showing their result from the last run that asked them, with when that run was.

<Callout type="warn">
Rerunning some tests cannot show whether the others got worse. After changing the instructions, knowledge base or tools, run them all with **Run tests**.
</Callout>

## Read the results [#read-the-results]

Each test shows a result and how many of its replies passed, for example **Unstable 2/3**.

| Result          | Means                                                                                         |
| --------------- | --------------------------------------------------------------------------------------------- |
| **Passed**      | Every reply passed.                                                                           |
| **Failed**      | No reply passed. Something to fix.                                                            |
| **Unstable**    | Some replies passed. The assistant answers this question differently each time.               |
| **Incomplete**  | A reply could not be made, or the run stopped first. Run the tests again.                     |
| **Not run yet** | No run has asked this test yet.                                                               |

- **See the replies.** Click the arrow beside a test to read its attempts, why each one passed or failed, the **Tools used**, and the **Sources cited**. A test with several messages shows the whole conversation of each attempt: every customer message with its reply.
- **See what changed.** A test shows **Better** or **Worse** with its earlier result when at least two more or two fewer of its replies passed than in the last earlier run that asked it, and the summary counts both. One reply changing can be chance, so it does not count. Only tests that both runs asked in full are compared.
- **From the run …** under a test means the latest run did not ask it, and the result is from an earlier run that did.
- **Edited since this run** means the result is for the test as it was worded when the run started. Open the test to see how it was asked.

<Callout type="info">
The judge is an AI model and can be wrong. Before you change the assistant because of a failed test, read the reason and the reply.
</Callout>

## Try instructions before you save them [#try-instructions-before-you-save-them]

1. Open **Behavior** and edit the **System Prompt**. Don't save.
2. Click **Run tests with this draft** under the field, then confirm. The button shows when the assistant has at least one test.
3. Read the results in the dialog. Nothing is saved: the assistant keeps answering customers with the saved instructions.

Its results are compared with the last run with the saved instructions, and do not replace the results on **Tests**. Only the instructions can be tried without saving. To test a change to the knowledge base or to tools, save it, then run the tests.

## What a run costs [#what-a-run-costs]

- **Every reply is charged like a customer's chat turn**, at the rate of the assistant's chat model. A run of 10 tests asked 3 times makes 30 replies; each follow-up message adds 3 more. Asking once costs a third. Rerunning some tests charges only for those. See [Credits](/en/billing/credits).
- **Grading is free.** The judge's work is not charged.
- **The person who starts the run pays**, not the assistant owner.
- **If your credits run out**, the run stops and the remaining replies are skipped.

## Troubleshooting [#troubleshooting]

<Accordions>
<Accordion title="A test is Unstable">
The assistant gives a good answer some of the time. Read the replies that failed, then make the instructions or the document more specific about that question. If the replies all look right, the sentence in **A good answer** may be asking for more than one thing: split it into separate tests.
</Accordion>

<Accordion title="A test failed but the reply looks right">
Open the test and read the reason under the reply. If it says the assistant did not use a tool, used one it must not, or did not cite a document, the test requires that under **Your assistant must also**. Otherwise, rewrite **A good answer** (**A good conversation** for a test with follow-up messages) so it names the one thing to check.
</Accordion>

<Accordion title="A test is Incomplete">
One of its replies could not be made, or the run was stopped or ran out of credits. Run the tests again: a reply is never retried by itself. For a test with several messages, the failed attempt still shows the replies made before it.
</Accordion>

<Accordion title="A test shows Must cite a document without a name">
The knowledge base has more than 100 documents and the page did not load this one's name. The test still checks the document you chose.
</Accordion>

<Accordion title="Run tests can't be clicked">
A run is already in progress for this assistant. Wait for it to finish, or click **Stop run**.
</Accordion>
</Accordions>

<Cards>
<Card title="Create your first assistant" href="/en/create-assistant" description="Write the instructions the tests check." />

<Card title="Knowledge Base" href="/en/knowledge-base" description="Add the documents the assistant answers from." />

<Card title="Tools and MCP" href="/en/tools-mcp" description="Choose the tools the assistant can use." />

<Card title="Credits" href="/en/billing/credits" description="See what each chat model costs per reply." />
</Cards>