Icon

LLM with JSON as Output

<p>This workflow demonstrates how to reliably generate <strong>structured JSON output</strong> from a large language model (LLM) and transform it into usable, structured data in KNIME.</p><p>The workflow uses a small set of customer feedback examples and shows how to:</p><ul><li><p>instruct an LLM to return <strong>valid JSON</strong> using an explicit prompt schema</p></li><li><p>understand that LLM JSON output is <strong>text</strong>, not a native JSON type</p></li><li><p>convert JSON-formatted text into a <strong>KNIME JSON column</strong></p></li><li><p>extract fields from JSON into regular table columns</p></li></ul><p>This pattern is useful whenever LLM output needs to be parsed, validated, or integrated into automated workflows such as dashboards, data pipelines, or agent tools.</p>

URL: AI docs https://docs.knime.com/ap/latest/analytics_platform_ai_extension_guide/

Get structured output (JSON) from an LLM

This workflow prompts an LLM to return valid JSON and convert the JSON-formatted text output into structured data in KNIME.


Authenticate

Select LLM

Read reviews

Create prompt

Prompt model

Convert output to JSON

Turn JSON into columns

Clearly explain desired format
Expression
OpenAI Authenticator
OpenAI LLM Selector
Credentials Configuration
product_feedback.csv
CSV Reader
LLM Prompter
String to JSON
JSON Path

Nodes

Extensions

Links