Skip to main content
Back to Components manual

Parser

On this page

Purpose

Parser formats Data or DataFrame values with a template, or converts the input to a string. It does not parse arbitrary documents, HTML, XML, CSV, or PDF files.

When to use it

  • Format structured rows for a prompt.
  • Turn a DataFrame into predictable text.
  • Convert an already structured value to a message.

How to use it

  1. Connect Data or a DataFrame.
  2. Select Parser to apply a template, or Stringify to convert the input to text.
  3. In Parser mode, enter a template such as Name: {name}.
  4. Send Parsed Text to a Prompt Template, Language Model, or output component.

Configuration

SettingWhat it controlsRecommended starting point
Data or DataFrameThe structured value to format. Required.Connect a Data or DataFrame output.
ModeSelects Parser or Stringify. The default is Parser.Use Parser when field formatting matters.
TemplateDefines the formatted text in Parser mode. It is hidden in Stringify mode. The default is Text: {text}.Replace it when the input has no exact text field.
SeparatorJoins formatted DataFrame rows. The default is a newline.Keep the default for readable multi-row output.

Expected result

Parser returns one Message containing the formatted or stringified value. Template placeholders are case-sensitive and must exactly match Data keys or DataFrame columns. Missing fields and unsupported input types return an error.

Reference details

Use a file, web, or data component to obtain structured content first. Use Parser after that step when a downstream prompt needs stable text.

Back to Components manual