0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

AI → Extract Customizable Information From Text

AI-generated

Overview

This node operation extracts customizable information from a given text based on user-defined fields and context. It is useful for scenarios where specific data points need to be identified and extracted from unstructured text, such as extracting contact details, product information, or any other structured data from a text block. Users provide the text, a contextual prompt to guide the extraction, and an array of fields specifying the names, descriptions, and optional validation regex patterns for the information to be extracted.

Use Case Examples

  1. Extracting customer contact information from email bodies by defining fields like 'Name', 'Phone Number', and 'Email Address' with descriptions and validation patterns.
  2. Extracting product details from product descriptions by specifying fields such as 'Product Name', 'Price', and 'SKU'.
  3. Extracting key data points from legal documents by providing context and fields relevant to the document type.

Properties

Name Meaning
text The input text in which the information will be searched and extracted.
context A prompt that provides context to guide the extraction process, helping the AI understand what kind of information to look for in the text.
fieldsUI An array of objects defining the fields to extract from the text. Each object includes a 'Name' (key for the field), a 'Description' (prompt describing the kind of information expected), and an optional 'Validation Regex' to validate the extracted data.
codeVariablesUi Optional code variables that can be used within the extraction logic, allowing dynamic assignment of values to variables defined in the code editor.

Output

JSON

  • extractedData - The extracted information from the text based on the provided fields and context.

Dependencies

  • Requires an API key credential for the CodeKit API to perform the extraction.

Troubleshooting

  • Ensure the 'text' and 'context' fields are properly filled as they are required for the extraction to work.
  • Make sure the 'fieldsUI' array has consistent numbers of 'Name', 'Description', and 'Validation Regex' entries to avoid mismatches.
  • If extraction results are inaccurate, refine the 'context' prompt to better guide the AI on what information to extract.
  • Check API key credentials and network connectivity if the node fails to communicate with the external service.

Discussion