h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node operation "Extract Information From One or More Contexts Using an LLM" under the "Model" resource allows users to extract structured information from multiple text contexts using a large language model (LLM). It is designed to send a list of raw text strings (contexts) to an LLM, optionally with pre- and post-prompts, system prompts, and additional configuration options, to obtain extracted data or summarized insights.

Common scenarios where this node is beneficial include:

  • Extracting key facts or entities from multiple documents or text snippets.
  • Summarizing or synthesizing information from various sources into a concise output.
  • Automating data extraction workflows where input comes from diverse textual contexts.
  • Enhancing knowledge bases by processing unstructured text through an LLM.

Practical example:
You have several customer feedback texts and want to extract sentiment, key issues, and suggestions. You provide these texts as the context list, optionally add guiding prompts, and the node uses an LLM to extract the desired structured information.

Properties

Name Meaning
Model Name Name of the large language model (LLM) to use for extraction. Use "auto" if you do not require a specific model.
Additional Options A collection of optional parameters to customize the extraction:
- Guardrails Settings JSON object specifying guardrails or PII detection settings to control how sensitive information is handled during extraction.
- Llm Args JSON map of arguments sent to the LLM with the query, e.g., temperature (double, default 0.0) to modulate randomness in generation.
- Pre Prompt Extract Text prepended before the list of input texts; if unset, inputs will be summarized by default.
- Prompt Extract Text appended after the list of input texts; if unset, inputs will be summarized by default.
- System Prompt Text sent to models supporting system prompts to give overall context on how to respond. Use "auto" for automatic selection.
- Text Context List The list of raw text strings (contexts) to be processed by the LLM for extraction.
- Timeout Timeout in seconds for the request execution. Default is 0 (no timeout).

Output

The node outputs the response from the LLM extraction API call. The main output is a JSON object containing the extracted information based on the provided contexts and prompts. The exact structure depends on the LLM's response but typically includes fields representing the extracted data or summary.

If the LLM supports binary data output, it would be included accordingly, but this operation primarily deals with JSON/textual extraction results.

Dependencies

  • Requires connection to an external AI service providing LLM capabilities.
  • Needs an API key credential configured in n8n to authenticate requests to the LLM service endpoint.
  • The base URL and authentication headers are set via credentials and environment variables within n8n.

Troubleshooting

  • Timeouts: If the extraction takes too long, increase the "Timeout" property or check network connectivity.
  • Invalid Model Name: Using an unsupported or misspelled model name may cause errors; verify available models.
  • Malformed JSON in Additional Options: Ensure that JSON fields like "Guardrails Settings" and "Llm Args" are valid JSON objects.
  • Empty Text Context List: Providing no input texts will result in no meaningful output; ensure "Text Context List" is populated.
  • API Authentication Errors: Confirm that the API key credential is correctly set up and has necessary permissions.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.

Discussion