Skip to main content

What are Accuracy Tests?

Accuracy tests in Galtea are designed to evaluate the quality, accuracy, and correctness of your product’s outputs. These tests typically consist of questions or prompts paired with ideal answers, allowing Galtea to assess how well your product’s responses match the expected standard.

Creating Accuracy Tests

You can create accuracy tests in Galtea through two methods:
1

Prepare your knowledge base file

Create a file containing all the information that the Product should know and adhere to
2

Configure the test

Select Accuracy as the test type and Generated as the test origin
The test creation process can be done via the SDK or the Galtea dashboard
3

Generate the test

Galtea will process the Knowledge Base and generate a Test File containing Test Cases for you

Example Accuracy Tests and File Format

Here are examples of the content and its creation-document structure:
This structure is the required by Galtea in order to automatically generate the test cases for your test. If that format is not provided, you can still manually create the test cases.
For automatic processing, the file format must be CSV.
The extent of the examples provided above are short extractions. In the actual CSV files they can be much longer and the amount of test cases (rows) can be much higher.

Structure of Accuracy Tests

Accuracy tests have a specific structure designed to facilitate effective evaluation:
Number
required
A unique identifier for the test instance.
Text
required
The question or prompt that the product is expected to respond to. This can be a plain string or a JSON object for structured inputs.Plain string example: "What are three key provisions of the GDPR related to data subject rights?"Structured JSON example: {"user_message": "What are the GDPR provisions?", "domain": "legal", "language": "en"}When placing structured JSON in a CSV file, wrap the entire value in double quotes and escape internal quotes by doubling them: "{""user_message"": ""What are the GDPR provisions?"", ""domain"": ""legal"", ""language"": ""en""}"When using structured JSON input, the user_message field is used as the primary message content. Additional fields are accessible via {{ input.field_name }} in endpoint templates and via TestCase.input_data / messages[0].metadata in the SDK.
Text
The expected answer to the question, serving as a benchmark for evaluation. Example: “The GDPR provides several key rights to data subjects, including: the right to access, the right to be forgotten, the right to rectification, the right to restrict processing, the right to data portability, and the right to object to processing.”
Text
A categorization tag for the test instance. Example: “original”
Text
The source text used to generate the test case, which can be a section of a document, a webpage, or any other relevant material. This field is particularly useful for tracing the origin of the information used in the test case.Example: “GDPR Guidelines Document (2018): The General Data Protection Regulation (GDPR) is a regulation in EU law on data protection and privacy in the European Union and the European Economic Area…”

Create a Test

Step-by-step tutorial on creating and uploading custom tests using the SDK.

Test Cases

Understand how test cases are structured and used in evaluations.