> ## Documentation Index
> Fetch the complete documentation index at: https://penseapp.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM tests

> Create edge cases to test the LLM powering your agent

This guide shows you how to set up automated evaluations for your LLM based on your use case on [Calibrate](https://calibrate.artpark.ai).

## Create an agent

From the sidebar, click **Agents** → **New agent**. You have two options for setting up your agent:

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/agent-choice.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=2b2986eeed02108e2e78523ab1f2583d" alt="New Agent Dialog" width="2010" height="1386" data-path="quickstart/images/agent-choice.png" />
</Frame>

<AccordionGroup>
  <Accordion title="Build your agent in Calibrate" icon="flask" defaultOpen>
    Configure the LLM/STT/TTS models, set instructions, and define the tools your agent can use — all within Calibrate.

    See our [Core Concepts: Agents](/docs/core-concepts/agents) guide for the full setup.
  </Accordion>

  <Accordion title="Connect your existing agent" icon="link">
    If you already have a deployed agent, you can connect it to Calibrate via its HTTP endpoint. Calibrate will call your agent directly to run simulations.

    See our [Core Concepts: Agent Connections](/docs/core-concepts/agent-connections) guide for the full setup.

    <Note>
      Agent connections support **text simulations** only. For **voice simulations** (with STT/TTS latency metrics), use an agent built within Calibrate with STT and TTS providers configured.
    </Note>
  </Accordion>
</AccordionGroup>

## Create your first test case

Open the **LLM tests** tab and click on **Add test** to create a new test.

<Frame>
  <img src="https://mintcdn.com/amandalmia/MSZdDJOTkMpB2mLw/quickstart/images/tests-all.png?fit=max&auto=format&n=MSZdDJOTkMpB2mLw&q=85&s=64e46151c8275902cf8d0f0eb5ffe917" alt="Create a new test" width="3024" height="858" data-path="quickstart/images/tests-all.png" />
</Frame>

You can create two types of test cases:

<AccordionGroup>
  <Accordion title="Next Reply Test" icon="message">
    These tests verify your agent responds appropriately to the last user
    message given a conversation history defined by you by checking if the
    agent's response meets your criteria (for example, tone, content, or
    accuracy).
  </Accordion>

  <Accordion title="Tool Invocation Test" icon="wrench">
    These tests verify that your agent calls the correct tools with the right
    parameters given a conversation history defined by you.
  </Accordion>
</AccordionGroup>

### Create a next reply test

Next reply tests verify that your agent response adheres to your criteria given a conversation history defined by you.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-new-1.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=e046802e56de4be4cdb5862527b59a83" alt="Create a next reply test" width="2540" height="1442" data-path="quickstart/images/tests-new-1.png" />
</Frame>

As shown in the image, you need to create the conversation history for the edge case you need to test and add the success criteria for the agent's next response.

### Create a tool invocation test

Tool invocation tests verify that your agent calls the correct tools with the right parameters given a conversation history defined by you.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-new-2.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=2238f47ff39636275018afa6730788d7" alt="Create a tool invocation test" width="2572" height="1452" data-path="quickstart/images/tests-new-2.png" />
</Frame>

As shown in the image, you need to create the conversation history for the edge case you need to test and select the tools that must be called along with the correct parameters.

## Run one test on one agent

Once the test is created, you can click on the play button to run that test.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-one-test-1.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=e8a6e9261b7d415ecf610da6d48ead33" alt="Run one test on one agent" width="588" height="462" data-path="quickstart/images/tests-one-test-1.png" />
</Frame>

Select the agent from the dropdown in the dialog box that appears and hit **Run test**.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-one-test-2.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=cb9cd427b2ab961dbe65125cfedfca85" alt="Run one test on one agent" width="1216" height="886" data-path="quickstart/images/tests-one-test-2.png" />
</Frame>

<Note>
  Selecting the **Attach this test to the agent config** checkbox will attach
  the test to the list of all tests for the selected agent
</Note>

A test runner will open up with the status of the test updating once it
completes. By clicking on a test case, you can view the agent's response and whether it passed the test.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-one-test-3.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=254b657a5b31ea0541f2b76f9b6cf2fc" alt="Run one test on one agent" width="2142" height="1448" data-path="quickstart/images/tests-one-test-3.png" />
</Frame>

## Run all tests for one agent

Navigate to the **Tests** tab of the agent you want to test. You can add new tests by selecting the **Add test** button or run the existing tests by clicking the **Run all tests** button.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-all-1.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=6bebbda5ca7b12f70a7d44d196bd3b91" alt="Run all tests for one agent" width="2438" height="660" data-path="quickstart/images/tests-all-1.png" />
</Frame>

A test runner will open up with the status of each test case updating as it completes. By clicking on a test case, you can view the agent's response and whether it passed the test.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-all-2.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=736cf0535f5be7f7475b568a999d0214" alt="Results of all tests" width="2114" height="1426" data-path="quickstart/images/tests-all-2.png" />
</Frame>

You can view all the past test runs for that agent and their results.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-all-3.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=4ef74fb7264c1ad75b6aef36be251554" alt="Past test runs" width="1164" height="551" data-path="quickstart/images/tests-all-3.png" />
</Frame>

## Find the best LLM for your agent

The tests above are run using the LLM configured for that agent. But it may not be the optimal model for your use case. You can compare the performance of different LLMs on your tests by clicking the **Compare models** button.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-all-1.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=6bebbda5ca7b12f70a7d44d196bd3b91" alt="Compare models" width="2438" height="660" data-path="quickstart/images/tests-all-1.png" />
</Frame>

#### Model selection

You can select upto 5 models that you want to compare and select **Run comparison** to start the evaluation.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-benchmark-1.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=d0e2b00801c80d6d74eba7227b6864cd" alt="Run benchmark" width="1176" height="954" data-path="quickstart/images/tests-benchmark-1.png" />
</Frame>

<Note>
  For **agent connections**, only models valid for the provider selected on the agent's connection page are shown:

  * If you chose **OpenRouter** as your provider, any model supported on OpenRouter can be selected.
  * If you chose **OpenAI**, **Anthropic**, **Google**, or another specific provider, only models from that provider are shown.

  To change which models are available, update the model provider on the agent's connection page. See [Enable benchmarking across models](/docs/core-concepts/agent-connections#enable-benchmarking-across-models) for details.
</Note>

#### Verifying agent connection

For agent connections, Calibrate [verifies](/docs/core-concepts/agent-connections#verify-your-connection) your agent on a sample input with each selected model **before** the benchmark can run. Every model you add to the comparison shows one of these states next to it:

* **not checked** — Just added, never verified with this model
* **verified** — Verified
* **failed** — Verification failed; the error message is shown along with the actual output received from your agent so you can debug

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/agent-conn-benchmark-verify.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=1f45e567300ee3e280dcc85710c27442" alt="Per-model verification statuses in Compare models dialog" width="1088" height="892" data-path="quickstart/images/agent-conn-benchmark-verify.png" />
</Frame>

Clicking **Run comparison** when any selected model is unverified opens the [Verify connection dialog](/docs/core-concepts/agent-connections#verify-your-connection) — customize the sample request and click **Send & Verify** to run the check.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/agent-conn-verify-sample.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=ead6f416d48e41ee9130ec03dfc136fb" alt="Per-model verification statuses in Compare models dialog" width="2200" height="1128" data-path="quickstart/images/agent-conn-verify-sample.png" />
</Frame>

You cannot proceed to the benchmark run until **every** selected model is verified.

<Tip>
  Once a model is verified, the result is saved against your agent's connection
  — the next time you select that same model, it shows up as **verified**
  immediately, no re-verification needed.
</Tip>

If a model fails verification, click **Retry failed** to re-run just the failed check (for example, after fixing your agent or the model routing on your end).

#### Leaderboard

You will see the status of each test for each provider updating as it completes.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-benchmark-2.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=d8520e6ecbc05a46e7d80b48c6f8b9d5" alt="Benchmark status" width="2132" height="1430" data-path="quickstart/images/tests-benchmark-2.png" />
</Frame>

Once the tests for all the providers are complete, a leaderboard will be displayed with the results.

<Frame>
  <img src="https://mintcdn.com/amandalmia/I8Sqtm2UUTcKW2Pv/quickstart/images/tests-benchmark-3.png?fit=max&auto=format&n=I8Sqtm2UUTcKW2Pv&q=85&s=c10ef9bb598957ab3b213672102b5f5d" alt="Benchmark results" width="2020" height="1062" data-path="quickstart/images/tests-benchmark-3.png" />
</Frame>

The pass rate for each model indicates the % of tests passed.

## Sharing your results publicly

You can make any completed test run or benchmark publicly accessible.

### Sharing a test run

Open a test run and click the **Share** button to make it public.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-share-public.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=53d60f65836278fca77ef57e6589a4bb" alt="Test run with Share button" width="2536" height="728" data-path="quickstart/images/llm-share-public.png" />
</Frame>

It toggles to **Public** with a **Copy link** button.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-shared-public.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=0d5f2d6cc010d8c3c5a8e9c49dbbc3bd" alt="Test run shared publicly" width="2648" height="656" data-path="quickstart/images/llm-shared-public.png" />
</Frame>

Share the link with others to let them view the results without needing a Calibrate account.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-public-preview.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=e6d3083597e42384680e4222c06ab10e" alt="Public preview of test run" width="3024" height="1522" data-path="quickstart/images/llm-public-preview.png" />
</Frame>

### Sharing a benchmark

For sharing a benchmark, follow the same steps as sharing a test run.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-bench-public-preview.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=3f676927f2dc1e8c84c042920874d83a" alt="Public preview of test run" width="3024" height="1518" data-path="quickstart/images/llm-bench-public-preview.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-bench-public-preview-2.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=b9bc004cfeb0302c4d6d65193aa53d3a" alt="Public preview of test run" width="3024" height="1566" data-path="quickstart/images/llm-bench-public-preview-2.png" />
</Frame>

## Bulk upload tests

If you have many test cases, you can upload them all at once via CSV. Click **Bulk upload** on the LLM Evaluation page.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-test-bulk-upload.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=3f91498b583e3a3ff5ddf7f07943af9c" alt="Bulk Upload Tests" width="2502" height="574" data-path="quickstart/images/llm-test-bulk-upload.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-test-bulk-upload-dialog.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=cb5055a40269eb6a1790e5ac12f18491" alt="Bulk Upload Tests Dialog" width="2146" height="1434" data-path="quickstart/images/llm-test-bulk-upload-dialog.png" />
</Frame>

1. Select the test type: **Next Reply** or **Tool Call**
2. Select the **Language** (English, Hindi, or Kannada)
3. Upload a CSV file or drag and drop it

<Tip>
  Click **Download sample CSV** in the dialog to get a template with the correct
  format and a README with detailed column descriptions.
</Tip>

<AccordionGroup>
  <Accordion title="Next Reply CSV format" icon="file-csv">
    Your CSV should have three columns:

    | Column                 | Description                                                                                                                                                                                                                            |
    | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `name`                 | A unique test name — must differ from every other test in the CSV and from any previously created test.                                                                                                                                |
    | `conversation_history` | A JSON array of chat messages in OpenAI format. Each message is an object with `role` (`"user"` or `"assistant"`) and `content`. The conversation should end with a user message, since the agent's next reply is what gets evaluated. |
    | `criteria`             | Plain-text description of what the agent's response should contain or how it should behave to pass. An LLM judge evaluates the agent's actual reply against this criteria.                                                             |
  </Accordion>

  <Accordion title="Tool Call CSV format" icon="file-csv">
    Your CSV should have three columns:

    | Column                 | Description                                                                                                                                                                                                                                    |
    | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `name`                 | A unique test name — must differ from every other test in the CSV and from any previously created test.                                                                                                                                        |
    | `conversation_history` | A JSON array of chat messages in OpenAI format. Each message is an object with `role` (`"user"` or `"assistant"`) and `content`. Should end with a user message, since the test evaluates which tools the agent calls after this conversation. |
    | `tool_calls`           | A JSON array of expected tool call objects. Use an empty array (`[]`) to assert that **no** tools should be called.                                                                                                                            |

    Each tool call object supports these fields:

    | Field                  | Type                                | Description                                                                                                                                 |
    | ---------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
    | `tool`                 | string (required)                   | The tool name — must match exactly as configured in your agent.                                                                             |
    | `arguments`            | object (optional)                   | Expected arguments the agent should pass. If omitted or set to `{}`, arguments aren't checked (equivalent to `accept_any_arguments: true`). |
    | `accept_any_arguments` | boolean (optional, default `false`) | If `true`, the test passes regardless of what arguments the agent sends — useful when you only care that the tool was called.               |
    | `is_called`            | boolean (optional, default `true`)  | Set to `false` to assert this tool should **not** be called.                                                                                |
  </Accordion>
</AccordionGroup>

4. (Optional) Tick **Assign tests to agents** and pick one or more agents — the uploaded tests are automatically added to each selected agent's test list, so you don't have to attach them manually later.

<Frame>
  <img src="https://mintcdn.com/amandalmia/TsDdvjhyewlsTagk/quickstart/images/llm-test-bulk-upload-select-agent.png?fit=max&auto=format&n=TsDdvjhyewlsTagk&q=85&s=7ceb9084718e97b83afec85fee28eabe" alt="Bulk Upload Tests Dialog" width="2238" height="1544" data-path="quickstart/images/llm-test-bulk-upload-select-agent.png" />
</Frame>

Once you confirm, the tests will be uploaded (if they are in the right format) and attached to the selected agents.

## Next steps

<CardGroup cols={2}>
  <Card title="Text to Speech" icon="microphone" href="/docs/quickstart/text-to-speech">
    Evaluate TTS providers on your dataset
  </Card>
</CardGroup>
