Hub
Pricing About
WorkflowWorkflow

Open AI Model Fine-tuning

Release 5.3AIOpenAIGenerative AIChatGPT
+1
knime profile image
Versionv1.0 KNIME AP 5.3 ReleaseLatest, created onΒ 
Jul 10, 2024 1:51 PM
Drag & drop
Like
Download workflow
Workflow preview

This workflow demonstrates how to improve a chat model's performance by applying fine-tuning.

Ultimately, we compare the output of the 'Just KNIME it!' challenge descriptions, designed to test chat models' accuracy, based on our input: Title: UEFA Euro 2024 Winner Prediction and Level: Hard.

You can download and run the workflow locally. For optimal performance, please use the latest version of the KNIME Analytics Platform.

Workflow Step-by-Step

  1. Prepare Fine-Tuning Data

    • Parse PDF Files: Extract the challenge descriptions and levels of difficulty from the PDF files containing all challenges from the first two seasons of "Just KNIME it!" (see the output of the "Extract Challenges" metanode).

    • Format Data: Prepare the data for the Fine-Tuning input port as the OpenAI Chat Model Fine-Tuner requires. The data should be presented across three columns:

      • A column specifying a conversation ID.

      • A column representing the role of a message (system, assistant, and user).

      • A column for the content of the message.

    • Ensure the table includes at least ten conversations, each containing at least one system message (see the Prepare Conversations metanode output).

  2. Fine-Tune the Chat Model

    • Pass the fine-tuning data to the OpenAI Chat Model Fine-Tuner node and execute it. This process can take some time.

  3. Generate Challenge Descriptions

    • Use two Chat Model Prompter nodes: one connected directly to the OpenAI Chat Model Connector node and the other to the OpenAI Chat Model Fine-Tuner node.

    • Use the same system message for both nodes: "You are a Just KNIME it challenge generator. As input, you receive a difficulty level and a title for the challenge, and your task is to create a description for the challenge."

    • Provide the same input message: "Title: UEFA Euro 2024 Winner Prediction Level: Hard."

  4. Visualize and Compare Outputs

    • Click the lens icon in the component to open the visualization and compare the responses from the untuned vs. fine-tuned chat model prompters. The fine-tuned Chat Model Prompter response should be very close to the real "Just KNIME it!" challenge descriptions.

External resources

  • Just KNIME it!
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 5.3.0
  • Go to item
    KNIME AI ExtensionTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME ExpressionsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME TextprocessingTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime
  • Go to item
    KNIME ViewsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime profile image
    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

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