跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / ai / aiagents

Information Extractor

Extract structured information from a text using a LLM

AI 扩展程序网页应用

此内容尚不支持你的语言。

Pull named pieces of information (a name, a date, an amount) out of free text with a chat model.

工作流 · selection-to-todoist.awf 4 个步骤

Selection to Todoist Task:包含 4 个步骤的工作流,从 Right-click a selection 开始,到 Create the Todoist task 结束。

Information Extractor sends Text to the chat model connected to its Model slot and asks it to extract the fields you list in What to extract. The result comes back in one field, extracted.

Without an output parser, extracted is the model’s reply as text. Connect a Structured Output Parser to the Output Parser slot to get a real object whose fields you can use in later nodes.

  • Read an invoice or order email and pull out the customer, date and total.
  • Turn a support message into fields (product, problem, urgency) before saving it to a sheet.
  • Collect contact details from a page you are visiting.

To rewrite or answer freely, use Basic LLM Chain. To pick one label for the text, use Text Classifier.

设置项类型作用
Text (必填)Long textThe text to extract information from.
What to extract (必填)Long textDescribe the fields to extract, or connect an Output Parser.
Options GroupThe options for the node.
Options › System message Long textThe system message to use.

Fill Text with an expression such as {{ $input.text }}.

What to extract is required even when an output parser is connected. List each field and its format, for example: customer name, invoice date (YYYY-MM-DD), total amount as a number, currency code.

Use System message under Options for extra rules, such as Leave a field empty when it is not in the text.

  • Output

Each output item has these fields:

Field类型What it holds
extracted AnyThe data the model extracted
Shape of an output item
{
"extracted": null
}

With a Structured Output Parser connected, read single fields downstream with expressions such as {{ $input.extracted.total }}. Without one, extracted is text, so field access does not work.

SlotAcceptsConnections
Model (必填)chat modelOne node.
Output Parser output parserOne node.
  1. Get Selected Text reads an order email you highlighted, with Output field name text.
  2. Information Extractor with Text {{ $input.text }} and What to extract customer name, order number, total. Connect an Chat OpenAI model and a Structured Output Parser with JSON Output Example { "customer": "Jane Doe", "orderNumber": "A-1042", "total": 59.9 }.
  3. Display Object shows extracted, or a Google Sheets node appends {{ $input.extracted.customer }} and {{ $input.extracted.total }} as a row.
  • {{ $input.extracted.field }} is empty. No output parser is connected, so extracted is plain text. Connect a Structured Output Parser.
  • The parser fails on the reply. The model answered with extra text around the data. Add an Auto-fixing Output Parser, or use a stronger model.
  • “Dependency model is required”. Connect a chat model to the Model slot.
  • “Model not found”. The connected model node is not set up: open it and choose a model and its credential.
  • Fields are guessed when missing from the text. Say in System message to leave missing fields empty.
Turn highlighted text into a Todoist task 入门 · 6 分钟 需要连接
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Information Extractor”