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
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
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...


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

Housekeeping
1.Ask questions in Q&A and we’ll get to them
at the end!
2.Show of hands (or drop a note in chat):
who has heard of Haystack before?
Copyright © deepset GmbH. All rights reserved.
4

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

Pipeline visualizations
●pipeline.draw(‘pipeline.png’)

Branching

Routing

Looping

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
Tags