> ## Documentation Index
> Fetch the complete documentation index at: https://giselle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Vector Query Node

> Learn how the Vector Query Node in Giselle executes queries against vector store data sources to enable Retrieval-Augmented Generation (RAG).

## Vector Query Node in Giselle

The **Vector Query Node** is a powerful component in Giselle designed to search and retrieve information from connected vector store data sources. Its primary function is to execute a query (such as a question or a search term) against a vectorized dataset and return the most relevant results.

The Vector Query Node works with the following vector store nodes, making it a crucial building block for creating Retrieval-Augmented Generation (RAG) applications directly within your Giselle workflows:

* **[GitHub Vector Store Node](https://giselle.mintlify.site/en/glossary/github-vector-store-node.md)**: Search through vectorized GitHub repository content including code, issues, and pull requests.
* **[Document Vector Store Node](https://giselle.mintlify.site/en/glossary/document-vector-store-node.md)**: Search through your uploaded documents such as PDFs, text files, and markdown files.

### How to Use the Vector Query Node

Setting up a Vector Query Node involves adding it to your canvas, connecting a data source, and running a query.

#### 1. Add a Vector Query Node

From the node toolbar at the bottom of the canvas, select the **Vector Query Node**, which is identifiable by its magnifying glass icon, and place it in your workspace.

#### 2. Connect a Data Source

The Vector Query Node requires an input from a vector store data source to function. You must connect the `Output` of a vector store node (GitHub Vector Store Node or Document Vector Store Node) to the `Input` of the Vector Query Node. Until a data source is connected, the node will indicate that it is waiting for a connection.

#### 3. Write and Run a Query

Once a data source is connected, you can configure the Vector Query Node:

* **Enter a Query**: In the configuration panel, type your question or search term into the "Query" input field.
* **Run the Query**: Click the **Run Query** button to execute the search against the connected data source.

#### 4. Review the Results

After the query runs, the results will be displayed directly in the node's panel. The results typically include:

* A summary of the number of results found.
* A list of relevant "chunks" of text retrieved from the source documents.
* A similarity score (e.g., 58%) for each chunk, indicating its relevance to your query.

You can expand each chunk to view its content and metadata.

### Core Use Case: Retrieval-Augmented Generation (RAG)

The primary purpose of the Vector Query Node is to enable **Retrieval-Augmented Generation (RAG)** workflows. RAG enhances the capabilities of Large Language Models (LLMs) by providing them with relevant, up-to-date information from your own data sources before they generate a response.

A typical RAG workflow in Giselle looks like this:

1. **Data Source (Vector Store Node)**: Ingests and vectorizes your content from a GitHub repository or uploaded documents, making it searchable.
2. **Vector Query Node**: Takes a user's question (the query) and retrieves the most relevant text chunks from the vector store.
3. **Generator Node**: Receives the original question *and* the retrieved information from the Vector Query Node's output. It uses this combined context to generate a more accurate, detailed, and factually grounded answer.

### Output of the Vector Query Node

The `Result` output of the Vector Query Node contains the collection of retrieved data chunks. This structured data can be passed to subsequent nodes—most commonly a **Generator Node**—to serve as dynamic context for text generation.

> [!NOTE]
>
> For more information on how to set up a data source for querying, see our documentation on the [GitHub Vector Store Node](https://giselle.mintlify.site/en/glossary/github-vector-store-node.md) and [Document Vector Store Node](https://giselle.mintlify.site/en/glossary/document-vector-store-node.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.