Hub
Pricing About
NodeNode / Predictor

Chat Model Prompter

KNIME LabsAIModels
Drag & drop
Like

This node prompts a chat model using the provided user message, using an existing conversation history as context. An optional table containing tool definitions can be provided to enable tool calling.

Conversation history is a table containing two columns:

  • Role column : Indicates the sender of the message (e.g., 'human', 'ai', or 'tool').
  • Message column : Contains the content of the message.

If the conversation history table is non-empty, it will be used as context when sending the new message to the chat model. To use only the conversation history table for prompting (without a new message), leave the new message setting empty and ensure that the last entry in the table has the 'human' role.

In order to enable tool calling , a table containing tool definitions must be connected to the dynamic input port of the node. If tool definitions are provided, the conversation history table must include the following columns to support tool calling ( these columns will be populated by the chat model ):

  • Tool name column
  • Tool call ID column
  • Tool call arguments column

If the chat model decides to call a tool, the node appends a new 'ai' message with the above columns populated based on the selected tool. This information can then be used to route the downstream portion of the workflow appropriately. The output of the tool can then be fed back into the node by appending a new 'tool' message to the conversation history table, with the tool's output being the message content.

A common way to ensure that the tool call output is presented back to the Chat Model Prompter is to embed the node together with its tools in a Recursive Loop .

A tool definition is a JSON object describing the corresponding tool and its parameters. The more descriptive the definition, the more likely the LLM will call it appropriately.

Example:

{
    "title": "number_adder",
    "type": "object",
    "description": "Adds two numbers.",
    "properties": {
        "a": {
            "title": "A",
            "type": "integer",
            "description": "First value to add"
        },
        "b": {
            "title": "B",
            "type": "integer",
            "description": "Second value to add"
        }
    },
    "required": ["a", "b"]
}

Note : If you use the Credentials Configuration node and do not select the "Save password in configuration (weakly encrypted)" option for passing the API key for the chat model connector node, the Credentials Configuration node will need to be reconfigured upon reopening the workflow, as the credentials flow variable was not saved and will therefore not be available to downstream nodes.

Node details

Input ports
  1. Type: org.knime.python3.nodes.PythonBinaryBlobFileStorePortObject
    Chat Model

    A chat model.

  2. Type: Table
    Conversation History

    A table containing the conversation history, or an empty table.

Output ports
  1. Type: Table
    Updated Conversation

    A table containing either the extended conversation history, or only the new messages, depending on the configuration.

Tool Definitions (Dynamic Inport)

An optional table providing a set of tools the model can decide to call.

  1. Type: Table

Extension

The Chat Model Prompter node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits