Check Causality

POST

Check whether an why_prompt is causal or not.

Parameters:

  • req: CausalityRequest object containing:
    • why_prompt: The why_prompt to check for causality
    • llm_model: Language model to use for the check (optional)

Returns:

  • CausalityResponse object with the following structure:
    • is_causal: Boolean indicating whether the why_prompt is causal
    • suggestions: List of up to 3 strings, each a rephrased version of the original why_prompt as a causal why_prompt

Example Response:

1{
2 "is_causal": false,
3 "suggestions": [
4 "How does increasing the minimum wage affect employment rates?",
5 "What is the impact of regular exercise on cardiovascular health?",
6 "To what extent does parental involvement influence a child's academic performance?"
7 ]
8}

Raises:

  • HTTPException 500: If an error occurs during the causality check

Request

This endpoint expects an object.
why_promptstringRequired
llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

Response

Successful Response

is_causalbooleanOptional
suggestionslist of stringsOptional