Skip to main content

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:

SettingDescriptionRequiredDefault
Match Function NameThe function name to match against the OpenAI node’s tool call.βœ…None
Full Response Property NameThe property name from the OpenAI node that holds the tool call data.βœ…None
Result Property NameThe 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.