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.

What an LLM returns to you as an answer depends a lot on what you’ve asked an LLM to do! That’s why prompting is super important.

For today’s challenge, we are again stepping in to complete a task that our elves didn’t quite complete.

Elf Julian wanted to provide you with a referenced documentation search pipeline. For that, he already created an indexing pipeline for you, which indexes some of the Haystack 2.0 Beta documentation pages into an InMemoryDocumentStore.

He also started to create a RAG pipeline. However, the PromptBuilder is missing. Without it, the LLM doesn’t know what to do. ๐Ÿ˜ข

Your task is to complete the starter colab with a PromptBuilder that will achieve referenced documentation search!

๐Ÿงก Some Hints:

  • The starter colab gives you the option of using the HuggingFaceLocalGenerator with Zephyr 7B Beta. If you chose to do that, this article might be quite useful!
  • Haystack 2.0 will be using Jinja2 for prompt templating!
  • The challenges from previous days also have lots of code that will be useful for this challenge!

๐Ÿฉต Here is the Starter Colab

๐Ÿ“š Useful Docs

  • PromptBuilder: Used to create templates for prompts you’d like to send to LLMs
  • HuggingFaceLocalGenerator: Used to generate responses using local open source models from Hugging Face models
  • GPTGenerator: Used to generate reponses using OpenAI’s GPT models