Advent of Haystack

Try out Haystack 2.0-Beta to discover what’s coming in the next major release

with 10 challenges in the month of December 🎉

From January 5th to 19th, you will also find the solutions of each challenge.

In Haystack 2.0, pipeline branching is becoming super flexible and easy. Elf Daria from the Haystack workshop wanted to create a branched indexing pipeline to show you how this works. The idea was to have a pipeline that would route documents into a specific InMemoryDocumentStore based on the language of the document.

She created example documents in English, French, German, Dutch and Spanish. However, her pipeline only works with English and French documents!

Your task is to complete her indexing pipeline by adding more branches to the pipeline, and defining the rules for document routing. 🌳 There’s an example of what that pipeline would look like below 👇

🕊️ Hint: For this challenge, the DocumentLanguageClassifier and MetadataRouter components are going to be very useful.

💜 Here is a Starter Colab

📚 Useful Docs:

branched pipeline