Answer 'What's for Dinner?' with Vector Search and Natural Language using Haystack and Milvus
chloewilliams62
92 views
29 slides
May 28, 2024
Slide 1 of 29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
About This Presentation
What will you learn?
Have you ever wanted a personal chef? You've probably heard the joke "being in a relationship is just asking each other 'what do you want to eat for dinner' until you die." Sure, you can just browse recipes online but who knows if they are any good? LLMs to...
What will you learn?
Have you ever wanted a personal chef? You've probably heard the joke "being in a relationship is just asking each other 'what do you want to eat for dinner' until you die." Sure, you can just browse recipes online but who knows if they are any good? LLMs to the rescue!
In this session, I'll demonstrate taking a dataset on Kaggle of my favorite cookbook recipes, pulling data into a Milvus vector database instance, and building an agentic Haystack RAG pipeline so I can search for tasty recipes with natural language. I'll even take it one step further with a function call to make an Amazon shopping list with the ingredients. Join us for this session to see how you can solve real-world problems with RAG and answer the age old question "what's for dinner?"
Topics Covered
- How to build a real-world RAG app
- Getting started with Haystack
- Ingesting data into Milvus
Size: 2.06 MB
Language: en
Added: May 28, 2024
Slides: 29 pages
Slide Content
Haystack & Milvus present:
?????? what’s for dinner?
May 23rd, 2024 Tilde Thurium (they/them)
2
Introductions
hi, I’m Tilde! (they/them)
●Senior Developer
Advocate @ deepset,
Haystack
●based in San Francisco
●Ask me about
powerlifting, art, or vegan
cooking!
Agenda
1.Haystack overview
2.Milvus overview
3.What’s for dinner - live demo
4.Q&A
Agenda
1.Haystack overview
2.Milvus overview
3.What’s for dinner - live demo
4.Q&A
What is Haystack?
●Haystack is an open source framework for building production-ready
LLM applications
●It lets you quickly try out the latest AI models while being flexible and
easy to use
●Building blocks: Pipelines & Components
●deepset Cloud, our commercial offering, is built on top of Haystack
deepset: doing nlp since before it was cool
Jul 2019
Initial release of FARM, our first
open source framework for
transfer learning, model
fine-tuning, question answering
(QA).
Dec 2021
Release of Haystack 1.0,
supporting pipeline evaluation,
table QA, migration of FARM into
Haystack.
Mar 2023
Release of Haystack 1.15,
enabling LLM-based Agents. The
haystack-extras repository is
introduced, reducing installation
dependencies.
2024
What’s next?
2025Mar 2024
Release of Haystack 2.0! ??????
Flexible pipelines allowing loops,
simpler custom components,
long list of integrations.
Dec 2022
Release of Haystack 1.12, with
PromptNode for using LLMs.
May 2020
Initial release of Haystack, using
FARM for extractive QA,
FAQ-style QA, dense passage
retrieval, Elasticseach.
Haystack 2.0 - March 2024
●focused on AI, LLMs, RAG use cases
●Flexible developer experience:
composable, extensible
●Let’s explore some of Haystack’s
features
https://haystack.deepset.ai/blog/haystack-2-release
Pipelines
●Pipelines are powerful abstractions that allow you to define the flow of data
through your LLM application. They consist of components.
●You have control over pipeline logic
Agentic pipelines
Search Google and
answer: why did Elon
Musk sue OpenAI?
Elon Musk sued OpenAI
for breaching its
founding agreement and
diverging from its original
nonprofit mission….
Pipelines with prompts: RAG
●Haystack offers flexibility in
how you pass data to the
LLM
●Jinja2 templating provides
logic features within the
prompt (such as loops and
conditional statements)
●The prompt template is
another component in the
pipeline
Components
●Components are the building
blocks of a pipeline.
●They perform tasks such as
preprocessing, retrieving, or
summarizing text while routing
queries through different
branches of a pipeline.
●Each component has one
function
●Haystack offers many
components “out of the box”
Custom components can be written with a few lines of code
●What can you do with custom components?
https://jina.ai/news/retrieve-jira-tickets-with-jina-reranker-and-haystack-20/
Model & database agnostic
RAG != vector databases
Easily incorporate web data sources without writing a scraper
A rich ecosystem of OSS
integrations
●not just models and data
sources: evaluation,
debugging, tracing & more
●Including, Milvus!
Agenda
1.Haystack overview
2.Milvus overview
3.What’s for dinner - live demo
4.Q&A
What is Milvus? (from https://milvus.io/intro)
●Milvus is an open source vector database designed for high scalability.
●Vector databases are specialized systems designed for managing and
retrieving unstructured data
●Vector databases excel in semantic similarity searches using
techniques such as the Approximate Nearest Neighbor (ANN) algorithm.
●Stay tuned next week for an exciting announcement…
Agenda
1.Haystack overview
2.Milvus overview
3.What’s for dinner - live demo
4.Q&A
Overview
●I started this project thinking I’d use a Kaggle dataset, but it didn’t
actually contain the data that I wanted!
●That’s okay, because one of Haystack’s strengths is that it’s easy to
ingest data in whatever format you have it in
●To the editor, Batman
Roadmap: develop and optimise advanced agent use cases
Existing features: function calling, tools, routing, fallbacks, query loops, structured
output
Coming up:
Easy to develop advanced use cases:
●support for different types of memory (summary or custom logic)
●multi-agent support
●simplified developer experience
29
Thank you!
Further resources:
●We have an open Discord server
●We have regular meetups! https://lu.ma/haystack
●GitHub: Haystack is open source ⭐
●Twitter @deepset_ai
●YouTube:
https://www.youtube.com/channel/UCA4FjZ2PAVk5nb4
eyteKGEQ
To do ??????
Get started with Haystack
Tutorials
Discover ??????
The Haystack
ecosystem