Context Reasoning

Answer questions accurately based on a given document or knowledge source — without hallucinating what isn't there. The core skill behind doc Q&A, support bots, and internal knowledge lookup.

100
Duration
13s
Input Tokens
81458
Output Tokens
533
Cost
$0.12
Context
Input
In the blogpost 'Agentic customer service chatbot with tools, tracing and evals' a python function is created to identify the user intent. What is the name of this function? def name_of_function(messages)
Expected output
determine_intent
Model output
The name of the function is `determine_intent`. In the blogpost, it is defined as:

```python
def determine_intent(messages):
    intent, _ = opper.call(
        name="determine_intent",
        instructions="Analyze the user message and determine their intent. Supported intents are get_order_status and query products.",
        input={"messages": messages},
        output_type=IntentClassification
    )
    return intent
```

This function analyzes conversations to classify user intent into three categories: `get_order_status`, `query_products`, or `unsupported`, using a structured `IntentClassification` output type with `thoughts` and `intent` fields.