Overview
Use this stage for scenario building only with your agent’s configuration and knowledge base. When to use this:- Generating scenarios once to reuse for multiple simulation runs
- Reviewing or editing scenarios before testing
- Creating reproducible test sets for consistent evaluation
output_dir (default: ./results/scenario/) and can be used with the simulate command.
Running the Command
- Binary
- Docker
Configuration File
Understanding Key Settings
- enable_topic_modeling — Uses AI to categorize your knowledge base into topics for diverse scenario coverage
- oversample_ratio — Generates extra scenarios to ensure variety, then selects the best ones
- num_conversations_per_persona — How many different scenarios each generated user persona should have
YAML Configuration
Customize User Attributes (Optional)
A custom user attributes file lets you:- Control which attributes define simulated user personas
- Choose how values are set — from a fixed list or generated by the LLM
config.yaml) under user_attribute_file. Leave it null to use the built-in file at scenario_builder/utils/user_attributes.json.
Set the File Path
The path to the user attributes file is set in the Arksim configuration file (e.g.config.yaml used by arksim run).
| Property | Value |
|---|---|
| Config key | user_attribute_file |
| Type | string or null |
| Default | null (use built-in default) |
- Use default (null)
- Use custom file
- Relative paths are resolved from the current working directory when you run Arksim (e.g.
./config/user_attributes.json) - Absolute paths are supported (e.g.
/path/to/user_attributes.json)
If
user_attribute_file is set but the file is missing or invalid, Arksim falls back to the built-in default and logs a warning.How the File is Used
Load at scenario build
Arksim calls
load_user_attributes(user_attribute_file). If the config value is set, that path is used; otherwise the built-in default is used.Build populations
Loaded attributes drive population generation:
- Individual personas use the
individualsection - B2B / B2C personas use the
b2borb2csection based onbusiness_typein your knowledge config (e.g.knowledge.json)
Resolve each attribute
For each attribute:
generate_values: false— values are sampled from thevaluesarray (e.g. demographics, fixed categories)generate_values: true— values are generated by the LLM using the attribute’sdescription;valuescan be[]
Required Structure
The JSON file must have exactly three root keys:"individual", "b2b", and "b2c". Each root holds a tree of categories; attribute definitions are the leaves.
| Field | Type | Required | Description |
|---|---|---|---|
values | string[] | Yes | List of allowed values. Use [] when generate_values is true. |
generate_values | boolean | Yes | true = LLM generates values; false = sample from values. |
description | string | Required if generate_values: true | Short description for the LLM; ignored when generate_values: false. |
individual.demographic.age, b2b.deal_stage). Any leaf that has both values and generate_values is treated as one attribute.
Example — LLM-generated attribute:
Best Practices
When to use a custom file
When to use a custom file
Use a custom file when you need domain-specific personas (e.g. industry, deal stage, budget, company size) or want to restrict demographics to a fixed set.
Descriptions for LLM-generated attributes
Descriptions for LLM-generated attributes
Keep
description clear and short for any attribute with generate_values: true; the LLM uses it to generate realistic, consistent values.Fixed vs. generated
Fixed vs. generated
generate_values: falsefor closed sets (e.g. sex, education, deal_stage) — reproducible and easy to analyzegenerate_values: truefor open-ended fields (e.g. company name, job title, location, budget) — always provide a gooddescription
Validate and version
Validate and version
Run a small test (1–2 conversations) after changing the attributes file. Version the file with your scenario/config for reproducible runs.
Sample File
Below is a minimal valid sample with all three roots and both sampled and LLM-generated attributes.The full default file is at
simulator/scenario_builder/utils/user_attributes.json in the Arksim package. Copy and edit it as a starting point for your custom user_attribute_file.