Python
Create a test
Define population of simulated AI personas
First you need to create a new test with a test_name
, which is a set of n
hyper-realistic AI personas. You can run the same test to compare different versions of your models.
Create a test within your python code using these parameters and function:
Parameter | Example value | Type | Description |
---|---|---|---|
test_name | “TestA” | string | The name you choose for your test. |
chatbot_role | “education tutor” | string | See supported chatbot role use cases here. |
industry | “Education” | string | The industry of your chatbot |
n | 20 | integer | Number of AI personas in a test |
topic (Optional) | “Math” | string | Topic of the conversations the simulated personas will chat about |
intents (Optional) | [“help with homework”, “study for test”] | list[string] | Intents (goals) the personas want to achieve (sample from list) |
behavior_instructions (Optional) | [“ask many follow up questions”, “ask for clarification and a summary with bullet points”] | list[string] | If passed, detailed instructions for the behavior logic of the AI personas (sample from list) |
language (Optional) | “Spanish” | string | Default is English |
demographics_dict (Optional) | see example below | dict | Dictionary with detailed values for demographics |
writing_styles (Optional) | [“concise, all lowercase, with abbreviations”, “lengthy and with many typos”] | list[string] | Writing styles of the AI personas (sample form list) |
Example of demographics_dict
(optional)
demographics_dict = {
"regions": ["US", "UK", "CA"],
"age_range": [18, 65],
"female_ratio": 0.5,
"non-binary_ratio": 0.1,
"openness_range": [0.0, 1.0],
"conscientiousness_range": [0.0, 1.0],
"extraversion_range": [0.0, 1.0],
"agreeableness_range": [0.0, 1.0],
"neuroticism_range": [0.0, 1.0]
}
The function does not return any value. Only this message should be printed:
Test successfully initialized. Test name: (test_name). Personas created: (n).