diff --git a/_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md b/_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md new file mode 100644 index 000000000..33a11cf00 --- /dev/null +++ b/_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md @@ -0,0 +1,3 @@ +### Rerank Results + +Enables [reranking](/glossary.md#ai-reranking). If you enable this option, you must connect a reranking node to the vector store. That node will then rerank the results for queries. You can use this option with the `Get Many`, `Retrieve Documents (As Vector Store for Chain/Tool)` and `Retrieve Documents (As Tool for AI Agent)` modes. diff --git a/docs/glossary.md b/docs/glossary.md index 383192ac9..9f6b96edd 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -1,7 +1,7 @@ --- #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 title: n8n Glossary -description: A glossary of terms commonly used when working with n8n and releated software. +description: A glossary of terms commonly used when working with n8n and related software. contentType: reference --- @@ -17,6 +17,10 @@ AI chains allow you to interact with large language models (LLMs) and other reso Embeddings are numerical representations of data using vectors. They're used by AI to interpret complex data and relationships by mapping values across many dimensions. Vector databases, or vector stores, are databases designed to store and access embeddings. +#### AI reranking + +Reranking is a technique that refines the order of a list of candidate documents to improve the relevance of search results. Retrieval-Augmented Generation (RAG) and other applications use reranking to prioritize the most relevant information for generation or downstream tasks. + #### AI memory In an AI context, memory allows AI tools to persist message context across interactions. This allows you to have a continuing conversations with AI agents, for example, without submitting ongoing context with each message. In n8n, AI agent nodes can use memory, but AI chains can't. diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory.md index 2edb27d6b..f1d4fd581 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory.md @@ -88,6 +88,8 @@ On n8n Cloud, these values are preset to 100MB (about 8,000 documents, depending --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremilvus.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremilvus.md index c529977da..1eaf0ac83 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremilvus.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremilvus.md @@ -55,6 +55,8 @@ The connections flow would look like this: AI agent (tools connector) -> Vector --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas.md index 9cc96c819..f8423f804 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas.md @@ -83,6 +83,8 @@ The [connections flow](https://n8n.io/workflows/2465-building-your-first-whatsap --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepgvector.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepgvector.md index c5649e560..b773a67d8 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepgvector.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepgvector.md @@ -49,6 +49,8 @@ The [connections flow](https://n8n.io/workflows/2465-building-your-first-whatsap --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone.md index 2b0d61c76..a59b4e822 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone.md @@ -50,6 +50,8 @@ The [connections flow](https://n8n.io/workflows/2705-chat-with-github-api-docume --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode-with-update.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant.md index d3124cbe4..a6348f842 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant.md @@ -50,6 +50,8 @@ The [connections flow](https://n8n.io/workflows/2464-scale-deal-flow-with-a-pitc --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase.md index ec1d9183d..3c3ee29d6 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase.md @@ -52,6 +52,8 @@ The [connections flow](https://n8n.io/workflows/2621-ai-agent-to-chat-with-files --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode-with-update.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Get Many parameters diff --git a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep.md b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep.md index ab0c1bdb3..2792c61bd 100644 --- a/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep.md +++ b/docs/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep.md @@ -53,6 +53,8 @@ The [connections flow](https://n8n.io/workflows/2621-ai-agent-to-chat-with-files --8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-rerank-results.md" + ### Insert Documents parameters * **Collection Name**: Enter the collection name to store the data in. diff --git a/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.rerankercohere.md b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.rerankercohere.md new file mode 100644 index 000000000..a47811acb --- /dev/null +++ b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.rerankercohere.md @@ -0,0 +1,31 @@ +--- +#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 +title: Reranker Cohere +description: Learn how to use the Reranker Cohere node in n8n. Follow technical documentation to integrate Cohere reranking into your workflows. +contentType: [integration, reference] +--- + +# Reranker Cohere + +The Reranker Cohere node allows you to [rerank](/glossary.md#ai-reranking) the resulting chunks from a [vector store](/glossary.md#ai-vector-store). You can connect this node to a vector store. + +The reranker reorders the list of documents retrieved from a vector store for a given query in order of descending relevance. + +On this page, you'll find the node parameters for the Reranker Cohere node, and links to more resources. + +/// note | Credentials +You can find authentication information for this node [here](/integrations/builtin/credentials/cohere.md). +/// + +--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md" + +## Node parameters + +### Model + +Choose the reranking model to use. You can find out more about the available models in [Cohere's model documentation](https://docs.cohere.com/docs/models#rerank). + +## Related resources + +--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" +--8<-- "_glossary/ai-glossary.md" diff --git a/docs/integrations/builtin/credentials/cohere.md b/docs/integrations/builtin/credentials/cohere.md index 7564debc6..0d9722fca 100644 --- a/docs/integrations/builtin/credentials/cohere.md +++ b/docs/integrations/builtin/credentials/cohere.md @@ -10,6 +10,7 @@ contentType: [integration, reference] You can use these credentials to authenticate the following nodes: * [Cohere](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmcohere.md) +* [Reranker Cohere](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.rerankercohere.md) * [Embeddings Cohere](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingscohere.md) ## Prerequisites diff --git a/nav.yml b/nav.yml index e073ae9e6..39d33b4a8 100644 --- a/nav.yml +++ b/nav.yml @@ -774,6 +774,7 @@ nav: - Wikipedia: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwikipedia.md - Wolfram|Alpha: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwolframalpha.md - Call n8n Workflow Tool: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow.md + - Reranker Cohere: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.rerankercohere.md - Credentials: - integrations/builtin/credentials/index.md - integrations/builtin/credentials/actionnetwork.md diff --git a/styles/config/vocabularies/default/accept.txt b/styles/config/vocabularies/default/accept.txt index b4e65e443..0523fe247 100644 --- a/styles/config/vocabularies/default/accept.txt +++ b/styles/config/vocabularies/default/accept.txt @@ -200,6 +200,7 @@ Qualys Realtime Rekognition requester +[Rr]erank(er|ing|ed)? Rundeck Salesmate [Ss]andboxed