The Corticon AI Assistant can automatically generate test data for your rulesheets based on plain text instructions. This makes it easy to create input data that exercises all rule conditions, helping you validate behavior and ensure complete coverage without manually building test cases.

How it works

When generating test data for a rulesheet, the AI Assistant has access to both:
  • The rule definitions in the rulesheet.
  • The scoped vocabulary—the subset of vocabulary elements (entities, attributes, and associations) used within that rulesheet.
  • Which vocabulary elements are used as inputs versus outputs. This is important as it allows the assistant to only generate data for inputs and thus making the tests set concise and more readable.

Using this information, the AI produces structured and realistic test inputs that align with your model and reflect how the rules operate.

Generating test data automatically

The simplest way to create test data is by clicking the suggestion “Generate Test Cases”.

This command generates input records designed to exercise each rule in the rulesheet, performing a form of white box testing—testing that uses knowledge of the rule logic to ensure every condition and action path is executed at least once.

Once the response is received, the generated data is immediately added to the input in the rule test sheet. If the results are not what you intended, you can press Ctrl+Z to undo and remove the generated data. The AI Assistant only adds data—it never deletes existing data in a test sheet. Additionally, you can refine the test data by editing the tests.

Providing more focused instructions

You can guide the AI by providing more detailed or targeted prompts to shape the test generation process. For example:

• “Generate test data for 10 applicants over age 65.”

• “Create 5 inputs that will exercise Rule #3.”

• “Add examples where claims should be denied due to missing coverage.”

This flexibility lets you generate data that emphasizes specific conditions or edge cases. The AI uses your additional criteria to tailor the output while still conforming to the rulesheet and vocabulary scope.

How the scoped vocabulary influences generation

When generating test data, the AI Assistant uses the scoped vocabulary and the rulesheet’s structure to ensure all generated data fits correctly. It matches the input structure to the entities and associations actually referenced by the rules.

A good example is the Cargo sample project:

• In its default form, the Cargo rulesheet operates directly on the Cargo entity:

When you generate test data for this rulesheet, the AI uses this scope to produce inputs consisting of Cargo instances:

• If the Cargo rulesheet instead operates on FlightPlans that contain associated Cargo items, the test generator automatically adjusts:

It generates structured input where each FlightPlan includes one or more Cargo objects, reflecting the associations defined in the scoped vocabulary:

Reviewing AI Reasoning

After generating test data, the AI Assistant provides a reasoning summary describing how it interpreted your rulesheet and vocabulary to produce the test cases. This reasoning helps you understand which rules each test case exercises and how the input data aligns with the rule conditions:

Reviewing this output can confirm that the generated test data accurately represents the expected logic and provides insight into why certain combinations were chosen.