OpenAI Tool Eval
π Basic Infoβ
The OpenAI Tool Eval node acts as a container/placeholder for OpenAI tool calls.
- The OpenAI node evaluates a userβs prompt and decides which function to call.
- Each Tool Eval node has a Match Function Name. If the OpenAI node calls a function with the same name, this Tool Eval node captures the parameters passed along.
- The node itself does not decide logic; it simply holds and exposes the values sent from the OpenAI node.
π₯ Inputsβ
The inputs to this node are parameters passed by the OpenAI node, based on the function call it selects.
- The parameters come directly from the OpenAI nodeβs tool call response.
- These are typically strings, but the OpenAI node can be configured to pass them as JSON for structured data.
π€ Outputsβ
The Tool Eval node outputs the extracted parameters from the OpenAI tool call:
- Result Property Name (required) β Defines the name of the JSON object containing the tool eval output.
- Must be unique across all nodes in the workflow.
This output can then be consumed by downstream nodes to branch logic or continue processing.
βοΈ Parameters/Optionsβ
The node requires users to configure three key fields:
| Setting | Description | Required | Default |
|---|---|---|---|
| Match Function Name | The function name to match against the OpenAI nodeβs tool call. | β | None |
| Full Response Property Name | The property name from the OpenAI node that holds the tool call data. | β | None |
| Result Property Name | The output JSON object name for this Tool Eval nodeβs result. Must be unique. | β | None |
π‘ Example Usageβ
Suppose you want your workflow to handle multiple possible user intents:
- A customer asks: βWhatβs the weather in Paris?β
- The OpenAI node evaluates the prompt and decides to call the getWeather function.
- The OpenAI node captures the parameters (e.g.,
{ "city": "Paris" }) and passes them along. - The OpenAI Tool Eval node with Match Function Name = getWeather will receive these parameters.
- Downstream nodes can then process the weather request, while other Tool Eval nodes handle different functions like getStockPrice or bookFlight.
This enables branching workflows where OpenAI dynamically decides which path to take.
π¨ Error Handlingβ
- Missing Match Function Name β If this is not set correctly, the node will never trigger.
- Duplicate Result Property Name β Will cause conflicts with other nodes. Each result property must be unique.
- Improper Parameter Formatting β If parameters are not passed in the expected format (string vs JSON), downstream nodes may fail.
π Best Practicesβ
- Always use clear, descriptive function names in the OpenAI node to avoid confusion.
- Ensure that Result Property Names are unique across the workflow.
- Force JSON formatting in the OpenAI node for structured outputs, especially when passing complex data.
- Use Tool Eval nodes to design flexible branching workflows where OpenAI decides the flow based on user intent.