# Dataset search citation merge

> Combine, deduplicate, and rerank retrieval results from multiple knowledge base searches in a FastGPT workflow.

Source: https://doc.fastgpt.io/guide/build/workflow/nodes/knowledge_base_search_merge
Last Updated: 2026-11-12

![Dataset search citation merge — interface example](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/optimized/current/node-citation-merge.png.webp)

## What It Does

Combines citation lists from multiple upstream [Dataset Search](https://doc.fastgpt.io/guide/build/workflow/nodes/dataset_search) nodes into a single `datasetQuote` array, deduplicates chunks by ID, re-ranks results using **RRF (Reciprocal Rank Fusion)**, and trims the combined context to the configured **Maximum Tokens** budget.

## Inputs, Configuration, and Outputs

| Item                                  | Internal Key              | Value Type     | Description                                                                                     |
| ------------------------------------- | ------------------------- | -------------- | ----------------------------------------------------------------------------------------------- |
| **Maximum Tokens**                    | `limit`                   | `Number`       | Maximum token budget retained after merging; lower-ranked RRF items beyond this cap are trimmed |
| **Citation-1, Citation-2… (Dynamic)** | `system_datasetQuoteList` | `DatasetQuote` | Connects two or more `quoteQA` outputs from upstream Dataset Search nodes                       |
| **Dataset citations**                 | `quoteQA`                 | `DatasetQuote` | Deduplicated, RRF-ranked, and token-trimmed citation list ready for AI Chat                     |

## Usage

AI Chat accepts a single citation list. Connect the outputs of multiple search nodes to **Dataset search citation merge**, then pass the combined citations to AI Chat.

This verified example supplies two demonstration lists containing three entries, including one duplicate. The output contains two citations with RRF ranking scores:

![Three input citations deduplicated into two results](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/optimized/current/citation-merge-result.png.webp)

Open Run Details and select Dataset search citation merge to verify the merged total. This run shows `2`:

![Merged total and executed nodes](https://cdn.jsdelivr.net/gh/labring/fastgpt-img@main/optimized/current/citation-merge-detail.png.webp)

## Example Use Cases

1. After question classification, search different Datasets per category, then feed the merged results to a single AI Chat node. This avoids adding a separate AI Chat node to each branch.
2. Run parallel searches using both the original user question and an expanded sub-query, then merge and deduplicate the recalled chunks with RRF before answer generation.
