This document explains the AI Filter node, which uses natural language conditions and AI to filter data by comparing two inputs.

Node Inputs

Required Fields

  • Filter By: Main content to filter

  • Value: The output you want to pass if the condition is met

  • Condition: Natural language comparison rule

    Example: “Is the provided text in Spanish”

Optional Fields

  • Output Blank Value: Return blanks for non-matches
  • Temperature: Controls decision consistency (0-1)
    • 0: More focused, consistent
    • 1: More creative, varied
  • Cache Response: Save responses for reuse

Show As Input

The node allows you to configure certain parameters as dynamic inputs. You can enable these in the “Configure Inputs” section:

  • condition: String

    • Natural language comparison rule
    • Example: “Is the provided text in Spanish”
    • Example: “Does the text contain pricing information”
  • output_blank_value: Boolean

    • true/false to control what happens with non-matches
    • When true, outputs blank for non-matching items
    • When false, skips non-matching items entirely
  • model_preference: String

    • Name of the AI model to use
    • Accepted values: “Claude 3.5 Sonnet”, “Claude 3 Haiku”, “GPT-4o”, “GPT-4o Mini”, etc.
  • Cache Response: Boolean

    • true/false to enable/disable response caching
    • Helps reduce API calls for identical inputs
  • Temperature: Number

    • Value between 0 and 1
    • Controls decision consistency
    • Lower values (closer to 0) provide more consistent filtering results

When enabled as inputs, these parameters can be dynamically set by previous nodes in your workflow. If not enabled, the values set in the node configuration will be used.

Node Output

  • Filtered Output: Values that meet your condition

Node Functionality

The AI Filter node:

  • Compares paired values
  • Uses natural language rules
  • Evaluates matching criteria

Available AI Models

  • Claude 3.5 Sonnet
  • Claude 3 Haiku
  • OpenAI o1
  • OpenAI o1 mini
  • GPT-4o
  • GPT-4o Mini
  • DeepSeek V3
  • DeepSeek R1
  • Gemini 2.0 Flash
  • Azure OpenAI
  • And more

Important Considerations

  1. Expert models (OpenAI o1) cost 30 credits, advanced models (GPT-4o & Claude 3.5) cost 20 credits, and standard models cost 2 credits per run
  2. You can drop the credit cost to 1 by providing your own API key under the credentials page
  3. Values and Filter By lists must match in length
  4. Write clear comparison conditions for accurate outputs
  5. This node relies heavily on AI model performance, which may vary depending on the complexity of your filtering conditions. For more reliable and consistent filtering:
    • Use the Filter node for straightforward comparisons and exact matching
    • Create a custom node for complex filtering logic that needs to be precise and deterministic

In summary, the AI Filter node helps you filter content by comparing pairs of values using natural language rules, perfect for complex matching and filtering tasks where some flexibility in interpretation is acceptable. For mission-critical filtering that requires exact matching or complex logic, consider using the standard Filter node or creating a custom node.