For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test Dataset Management

Create test datasets, systematically manage test cases, and verify Agent response quality

What Is a Test Dataset?

A test dataset is a collection of prepared test cases used to verify the quality and accuracy of Agent responses. By creating standardized test datasets, you can:

Ensure Response Quality

  • Verify that Agent responses to common questions meet expectations

  • Ensure that responses do not degrade after knowledge base updates

  • Continuously track trends in response quality

Improve Efficiency

  • Test multiple questions in batches without manually checking each one

  • Create reusable test cases to save testing time

  • Quickly identify issues and make timely adjustments

Team Collaboration

  • Manage all test cases in one place

  • Let team members maintain test data together

  • Track who created each test case and when it was updated

How to Access Test Dataset Management

Open "AgentOps" in the left sidebar and click "Test Datasets" to view the test dataset management page.

The page displays the following information:

  • Test Dataset ID: A unique identifier automatically generated by the system

  • Test Dataset Name: The name you assign to the dataset

  • Single-Turn Test Case Count: The number of enabled single-turn cases in this dataset

  • Multi-Turn Test Case Count: The number of enabled multi-turn cases in this dataset, rather than the number of conversation turns

  • Created By: The user who created the dataset

  • Created At: The date and time the dataset was created

  • Last Updated: The time the dataset was last modified

  • Action Buttons: Functions such as editing and deleting

Use Case: Checking Case Counts

A customer service supervisor wants to confirm that the question bank covers both single question-and-answer interactions and service scenarios that require back-and-forth confirmation. She opens AgentOps → Test Datasets, finds the dataset to check, and looks at Single-Turn Test Case Count and Multi-Turn Test Case Count separately. This shows how many enabled cases each type contains, helping her decide whether to add more questions.

The test dataset list shows a single-turn test case count of 3 and a multi-turn test case count of 2 in separate columns
The two case types are counted in separate columns; the multi-turn count of 2 in the image means two cases, rather than two conversation turns.

Both columns count only enabled cases. Disabled cases are excluded; when a type has no enabled cases, its column displays 0.

Create a Test Dataset

1. Start Creating

Click the "Create Test Dataset" button in the upper-right corner of the page to start creating a new test dataset.

2. Set Basic Information

In the "Create New Test Dataset" dialog, enter the following information:

Test Dataset Name (Required)

  • Use a meaningful name, such as "Product Inquiry Test Dataset" or "Customer Service FAQ Tests"

  • Make it easy to manage and identify the dataset's purpose later

Test Dataset Description (Optional)

  • Describe the purpose and scope of this test dataset

  • For example: "Tests the product specification inquiry feature, covering 50 common product questions"

The Create New Test Dataset dialog has only two fields: the required Test Dataset Name and the optional Test Dataset Description
Create New Test Dataset

Test datasets are not tied to an Agent. You choose which Agent to test when you create an evaluation in Automated Testing, and the same test dataset can be used to test different Agents.

3. Add Test Cases

After you click "Confirm", you go directly to the settings page of this test dataset (to return later, click the "Edit" icon in the action column of the list). Click "Test Cases" on the left, and then click "Add Test Case". The first field in the dialog, "Select Creation Method", offers three options:

Creation Method
Suitable Scenario
Description

Manual Entry

Adding one or two questions at a time

Enter the question and expected answer yourself

Import

You already have an organized question bank

Upload CSV/XLS/XLSX files to import multiple questions at once

Generate from Knowledge Base Files

You just uploaded a knowledge base and have no questions yet

AI automatically creates questions based on knowledge base file contents

Each test case includes:

Question

  • A question users might ask (up to 1000 characters)

  • Include a variety of phrasings and scenarios

Expected Answer

  • How the Agent should respond (up to 2000 characters)

  • Can be keywords, sentences, or complete paragraphs

  • During evaluation, the evaluation model compares the actual response with the expected answer

Manual Entry

Select "Manual Entry", fill in "Question" and "Expected Answer", and click "Confirm". For the "Flaky" toggle below, see Mark Flaky Test Cases.

Import from Files

Select "Import" and drag files into the "Upload Files" area or click to select them. You can upload multiple files at once:

  • Supported formats: CSV, XLS, XLSX; each file must not exceed 10MB

  • The first row must contain column headers, including question (question) and ground_truth (expected answer); other columns are ignored

  • After a successful import, "Test cases imported successfully" appears, and the corresponding number of cases is added to the list; imported cases show Import under "Creation Method"

Generate from Knowledge Base Files

Select "Generate from Knowledge Base Files" to have AI read the knowledge base files you specify and automatically generate "question + expected answer" pairs:

  1. Enter the number of questions to generate (1–50) in "Number of Questions to Add".

  2. Click "Select Knowledge Base Files". In the dialog, search for and select a knowledge base on the left, check the files to use on the right (up to 50 files; the progress bar above shows how many are selected), and click "Confirm Selection". Only fully processed documents can be selected; unsupported file types are automatically filtered out.

  3. Click "Confirm". The system displays "Test case generation task submitted and processing in the background", and the progress "Generating test cases (N/M questions generated)" appears above the test case list. Progress also appears in the "Single-Turn Test Case Count" column of the dataset list. Refresh after completion to see the new questions, whose "Creation Method" is Generate from Knowledge Base Files.

The requested number of questions is the upper limit; fewer questions may be generated if the file contents are insufficient. After generation completes, review each question and edit expected answers or remove unsuitable questions as needed—automatic generation is a starting point, not the final answer.

Generation History and Generation Details

"Generation History" in the upper-right corner of the test case list shows each automatic generation task for this dataset:

Field
Description

Status

Pending/Generating/Completed/Partially Completed/Failed

Actual / Requested

Number of questions generated/Number of questions requested

Error Summary

A summary of the cause of failure or partial completion

Created At

The time the task was submitted

Click "View" in the action column to open "Generation Details". You can see the number of "Processed Files" and "Results by File": each file's status, "Generated Count", and "Error Reason". A "Partially Completed" status usually means some files could not be parsed; the results by file identify which ones.

Mark Flaky Test Cases

When adding or editing an individual test case, you can enable the "Flaky" toggle. During automatic evaluation, cases marked as flaky still run and retain their results, but are excluded from the pass rate (both numerator and denominator). This is useful for questions with multiple reasonable answers or unstable results due to dependencies on external live data: keep them to observe trends without lowering the overall pass rate. Metric statistics on the evaluation results page cover all completed cases, including flaky ones.

Batch Delete

The "Batch Delete (N)" button is located above the test case list. Select cases to enable it (it is disabled when nothing is selected), then confirm to delete all selected cases at once.

Test Case Examples:

4. Multi-Turn Conversation Test Cases

Single-turn test cases check a "single question and answer". To test tasks that require back-and-forth confirmation (such as asking for an order number before confirming the reason for a return), click "Multi-Turn Conversation Test Cases" on the left side of the dataset. These cases are only used by evaluations of the "Multi-Turn Conversation" type; see Evaluate Multi-Turn Conversations.

Click "Add Multi-Turn Test Case" and fill in:

Field
Description

Scenario (Required)

The task scenario the simulated user wants to accomplish, such as "The user wants to check last month's orders and request a return"

Expected Outcome (Required)

The outcome that should be achieved in a successful conversation, which also serves as the condition for stopping the simulation, such as "Successfully provide the return procedure and confirm the order number"

Simulated User Persona (Optional)

The simulated user's tone, background, and expertise, such as "An older user unfamiliar with online shopping, polite but easily confused"

Status

Enabled/Disabled; disabled cases are not run during evaluation

Flaky

As with single-turn cases, marked cases are excluded from the pass rate

You can also click "Generate from Knowledge Base", enter the number of questions, and select knowledge base files. AI synthesizes multi-turn cases with "scenario + expected outcome" based on file contents. The process is the same as Generate from Knowledge Base Files for single-turn cases; refresh the list after completion.

Manage Test Datasets

Search for Test Datasets

Use the search bar at the top of the page to quickly find a dataset by:

  • Test dataset ID

  • Test dataset name

  • Keywords in the description

After you enter keywords and press Enter, the system filters and displays matching datasets; clear the search field to show all datasets again.

Edit Test Datasets

Click the "Edit" button in the action column to:

  • Modify the test dataset name and description

  • Add, edit, or delete test cases

Review and update test cases regularly to ensure they stay aligned with actual business needs

Delete Test Datasets

Click the "Delete" button in the action column to delete test datasets you no longer need.

Test Dataset Best Practices

1. Create Structured Test Categories

Group test cases according to business needs:

2. Cover Multiple Phrasings

The same concept can be phrased in different ways. Include the following in your test cases:

3. Include Edge Cases

Test extreme situations and ambiguous questions:

  • Incomplete questions: "Price", "What should I do"

  • Questions with typos: "Product specifcations"

  • Compound questions: "How much does it cost? Can I return it? What colors are available?"

  • Questions outside the knowledge scope: Test how the Agent responds

4. Update Test Data Regularly

  • When new features launch: Add corresponding test cases

  • After knowledge base updates: Check whether related test cases need adjustments

  • When an issue is discovered: Immediately add a test case for that scenario to prevent recurrence

  • Regular reviews: Review test cases monthly or quarterly to ensure they still reflect current conditions

5. Set an Appropriate Number of Tests

Each test dataset should contain:

  • At least 20 test cases: Cover basic scenarios

  • Recommended 30-50 test cases: Balance test coverage and execution time

  • 100+ cases for special situations: Suitable for complex business logic

Frequently Asked Questions

Q1: How Are Test Datasets Related to Automatic Evaluation?

Test datasets are the foundation of automatic evaluation. Create a test dataset first, then create an evaluation in "Automated Testing" under AgentOps and select the dataset and Agent. The system automatically runs the tests and generates an evaluation report.

For more information, see: Automatic Evaluation

Q2: Can One Test Dataset Test Multiple Agents?

Yes. During automatic evaluation, you can use the same test dataset with different Agents to compare their performance on identical test cases.

Q3: Do Expected Responses Need to Match Exactly?

No. During evaluation, the evaluation model compares the Agent's actual response with the expected answer and determines whether it passes based on the score and pass threshold of each evaluation metric. It is not a word-for-word or keyword match; it is enough for the expected answer to state the key points the response must cover. See Automated Testing for details.

Q4: How Do I Import a Large Number of Test Cases?

Select "Import" in "Add Test Case" and upload a CSV/XLS/XLSX file containing the question and ground_truth columns; see Import from Files. If you do not have a question bank yet, use Generate from Knowledge Base Files to let AI create initial questions.

Q5: Can Test Datasets Be Shared with Other Organization Members?

Yes. Within the same organization, members whose role has the "Test Dataset Permissions" permission can view and use test datasets (see the organization's role management for role permission settings). The "Created By" column identifies who created each dataset, making team collaboration easier.

Q6: Do Related Test Datasets Disappear When an Agent Is Deleted?

No. Test datasets are managed independently and remain even if an Agent is deleted. You can use the same dataset to test other Agents.


Next Steps

After creating a test dataset, you can:

  • Go to Automatic Evaluation to run tests and view results

  • Track actual Agent performance through Agent Monitoring

  • Adjust knowledge base content or Agent settings based on evaluation results

Last updated

Was this helpful?