Hub
Pricing About
WorkflowWorkflow

Mitigate hallucinations in LLMs with RAG

OpenAIFAISSVector StoreAI
keith_mccormick profile image
Draft Latest edits on 
Aug 5, 2024 3:59 PM
Drag & drop
Like
Download workflow
Workflow preview
Mitigate hallucinations in LLMs with RAG

This workflow shows how to mitigate factual hallucinations in LLM responses about KNIME nodes for deep learning by implementing a RAG-based AI framework. The question we ask is: "What KNIME node should I use for transfer learning?"

We first import and embed a knowledge base containing the node descriptions of the KNIME Deep Learning - Keras Integration. Next, we create a Vector Store of that knowledge base and export it.

We implement a RAG process where we query the Vector Store and retrieve documents (5) that are most similar to the query. Next, we use the retrieved documents to augment the prompt with more context. Finally, we prompt ChatGPT to generate a response.

External resources

  • Mitigate hallucinations in LLMs using RAG with KNIME? (Blog)
  • What are hallucinations in AI? (Blog)
  • OpenAI API Keys
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 5.2.0
  • Go to item
    KNIME AI Extension (Labs)Trusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    knime
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    knime
  • Go to item
    KNIME Excel SupportTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    knime
  • Go to item
    KNIME JavaScript ViewsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.2.0

    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