Skip to content
KNIME Documentation
Main Navigation Get startedBuildWork with KnimeAccount and adminRelease notesDeveloper tools
Community Hub
DevelopersKnime 2.0
Sidebar Navigation

Getting Started

Installation

User Guide

Release Notes

Install Extensions

Building Workflows

Components

Flow Control

Expressions

File Handling

Deployment

Integrated Deployment

Workflow Invocation

Best Practices

Advanced Features

AI Extension

Get Started

Build an Agent

Inject context with RAG

LLM Providers

Tutorials

Summarize product reviews

Product FAQ assistant

Restaurant agent

Your first local agent

Task extractor

Reporting

Kerberos

Extensions

Database

Overview

Tutorials

Read and filter data from a database

Write a transformed dataset to a database

Concepts

Ports and Sessions

Query Generation

Type Mapping

Deprecated Framework

Connecting

Connect: Dedicated Node

Connect: File-Based Database

Connect: Generic DB Connector

Register a JDBC Driver

Install Third-Party Driver Plug-in

Drivers on Hub and Server

Kerberos Constrained Delegation

Reading and Transforming

Read Data

Transform Data Visually

Run a Custom SQL Query

Parameterize a Query

Writing and Modifying

Insert, Update, or Merge

Delete Rows

Bulk Load Data

Create and Remove Tables

Use Transactions

Reference

Connector Node Settings

JDBC Driver Reference

Deprecated Node Mapping

Migrate Deprecated Workflows

Python

Overview

Tutorials

Python Scripting Quickstart

Data App Development Using Plotly

Data Processing

K-AI Scripting Assistant

Data Type Conversion

Batch Processing

Jupyter Integration

Environment Management

Pixi Configuration

Dependency Management

Environment Persistence

Channel Mirrors & Air-Gapped Setups

Conda Migration

Alternative Configurations

Conda and Miniforge Setup

Conda Environment Propagation

Manual Python Configuration

Legacy Node Migration

Concepts

Pixi Backend Architecture

Storage Logic

Python Environments on Executors

Reference

Python Scripting API

Bundled Packages

Executor and Hub Configuration

Troubleshooting Guide

API Reference

Inputs and outputs

Classes

Views

Utility functions

R

Deep Learning

Snowflake

Google Cloud

Azure

AWS

Big Data

Big Data Admin

Big Data Secured Cluster

Databricks

Microsoft Fabric

Power BI

Tableau

Report Designer

H2O

Changelogs

Version 5.12

Version 5.11

Version 5.10

Version 5.9

Version 5.8

Version 5.7

Version 5.6

Version 5.5

Version 5.3

Extensions

Retrieve context ​

Retrieve the most relevant documents from a vector store based on a user query.

Context retrieval is the step where semantic search happens: a query is embedded and compared against stored document embeddings to find the most similar content.

When this is useful ​

Retrieve context when you want to:

  • Find documents related to a user question
  • Ground model responses in external knowledge
  • Prepare context for retrieval-augmented generation (RAG)

If you don’t yet have indexed documents, start with Create a vector store.

Retrieve context in KNIME ​

Prerequisites
  • A vector store (FAISS or Chroma)
  • The same embedding model used to create the store
  • A query provided as text (string column)

Retrieving context consists of three steps:

  1. Load the vector store
  2. Provide a query
  3. Retrieve the most similar entries

Step 1: Load the vector store ​

If the vector store was created in the same workflow, you can pass it directly to the retriever.

If the store was saved earlier, load it using the Model Reader node. For details on saving and loading vector stores, see Reuse a vector store.

Step 2: Provide a query ​

Provide the query you want to search for in the vector store. This is simply a string value and can come from any upstream node.

Step 3: Retrieve relevant context ​

Use the Vector Store Retriever node to perform the search.

The Vector Store Retriever performs two operations:

  1. Creates an embedding of the query
  2. Finds the most similar results from the vector store

To create the query embedding, the node needs the same embedding model that was used to embed the documents in the vector store. If a remote embedding model was used, this means you need:

  • an active internet connection
  • valid credentials to access the model

Configure the node to:

  • use the same embedding model as the vector store
  • embed the query automatically
  • return the top k most similar documents

The node compares the query embedding against the stored vectors and returns the most relevant entries.

Result ​

The output table contains the retrieved documents, ordered by semantic similarity.

Each row includes:

  • the original document text
  • a similarity score or distance

Next steps ​

  • Inject context into a prompt
Pager
Next pageInstallation