Appwrite Helper icon

Appwrite Helper

Utility node for building Appwrite queries, permissions, and schemas

Overview

This node performs AI-powered filtering of input items based on user-defined criteria. It supports filtering arrays of objects or strings using either preset filter templates or custom prompts. The node leverages AI models from providers like OpenAI, Anthropic, or Google to semantically analyze and filter the data. Common use cases include cleaning datasets by removing duplicates, invalid entries, test data, or filtering items by relevance or quality.

Use Case Examples

  1. Filtering a list of customer records to remove duplicates and incomplete entries.
  2. Filtering product data to keep only items that are active and meet quality standards.
  3. Using a custom prompt to filter inventory items based on price and stock status.

Properties

Name Meaning
Items to Filter Array of items to filter, which can be objects or strings.
Filter Mode Choose between using a preset filter template or a custom filtering prompt.
Preset Filter Select a specific preset filter to apply when using preset mode.
Relevance Context Context or topic used for relevance filtering when the relevance filter preset is selected.
Custom Filter Prompt Custom prompt text to filter items based on user-defined criteria when using custom mode.
AI Provider Select the AI provider to use for filtering, such as OpenAI, Anthropic, or Google.
API Key API key for the selected AI provider, required for authentication.
Model Specify the AI model to use from the selected provider.
Return Mode Choose the format of the output: filtered items only, filtered items with statistics, or both filtered and removed items separately.
Explain Decisions Option to include AI explanations for why items were kept or removed, applicable when statistics are returned.

Output

JSON

  • filteredItems - Array of items that passed the filter criteria.
  • removedItems - Array of items that were removed by the filter (if return mode includes removed items).
  • statistics
    • count - Number of items that passed the filter.
    • removedCount - Number of items removed by the filter.
    • reasoning - AI-generated explanation or reasoning for filtering decisions.

Dependencies

  • Requires an API key credential for the selected AI provider (OpenAI, Anthropic, or Google).

Troubleshooting

  • Ensure the API key is valid and has the necessary permissions for the selected AI provider.
  • If the AI model is not recognized or supported, verify the model name and provider compatibility.
  • Large input arrays may cause longer processing times or timeouts; consider batching inputs.
  • Custom prompts should be clear and specific to get accurate filtering results.
  • If explanations are enabled but missing, check if the AI provider supports returning reasoning data.

Discussion