Add cookbook: Cross-lingual Hybrid Retrieval with BM25 + Multilingual Embeddings#273
Open
geyuxu wants to merge 2 commits intodeepset-ai:mainfrom
Open
Add cookbook: Cross-lingual Hybrid Retrieval with BM25 + Multilingual Embeddings#273geyuxu wants to merge 2 commits intodeepset-ai:mainfrom
geyuxu wants to merge 2 commits intodeepset-ai:mainfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
kacperlukawski
requested changes
Feb 24, 2026
Member
kacperlukawski
left a comment
There was a problem hiding this comment.
Hey, @geyuxu ! Thanks for contributing with a notebook! I got some comments, and happy to help polish the cookbook!
…d full RAG pipeline
| @@ -0,0 +1,7020 @@ | |||
| { | |||
Member
There was a problem hiding this comment.
I tried playing with the pipeline a bit, but it consistently prefers english documents only, so it isn't accurate. Even the current output proves that:
Retrieved documents:
[1] (lang=en) The European Union has set ambitious carbon neutrality targe...
[2] (lang=en) Urban green spaces play a crucial role in reducing heat isla...
[3] (lang=en) Solar panel efficiency has improved significantly in recent ...
Reply via ReviewNB
| @@ -0,0 +1,7020 @@ | |||
| { | |||
Member
There was a problem hiding this comment.
Could we remove the BM42 cookbook?
⚠️ Recent evaluations have raised questions about the validity of BM42. Future developments may address these concerns. Please keep this in mind while reviewing the content.
Reply via ReviewNB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This cookbook demonstrates how to build a cross-lingual hybrid retrieval pipeline
using Haystack, combining BM25 keyword search with multilingual dense embeddings
to search across Chinese and English documents.
What it covers:
paraphrase-multilingual-MiniLM-L12-v2for cross-lingual dense retrievalDocumentJoiner(Reciprocal Rank Fusion)TransformersRankerComponents used:
InMemoryDocumentStoreInMemoryBM25RetrieverInMemoryEmbeddingRetrieverSentenceTransformersDocumentEmbedder/SentenceTransformersTextEmbedderDocumentJoiner(reciprocal_rank_fusion)TransformersRankerPromptBuilderWhy this is useful:
Haystack's cookbook currently has excellent examples for hybrid retrieval
(BM42, SPLADE) but none specifically addressing cross-lingual scenarios.
Many real-world applications involve multilingual document collections
(e.g., international enterprises, academic research, e-commerce across markets).
This cookbook fills that gap.
Tested with: