Release

Phasing Out N-to-1: Upgrading Multi-path Knowledge Retrieval

We're phasing out the N-to-1 retrieval strategy on September 1, 2024, and introducing a more flexible multi-path retrieval strategy. We recommend switching to this new approach to boost your application's retrieval efficiency.

Pan

Product Operation

Joshua

Marketing

Written on

Aug 1, 2024

Share

Share to Twitter
Share to LinkedIn
Share to Hacker News

Release

·

Aug 1, 2024

Phasing Out N-to-1: Upgrading Multi-path Knowledge Retrieval

We're phasing out the N-to-1 retrieval strategy on September 1, 2024, and introducing a more flexible multi-path retrieval strategy. We recommend switching to this new approach to boost your application's retrieval efficiency.

Pan

Product Operation

Joshua

Marketing

Share to Twitter
Share to LinkedIn
Share to Hacker News

Release

Phasing Out N-to-1: Upgrading Multi-path Knowledge Retrieval

We're phasing out the N-to-1 retrieval strategy on September 1, 2024, and introducing a more flexible multi-path retrieval strategy. We recommend switching to this new approach to boost your application's retrieval efficiency.

Pan

Product Operation

Joshua

Marketing

Written on

Aug 1, 2024

Share

Share to Twitter
Share to LinkedIn
Share to Hacker News

Release

·

Aug 1, 2024

Phasing Out N-to-1: Upgrading Multi-path Knowledge Retrieval

Share to Twitter
Share to LinkedIn
Share to Hacker News

Release

·

Aug 1, 2024

Phasing Out N-to-1: Upgrading Multi-path Knowledge Retrieval

Share to Twitter
Share to LinkedIn
Share to Hacker News

Dify is enhancing its knowledge base retrieval system. We're phasing out the N-to-1 retrieval strategy on September 1, 2024, and introducing a more flexible multi-path retrieval strategy. We recommend switching to this new approach to boost your application's retrieval efficiency.

Why retire "N-to-1 retrieval"?

Our analysis has uncovered key limitations in the N-to-1 retrieval strategy. This approach restricts searches to a single knowledge base and relies heavily on LLM interpretation of knowledge base descriptions. As a result, it often produces incomplete or inaccurate results, compromising retrieval quality. Feedback from our community supports these findings, driving our decision to move towards a more effective solution.

A Better Solution: Configurable "Multi-path Retrieval"

Our enhanced multi-path retrieval strategy offers:

  • Optional reranking strategies

  • Semantic and keyword weighting for optimized retrieval

  • Integration with reranking models (e.g., Cohere, Jina) for peak performance

We recommend using this new setup for more accurate retrieval.

What you need to do

Dify Cloud Users: Switch from "N-to-1 retrieval" to "multi-path retrieval" in Context > Retrieval Setting. Don't worry if you miss it - we'll automatically update to default multi-path settings on September 1, 2024.

Community and Enterprise Users: Keep an eye out for our post-September 1 release notes. We'll provide migration scripts and details there.

Optimizing "Multi-path Retrieval" with Rerank

Multi-path retrieval in Dify offers two primary configuration options: Keyword & Semantic Weighted Score and Rerank Model selection.

Keyword & Semantic Weighted Score Configuration

Keyword-only (weight: 1): Best for exact matches. It's fast and efficient, especially for large knowledge bases. Use this when your users know precisely what they're looking for.

Semantic-only (weight: 1): Understands the meaning behind queries. It can find relevant info even without exact keyword matches. Great for multilingual content and complex searches.

Custom weight balance: Blend keyword and semantic approaches to fit your needs. Adjust the mix to match your unique business requirements or complex information structure.

Rerank Model

For maximum retrieval precision, we recommend implementing a rerank model. This refines the initial results, significantly enhancing overall accuracy.

For detailed configuration steps and best practices, please refer to our documentation.

Looking ahead

This upgrade kickstarts our journey to enhance Dify's RAG capabilities. We're dedicated to refining our RAG system, prioritizing flexibility and openness to cater to our diverse community and customer needs.

Your insights are crucial as we grow. Join our community and help us shape the future of Dify.

On this page

    The Innovation Engine for Generative AI Applications

    The Innovation Engine for Generative AI Applications

    The Innovation Engine for Generative AI Applications