Tests
Save the questions your agent must always get right, then run them to check every answer after a change.
A test question is a question with the facts a right answer must give. A test run asks the agent every question and checks whether each answer gives those facts, in any wording.
Before you start
- Only Owners and Admins can see the Tests tab, add questions and run tests.
- Test runs need the Professional or Enterprise plan.
- In the sidebar, under Build, click Learning, then the Tests tab.
Add a test question
Click Add question.
Fill in the form:
| Field | What to enter |
|---|---|
| Question | 5 to 500 characters, for example "What are your opening hours on Saturday?" |
| Expected answer | The facts a right answer must give, in plain words. 2 to 1,000 characters, for example "9 AM to 1 PM." |
| Include in test runs | On to ask it in runs. Off keeps it without asking it. |
Click Add question. You see "Test question added".
Approving a lesson that has a test also adds a question. Those show a From a lesson badge.
Run the tests
Click Run tests.
Pick the Agent to test. The window shows how many questions it will answer.
Click Run tests. You see "Test run started" and the run's page opens. A run takes a few minutes.
Read the results
The Test runs list shows each run's start time, agent, status (Running, Completed or Failed) and Passed, for example "18 of 20". The score is green at 80% or more, yellow at 50% or more and red below.
Click a run to open it. Each question shows:
- Passed or Failed.
- Expected: the answer you saved.
- Answer: what the agent said.
- Why: one sentence explaining the grade.
How answers are graded
- An answer passes when it gives the expected facts and contradicts none of them.
- "I couldn't find it" fails, unless that is the expected answer.
- The agent answers the way it does in a typed chat. It can search documents, notes, past conversations and playbooks. It does not make changes in your apps and does not save notes or lessons during a test.
Limits
| Item | Limit |
|---|---|
| Test questions per workspace | 100 |
| Questions asked in one run | 50 |
| Runs per day | 5 per workspace |
| Runs at a time | 1 |
| Plans | Professional and Enterprise |
When Run tests is greyed out
| Message | Fix |
|---|---|
| "Test runs are included in the Professional plan and up." | Move to Professional or Enterprise. |
| "Add a test question first, or turn one on." | Add a question, or turn on Include in test runs for one. |
| "A test run is going. Wait for it to finish." | Wait for the current run. |
| "Up to 5 test runs a day. Try again later." | The limit counts the last 24 hours. Try again later. |
Tips
- Keep expected answers to the facts. "9 AM to 1 PM" is enough.
- Run the tests after you change instructions, publish an agent or approve several lessons.
- Add a question each time a customer gets a wrong answer, so it cannot happen again unnoticed.