Create Attributes And Levels

POST

Create attributes and levels for a given idea (why_prompt).

Parameters:

  • req: AttributesLevelsRequest object containing:
    • idea: The main concept or prompt
    • country: Target country
    • num_levels: Number of levels per attribute (optional)
    • max_length: Maximum length for levels (optional)
    • llm_model: Language model to use (optional)
    • num_attrs: Number of attributes to generate (optional)

Returns:

  • List of attributes with their levels.

Example Response:

1[
2 {
3 "attribute": "Price",
4 "levels": [
5 "The car costs $30,000",
6 "The car costs $40,000",
7 "The car costs $50,000",
8 "The car costs $60,000",
9 "The car costs $70,000"
10 ]
11 },
12 {
13 "attribute": "Safety Rating",
14 "levels": [
15 "The car has a 3-star safety rating",
16 "The car has a 4-star safety rating",
17 "The car has a 5-star safety rating",
18 "The car has a 5.5-star safety rating"
19 ]
20 }
21]

Raises:

  • HTTPException 404: If an error occurs during creation

Request

This endpoint expects an object.
ideastringRequired
countrystringRequired
prompt_typeenumOptional
Allowed values: genericserviceproductexperiencepolicy

Enum representing the type of prompts used in experiment designs.

llm_modelenumOptional

Enum representing the llm model types used in the experiments.

num_attrsintegerOptional

The number of attributes in the experiment. This value must be an integer between 2 and 7, inclusive. If not provided, the default value is 4. Each attribute represents a characteristic or feature of the experiment.

num_levelsintegerOptional

The number of levels in the experiment. This value must be an integer between 2 and 5, inclusive. If not provided, the default value is 4. Each level represents a different possible value or state of an attribute.

max_lengthintegerOptional

The maximum # Characters per attribute. This value must be an integer between 40 and 80, inclusive. If not provided, the default value is 40.

Response

This endpoint returns a list of objects.
attributestring
levelslist of strings