Create Questions

POST

Generate questions for an experiment based on historical factors and constraints.

This endpoint creates a set of questions tailored to the given context, user profile, and specific dimensions of interest. The questions are designed to gather insights about the user’s decision-making process, considering both historical behavior and current constraints.

Parameters:

  • req (QuestionRequest): Contains the main question, user profile, and dimensions to explore

Returns:

  • QuestionResponse: A structured set of questions categorized by model type (history/constraints) and dimensions, each with sample responses

The response includes:

  • Two questions for each specified dimension
  • A set of sample responses for each question

Raises:

  • HTTPException 404: If there’s an error in generating the questions

Note:

  • Questions are generated asynchronously for efficiency
  • The structure is flexible and can accommodate various models and dimensions

Request

This endpoint expects an object.
why_promptstringRequired
user_profile_attributesmap from strings to lists of strings or lists of integers or lists of doublesRequired
model_dimensionsmap from strings to lists of stringsRequired
llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

Response

Successful Response

questionstring
sample_responseslist of objects