SlideShare a Scribd company logo
1 | © Copyright 2024 Zilliz
1
Introduction to Unstructured Data,
Vector Database and Gen AI
Tim Spann @ Zilliz
2 | © Copyright 2024 Zilliz
2
2 | © Copyright 10/22/23 Zilliz
2 | © Copyright 2024 Zilliz
Tim Spann
Principal Developer Advocate
Zilliz
tim.spann@zilliz.com
https://www.linkedin.com/in/timothyspann/
https://x.com/PaaSDev
3 | © Copyright Zilliz
3
W A New Data and Compute World
This is an introduction to the various approaches for building and fine-tuning machine learning models, with a primary focus on
Retrieval-Augmented Generation (RAG) and the tools that support it. The session will guide participants through three key strategies for creating
AI models: training a model from scratch, fine-tuning an existing model, and utilizing RAG.
In the first section, participants will receive an overview of the following options:
1. Training Your Own Model: Understand the challenges and opportunities of building models from the ground up.
2. Fine-tuning a Pre-trained Model: Learn how to adapt existing models to specific tasks and datasets.
3. The RAG Approach: Dive into Retrieval-Augmented Generation, a hybrid method that leverages both knowledge retrieval and generative
models for more efficient, accurate AI applications.
In the second section, the focus will shift to the RAG Approach, with a detailed explanation of its core components:
● Vector Databases: Explore how vector databases (such as Milvus) are used to store and retrieve embeddings, enabling efficient
information retrieval.
● Open Source Models on Hugging Face: Learn how to integrate various open-source models available on platforms like Hugging Face
with RAG workflows.
● Langchain and Other Frameworks: Understand how Langchain and similar frameworks simplify building and deploying RAG-based
solutions.
Throughout the session, Milvus will be a central point of discussion, highlighting its role in vector storage and retrieval, and how it can be paired
with models to enhance AI applications.
Learning Outcomes:
● Gain an understanding of different AI model development strategies.
● Understand the principles and advantages of the RAG approach.
● Learn how to use tools like Milvus, open-source models, and frameworks like Langchain to create efficient AI systems.
6 | © Copyright Zilliz
6
Cloud
Service
Provider
Data Platform
GenAI Tooling
Chip
Manufacturer
Partner with Industry Leaders
7 | © Copyright Zilliz
7
T Training Your Own Model
8 | © Copyright Zilliz
8
Problems with LLM Training
● It requires a large amount of time
● It requires a lot of money
● It requires a large cluster and electricity
● So many free and open models available
● Works for a specific domain of data
● Requires 100s of GPUs
● Requires lots of data (maybe synthetic…)
● Look at Fine Tuning and RAG instead
● Requires Data Engineers and Data Scientists
9 | © Copyright Zilliz
9
Meta LLama 3.x Models
Mistral Models
Microsoft Models
QWen Models
Google Models
Hugging Face Open LLM Leaderboard
https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard
10 | © Copyright Zilliz
10
Exception: Training Your Own Text Embedding Model
https://zilliz.com/learn/training-your-own-text-embedding-model
11 | © Copyright Zilliz
11
Perhaps Make a Small Language Model
https://medium.com/@nageshmashette32/small-language-model
s-slms-305597c9edf2
12 | © Copyright Zilliz
12
F Fine-tuning a Pre-trained Model
13 | © Copyright Zilliz
13
RAG vs Fine Tuning
LLM
Fine Tuning
Augment an LLM by training it
on your data
Your Data
“New” LLM
Query
Primary Use Case
- Style transfer
14 | © Copyright Zilliz
14
Problems with Fine Tuning
● Retraining takes time
● Retraining takes money
● Retraining takes human supervision to organize and label data
● Works for a specific domain of data
● Requires GPUs
15 | © Copyright Zilliz
15
Problems with Fine Tuning
● Works for the version of a model you fine tuned against
○ Models change always)
● Data changes constantly, everywhere, always
● Requires Skilled Data Scientists
● Requires GPUs
● LLM Can Still Hallucinate
16 | © Copyright Zilliz
16
R The RAG Approach
17 | © Copyright Zilliz
17
How do You Prevent LLM Hallucinations?
Vector Database serve as a knowledge base for your LLM
Application so that you can:
- Build on Your Data
- Eliminate Hallucinations
- Solve Customer Problems with AI
18 | © Copyright Zilliz
18
RAG vs Fine Tuning
Load Your Data
Instantly Access it
Searchable Data Platform
Reusable Data Assets
Can be simple to code
19 | © Copyright Zilliz
19
RAG vs. LLM
- Knowledge of LLM is out-of-date
- LLM can not get your private knowledge
- Help reducing Hallucinations
- Transparency and interpretability
RAG vs. Fine-tune
- Fine-tune is expensive
- Fine-tune can be time consuming
- RAG is pluggable
Why RAG?
A New tool emerged. The Vector Database
Vector Database : making sense of unstructured data
2024
A vector database stores embedding vectors and allows for semantic
retrieval of various types of unstructured data.
11-OCT-2024_AI_101_CryptoOracle_UnstructuredData
23 | © Copyright 2024 Zilliz
23 | © Copyright 8/16/23 Zilliz
23
Milvus is an Open-Source Vector Database to
store, index, manage, and use the massive
number of embedding vectors generated by
deep neural networks and LLMs.
contributors
400
stars
29K
docker pulls
66M
forks
2.7K
+
Milvus: The most widely-adopted vector database
24 | © Copyright Zilliz
24
O
Open Source Models on
Hugging Face
25 | © Copyright 2024 Zilliz
25
Well-connected in LLM infrastructure to enable RAG
use cases
Framework
Hardware
Infrastructure
Embedding Models LLMs
Software Infrastructure
Vector Database
26 | © Copyright Zilliz
26
C Langchain and Other Frameworks
27 | © Copyright Zilliz
27
What is LangChain
- LLM Chaining Framework
- Plugins with most popular tools
- Focus on “chainingˮ results or “orchestrationˮ
28 | © Copyright Zilliz
28
29 | © Copyright 2024 Zilliz
29
Well-connected in LLM infrastructure to enable RAG
use cases
Framework
Hardware
Infrastructure
Embedding Models LLMs
Software Infrastructure
Vector Database
30 | © Copyright 2024 Zilliz
30
31 | © Copyright Zilliz
31
U Under the Covers
32 | © Copyright Zilliz
32
Use math to quantify relationships
between entities
33 | © Copyright Zilliz
33
Vector databases efficiently store,
index, and relate entities by a
quantitative value
34 | © Copyright Zilliz
34
Vector similarity is a mathematical
measure of how close two vectors are
35 | © Copyright Zilliz
35
Similarity metrics are ways to measure
distance in vector space
36 | © Copyright Zilliz
36
Vector Similarity Metric: L2 Euclidean)
Queen = [0.3, 0.9]
King = [0.5, 0.7]
d(Queen, King) = √(0.3-0.5)2
+ (0.9-0.7)2
= √(0.2)2
+ (0.2)2
= √0.04 + 0.04
= √0.08 ≅ 0.28
37 | © Copyright Zilliz
37
Vector Similarity Metric: Inner Product IP
Queen = [0.3, 0.9]
King = [0.5, 0.7]
Queen · King = (0.3*0.5) + (0.9*0.7)
= 0.15 + 0.63 = 0.78
38 | © Copyright Zilliz
38
Queen = [0.3, 0.9]
King = [0.5, 0.7]
Vector Similarity Metric: Cosine
𝚹
cos(Queen, King) = (0.3*0.5)+(0.9*0.7)
√0.32
+0.92
* √0.52
+0.72
= 0.15+0.63 _
√0.9 * √0.74
= 0.78 _
√0.666
≅ 0.03
39 | © Copyright Zilliz
39
Vector Similarity Metrics
Euclidean - Spatial distance
Cosine - Orientational distance
Inner Product - Both
With normalized vectors, IP  Cosine
40 | © Copyright Zilliz
40
Indexes organize the way we access
our data
41 | © Copyright Zilliz
41 | © Copyright Zilliz
41
RESOURCES
42 | © Copyright Zilliz
42
Vector Database Resources
Give Milvus a Star! Chat with me on Discord!
https://github.com/milvus-io/milvus
43
Unstructured Data Meetup
https://www.meetup.com/unstructured-data-meetup-new-york/
This meetup is for people working in unstructured data. Speakers will come present about related topics
such as vector databases, LLMs, and managing data at scale. The intended audience of this group
includes roles like machine learning engineers, data scientists, data engineers, software engineers, and
PMs.
This meetup was formerly Milvus Meetup, and is sponsored by Zilliz maintainers of Milvus.
44 | © Copyright Zilliz
44
https://zilliz.com/learn/generative-ai
45 | © Copyright 2024 Zilliz
45
45
This week in Milvus, Towhee, Attu, GPT
Cache, Gen AI, LLM, Apache NiFi, Apache
Flink, Apache Kafka, ML, AI, Apache Spark,
Apache Iceberg, Python, Java, Vector DB
and Open Source friends.
https://bit.ly/32dAJft
https://github.com/milvus-io/milvus
AIM Weekly by Tim Spann
46 | © Copyright 2024 Zilliz
46
milvus.io
github.com/milvus-io/
@milvusio
@paasDev
/in/timothyspann
Connect with me!
Thank you!

More Related Content

PDF
2024-10-28 All Things Open - Advanced Retrieval Augmented Generation (RAG) Te...
Timothy Spann
 
PDF
10-25-2024_BITS_NYC_Unstructured Data and LLM_ What, Why and How
Timothy Spann
 
PDF
09-12-2024 - Milvus, Vector database used for Sensor Data RAG
Timothy Spann
 
PDF
09-03-2024_UnstructuredDataAndAIDiscussion.pdf
Timothy Spann
 
PDF
09-19-2024 AI Camp Hybrid Seach - Milvus for Vector Database
Timothy Spann
 
PDF
09-26-2024 Conf 42 Kube Native: Unleashing the Potential of Cloud Native Open...
Timothy Spann
 
PDF
GPT and Graph Data Science to power your Knowledge Graph
Neo4j
 
PDF
2025-02-24 - AWS meetup - Zilliz presentation.pdf
Ivan Tang
 
2024-10-28 All Things Open - Advanced Retrieval Augmented Generation (RAG) Te...
Timothy Spann
 
10-25-2024_BITS_NYC_Unstructured Data and LLM_ What, Why and How
Timothy Spann
 
09-12-2024 - Milvus, Vector database used for Sensor Data RAG
Timothy Spann
 
09-03-2024_UnstructuredDataAndAIDiscussion.pdf
Timothy Spann
 
09-19-2024 AI Camp Hybrid Seach - Milvus for Vector Database
Timothy Spann
 
09-26-2024 Conf 42 Kube Native: Unleashing the Potential of Cloud Native Open...
Timothy Spann
 
GPT and Graph Data Science to power your Knowledge Graph
Neo4j
 
2025-02-24 - AWS meetup - Zilliz presentation.pdf
Ivan Tang
 

Similar to 11-OCT-2024_AI_101_CryptoOracle_UnstructuredData (20)

PDF
09-25-2024 NJX Venture Summit Introduction to Unstructured Data
Timothy Spann
 
PDF
Chunking, Embeddings, and Vector Databases
Zilliz
 
PDF
1 Table = 1000 Words? Foundation Models for Tabular Data
Zilliz
 
PDF
DutchMLSchool. ML for Energy Trading and Automotive Sector
BigML, Inc
 
PDF
tspann08-Nov-2024_PyDataNYC_Unstructured Data Processing with a Raspberry Pi ...
Timothy Spann
 
PDF
MultiModal RAG using vLLM and Pixtral - Stephen Batifol
Zilliz
 
PDF
MultiModal RAG using vLLM and Pixtral - Stephen Batifol
Zilliz
 
PDF
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
Timothy Spann
 
PPTX
Danny Bickson - Python based predictive analytics with GraphLab Create
PyData
 
PDF
Multimodal Search with Open-Source Tools
Zilliz
 
PDF
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j
 
PDF
Deploying a Multimodal RAG System Using Open Source Milvus, LlamaIndex, and vLLM
Zilliz
 
PDF
Supercharge Spark: Unleashing Big Data Potential with Milvus for RAG systems
Zilliz
 
PDF
Introduction to Large Language Model Customization.pdf
Zilliz
 
PPT
IBM Bluemix Openwhisk
Sonia Baratas Alves
 
PPT
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
OpenWhisk
 
PDF
Vector Databases 101 - An introduction to the world of Vector Databases
Zilliz
 
PDF
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j
 
PDF
17-October-2024 NYC AI Camp - Step-by-Step RAG 101
Timothy Spann
 
PDF
Keynote: Art of the Possible - Moore
Neo4j
 
09-25-2024 NJX Venture Summit Introduction to Unstructured Data
Timothy Spann
 
Chunking, Embeddings, and Vector Databases
Zilliz
 
1 Table = 1000 Words? Foundation Models for Tabular Data
Zilliz
 
DutchMLSchool. ML for Energy Trading and Automotive Sector
BigML, Inc
 
tspann08-Nov-2024_PyDataNYC_Unstructured Data Processing with a Raspberry Pi ...
Timothy Spann
 
MultiModal RAG using vLLM and Pixtral - Stephen Batifol
Zilliz
 
MultiModal RAG using vLLM and Pixtral - Stephen Batifol
Zilliz
 
06-20-2024-AI Camp Meetup-Unstructured Data and Vector Databases
Timothy Spann
 
Danny Bickson - Python based predictive analytics with GraphLab Create
PyData
 
Multimodal Search with Open-Source Tools
Zilliz
 
The Neo4j Data Platform for Today & Tomorrow.pdf
Neo4j
 
Deploying a Multimodal RAG System Using Open Source Milvus, LlamaIndex, and vLLM
Zilliz
 
Supercharge Spark: Unleashing Big Data Potential with Milvus for RAG systems
Zilliz
 
Introduction to Large Language Model Customization.pdf
Zilliz
 
IBM Bluemix Openwhisk
Sonia Baratas Alves
 
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
OpenWhisk
 
Vector Databases 101 - An introduction to the world of Vector Databases
Zilliz
 
Nordics Edition - The Neo4j Graph Data Platform Today & Tomorrow
Neo4j
 
17-October-2024 NYC AI Camp - Step-by-Step RAG 101
Timothy Spann
 
Keynote: Art of the Possible - Moore
Neo4j
 
Ad

More from Timothy Spann (20)

PDF
14May2025_TSPANN_FromAirQualityUnstructuredData.pdf
Timothy Spann
 
PDF
Streaming AI Pipelines with Apache NiFi and Snowflake NYC 2025
Timothy Spann
 
PDF
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
Timothy Spann
 
PDF
Conf42_IoT_Dec2024_Building IoT Applications With Open Source
Timothy Spann
 
PDF
2024 Dec 05 - PyData Global - Tutorial Its In The Air Tonight
Timothy Spann
 
PDF
2024Nov20-BigDataEU-RealTimeAIWithOpenSource
Timothy Spann
 
PDF
TSPANN-2024-Nov-CloudX-Adding Generative AI to Real-Time Streaming Pipelines
Timothy Spann
 
PDF
2024-Nov-BuildStuff-Adding Generative AI to Real-Time Streaming Pipelines
Timothy Spann
 
PDF
14 November 2024 - Conf 42 - Prompt Engineering - Codeless Generative AI Pipe...
Timothy Spann
 
PDF
2024 Nov 05 - Linux Foundation TAC TALK With Milvus
Timothy Spann
 
PPTX
tspann06-NOV-2024_AI-Alliance_NYC_ intro to Data Prep Kit and Open Source RAG
Timothy Spann
 
PDF
2024-OCT-23 NYC Meetup - Unstructured Data Meetup - Unstructured Halloween
Timothy Spann
 
PDF
DBTA Round Table with Zilliz and Airbyte - Unstructured Data Engineering
Timothy Spann
 
PDF
2024-10-04 - Grace Hopper Celebration Open Source Day - Stefan
Timothy Spann
 
PDF
01-Oct-2024_PES-VectorDatabasesAndAI.pdf
Timothy Spann
 
PDF
09-18-2024 NYC Meetup Vector Databases 102
Timothy Spann
 
PDF
08-15-2024 - AI Camp Meetup - Human Pose Estimation in Real-Time Utilizing Ed...
Timothy Spann
 
PDF
Unstructured Data Meetup - NYC - Qarbine - Milvus 13-Aug-2024
Timothy Spann
 
PDF
08-13-2024 NYC Meetup Unstructured Data Processing From Cloud to Edge (Milvus)
Timothy Spann
 
PDF
Milvus Vector Database: Integrating Semantic Search Capabilities with .NET an...
Timothy Spann
 
14May2025_TSPANN_FromAirQualityUnstructuredData.pdf
Timothy Spann
 
Streaming AI Pipelines with Apache NiFi and Snowflake NYC 2025
Timothy Spann
 
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
Timothy Spann
 
Conf42_IoT_Dec2024_Building IoT Applications With Open Source
Timothy Spann
 
2024 Dec 05 - PyData Global - Tutorial Its In The Air Tonight
Timothy Spann
 
2024Nov20-BigDataEU-RealTimeAIWithOpenSource
Timothy Spann
 
TSPANN-2024-Nov-CloudX-Adding Generative AI to Real-Time Streaming Pipelines
Timothy Spann
 
2024-Nov-BuildStuff-Adding Generative AI to Real-Time Streaming Pipelines
Timothy Spann
 
14 November 2024 - Conf 42 - Prompt Engineering - Codeless Generative AI Pipe...
Timothy Spann
 
2024 Nov 05 - Linux Foundation TAC TALK With Milvus
Timothy Spann
 
tspann06-NOV-2024_AI-Alliance_NYC_ intro to Data Prep Kit and Open Source RAG
Timothy Spann
 
2024-OCT-23 NYC Meetup - Unstructured Data Meetup - Unstructured Halloween
Timothy Spann
 
DBTA Round Table with Zilliz and Airbyte - Unstructured Data Engineering
Timothy Spann
 
2024-10-04 - Grace Hopper Celebration Open Source Day - Stefan
Timothy Spann
 
01-Oct-2024_PES-VectorDatabasesAndAI.pdf
Timothy Spann
 
09-18-2024 NYC Meetup Vector Databases 102
Timothy Spann
 
08-15-2024 - AI Camp Meetup - Human Pose Estimation in Real-Time Utilizing Ed...
Timothy Spann
 
Unstructured Data Meetup - NYC - Qarbine - Milvus 13-Aug-2024
Timothy Spann
 
08-13-2024 NYC Meetup Unstructured Data Processing From Cloud to Edge (Milvus)
Timothy Spann
 
Milvus Vector Database: Integrating Semantic Search Capabilities with .NET an...
Timothy Spann
 
Ad

Recently uploaded (20)

PDF
SUMMER INTERNSHIP REPORT[1] (AutoRecovered) (6) (1).pdf
pandeydiksha814
 
PDF
Blitz Campinas - Dia 24 de maio - Piettro.pdf
fabigreek
 
PPTX
Multiscale Segmentation of Survey Respondents: Seeing the Trees and the Fores...
Sione Palu
 
PPTX
short term project on AI Driven Data Analytics
JMJCollegeComputerde
 
PPTX
INFO8116 -Big data architecture and analytics
guddipatel10
 
PPTX
Web dev -ppt that helps us understand web technology
shubhragoyal12
 
PDF
An Uncut Conversation With Grok | PDF Document
Mike Hydes
 
PDF
WISE main accomplishments for ISQOLS award July 2025.pdf
StatsCommunications
 
PPTX
The whitetiger novel review for collegeassignment.pptx
DhruvPatel754154
 
PPTX
lecture 13 mind test academy it skills.pptx
ggesjmrasoolpark
 
PDF
Technical Writing Module-I Complete Notes.pdf
VedprakashArya13
 
PDF
202501214233242351219 QASS Session 2.pdf
lauramejiamillan
 
PPTX
Introduction-to-Python-Programming-Language (1).pptx
dhyeysapariya
 
PDF
The_Future_of_Data_Analytics_by_CA_Suvidha_Chaplot_UPDATED.pdf
CA Suvidha Chaplot
 
PDF
Blue Futuristic Cyber Security Presentation.pdf
tanvikhunt1003
 
PPTX
Future_of_AI_Presentation for everyone.pptx
boranamanju07
 
PPTX
Presentation on animal welfare a good topic
kidscream385
 
PPTX
World-population.pptx fire bunberbpeople
umutunsalnsl4402
 
PDF
Classifcation using Machine Learning and deep learning
bhaveshagrawal35
 
PDF
Practical Measurement Systems Analysis (Gage R&R) for design
Rob Schubert
 
SUMMER INTERNSHIP REPORT[1] (AutoRecovered) (6) (1).pdf
pandeydiksha814
 
Blitz Campinas - Dia 24 de maio - Piettro.pdf
fabigreek
 
Multiscale Segmentation of Survey Respondents: Seeing the Trees and the Fores...
Sione Palu
 
short term project on AI Driven Data Analytics
JMJCollegeComputerde
 
INFO8116 -Big data architecture and analytics
guddipatel10
 
Web dev -ppt that helps us understand web technology
shubhragoyal12
 
An Uncut Conversation With Grok | PDF Document
Mike Hydes
 
WISE main accomplishments for ISQOLS award July 2025.pdf
StatsCommunications
 
The whitetiger novel review for collegeassignment.pptx
DhruvPatel754154
 
lecture 13 mind test academy it skills.pptx
ggesjmrasoolpark
 
Technical Writing Module-I Complete Notes.pdf
VedprakashArya13
 
202501214233242351219 QASS Session 2.pdf
lauramejiamillan
 
Introduction-to-Python-Programming-Language (1).pptx
dhyeysapariya
 
The_Future_of_Data_Analytics_by_CA_Suvidha_Chaplot_UPDATED.pdf
CA Suvidha Chaplot
 
Blue Futuristic Cyber Security Presentation.pdf
tanvikhunt1003
 
Future_of_AI_Presentation for everyone.pptx
boranamanju07
 
Presentation on animal welfare a good topic
kidscream385
 
World-population.pptx fire bunberbpeople
umutunsalnsl4402
 
Classifcation using Machine Learning and deep learning
bhaveshagrawal35
 
Practical Measurement Systems Analysis (Gage R&R) for design
Rob Schubert
 

11-OCT-2024_AI_101_CryptoOracle_UnstructuredData

  • 1. 1 | © Copyright 2024 Zilliz 1 Introduction to Unstructured Data, Vector Database and Gen AI Tim Spann @ Zilliz
  • 2. 2 | © Copyright 2024 Zilliz 2 2 | © Copyright 10/22/23 Zilliz 2 | © Copyright 2024 Zilliz Tim Spann Principal Developer Advocate Zilliz [email protected] https://www.linkedin.com/in/timothyspann/ https://x.com/PaaSDev
  • 3. 3 | © Copyright Zilliz 3 W A New Data and Compute World
  • 4. This is an introduction to the various approaches for building and fine-tuning machine learning models, with a primary focus on Retrieval-Augmented Generation (RAG) and the tools that support it. The session will guide participants through three key strategies for creating AI models: training a model from scratch, fine-tuning an existing model, and utilizing RAG. In the first section, participants will receive an overview of the following options: 1. Training Your Own Model: Understand the challenges and opportunities of building models from the ground up. 2. Fine-tuning a Pre-trained Model: Learn how to adapt existing models to specific tasks and datasets. 3. The RAG Approach: Dive into Retrieval-Augmented Generation, a hybrid method that leverages both knowledge retrieval and generative models for more efficient, accurate AI applications. In the second section, the focus will shift to the RAG Approach, with a detailed explanation of its core components: ● Vector Databases: Explore how vector databases (such as Milvus) are used to store and retrieve embeddings, enabling efficient information retrieval. ● Open Source Models on Hugging Face: Learn how to integrate various open-source models available on platforms like Hugging Face with RAG workflows. ● Langchain and Other Frameworks: Understand how Langchain and similar frameworks simplify building and deploying RAG-based solutions. Throughout the session, Milvus will be a central point of discussion, highlighting its role in vector storage and retrieval, and how it can be paired with models to enhance AI applications.
  • 5. Learning Outcomes: ● Gain an understanding of different AI model development strategies. ● Understand the principles and advantages of the RAG approach. ● Learn how to use tools like Milvus, open-source models, and frameworks like Langchain to create efficient AI systems.
  • 6. 6 | © Copyright Zilliz 6 Cloud Service Provider Data Platform GenAI Tooling Chip Manufacturer Partner with Industry Leaders
  • 7. 7 | © Copyright Zilliz 7 T Training Your Own Model
  • 8. 8 | © Copyright Zilliz 8 Problems with LLM Training ● It requires a large amount of time ● It requires a lot of money ● It requires a large cluster and electricity ● So many free and open models available ● Works for a specific domain of data ● Requires 100s of GPUs ● Requires lots of data (maybe synthetic…) ● Look at Fine Tuning and RAG instead ● Requires Data Engineers and Data Scientists
  • 9. 9 | © Copyright Zilliz 9 Meta LLama 3.x Models Mistral Models Microsoft Models QWen Models Google Models Hugging Face Open LLM Leaderboard https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard
  • 10. 10 | © Copyright Zilliz 10 Exception: Training Your Own Text Embedding Model https://zilliz.com/learn/training-your-own-text-embedding-model
  • 11. 11 | © Copyright Zilliz 11 Perhaps Make a Small Language Model https://medium.com/@nageshmashette32/small-language-model s-slms-305597c9edf2
  • 12. 12 | © Copyright Zilliz 12 F Fine-tuning a Pre-trained Model
  • 13. 13 | © Copyright Zilliz 13 RAG vs Fine Tuning LLM Fine Tuning Augment an LLM by training it on your data Your Data “New” LLM Query Primary Use Case - Style transfer
  • 14. 14 | © Copyright Zilliz 14 Problems with Fine Tuning ● Retraining takes time ● Retraining takes money ● Retraining takes human supervision to organize and label data ● Works for a specific domain of data ● Requires GPUs
  • 15. 15 | © Copyright Zilliz 15 Problems with Fine Tuning ● Works for the version of a model you fine tuned against ○ Models change always) ● Data changes constantly, everywhere, always ● Requires Skilled Data Scientists ● Requires GPUs ● LLM Can Still Hallucinate
  • 16. 16 | © Copyright Zilliz 16 R The RAG Approach
  • 17. 17 | © Copyright Zilliz 17 How do You Prevent LLM Hallucinations? Vector Database serve as a knowledge base for your LLM Application so that you can: - Build on Your Data - Eliminate Hallucinations - Solve Customer Problems with AI
  • 18. 18 | © Copyright Zilliz 18 RAG vs Fine Tuning Load Your Data Instantly Access it Searchable Data Platform Reusable Data Assets Can be simple to code
  • 19. 19 | © Copyright Zilliz 19 RAG vs. LLM - Knowledge of LLM is out-of-date - LLM can not get your private knowledge - Help reducing Hallucinations - Transparency and interpretability RAG vs. Fine-tune - Fine-tune is expensive - Fine-tune can be time consuming - RAG is pluggable Why RAG?
  • 20. A New tool emerged. The Vector Database
  • 21. Vector Database : making sense of unstructured data 2024 A vector database stores embedding vectors and allows for semantic retrieval of various types of unstructured data.
  • 23. 23 | © Copyright 2024 Zilliz 23 | © Copyright 8/16/23 Zilliz 23 Milvus is an Open-Source Vector Database to store, index, manage, and use the massive number of embedding vectors generated by deep neural networks and LLMs. contributors 400 stars 29K docker pulls 66M forks 2.7K + Milvus: The most widely-adopted vector database
  • 24. 24 | © Copyright Zilliz 24 O Open Source Models on Hugging Face
  • 25. 25 | © Copyright 2024 Zilliz 25 Well-connected in LLM infrastructure to enable RAG use cases Framework Hardware Infrastructure Embedding Models LLMs Software Infrastructure Vector Database
  • 26. 26 | © Copyright Zilliz 26 C Langchain and Other Frameworks
  • 27. 27 | © Copyright Zilliz 27 What is LangChain - LLM Chaining Framework - Plugins with most popular tools - Focus on “chainingˮ results or “orchestrationˮ
  • 28. 28 | © Copyright Zilliz 28
  • 29. 29 | © Copyright 2024 Zilliz 29 Well-connected in LLM infrastructure to enable RAG use cases Framework Hardware Infrastructure Embedding Models LLMs Software Infrastructure Vector Database
  • 30. 30 | © Copyright 2024 Zilliz 30
  • 31. 31 | © Copyright Zilliz 31 U Under the Covers
  • 32. 32 | © Copyright Zilliz 32 Use math to quantify relationships between entities
  • 33. 33 | © Copyright Zilliz 33 Vector databases efficiently store, index, and relate entities by a quantitative value
  • 34. 34 | © Copyright Zilliz 34 Vector similarity is a mathematical measure of how close two vectors are
  • 35. 35 | © Copyright Zilliz 35 Similarity metrics are ways to measure distance in vector space
  • 36. 36 | © Copyright Zilliz 36 Vector Similarity Metric: L2 Euclidean) Queen = [0.3, 0.9] King = [0.5, 0.7] d(Queen, King) = √(0.3-0.5)2 + (0.9-0.7)2 = √(0.2)2 + (0.2)2 = √0.04 + 0.04 = √0.08 ≅ 0.28
  • 37. 37 | © Copyright Zilliz 37 Vector Similarity Metric: Inner Product IP Queen = [0.3, 0.9] King = [0.5, 0.7] Queen · King = (0.3*0.5) + (0.9*0.7) = 0.15 + 0.63 = 0.78
  • 38. 38 | © Copyright Zilliz 38 Queen = [0.3, 0.9] King = [0.5, 0.7] Vector Similarity Metric: Cosine 𝚹 cos(Queen, King) = (0.3*0.5)+(0.9*0.7) √0.32 +0.92 * √0.52 +0.72 = 0.15+0.63 _ √0.9 * √0.74 = 0.78 _ √0.666 ≅ 0.03
  • 39. 39 | © Copyright Zilliz 39 Vector Similarity Metrics Euclidean - Spatial distance Cosine - Orientational distance Inner Product - Both With normalized vectors, IP  Cosine
  • 40. 40 | © Copyright Zilliz 40 Indexes organize the way we access our data
  • 41. 41 | © Copyright Zilliz 41 | © Copyright Zilliz 41 RESOURCES
  • 42. 42 | © Copyright Zilliz 42 Vector Database Resources Give Milvus a Star! Chat with me on Discord! https://github.com/milvus-io/milvus
  • 43. 43 Unstructured Data Meetup https://www.meetup.com/unstructured-data-meetup-new-york/ This meetup is for people working in unstructured data. Speakers will come present about related topics such as vector databases, LLMs, and managing data at scale. The intended audience of this group includes roles like machine learning engineers, data scientists, data engineers, software engineers, and PMs. This meetup was formerly Milvus Meetup, and is sponsored by Zilliz maintainers of Milvus.
  • 44. 44 | © Copyright Zilliz 44 https://zilliz.com/learn/generative-ai
  • 45. 45 | © Copyright 2024 Zilliz 45 45 This week in Milvus, Towhee, Attu, GPT Cache, Gen AI, LLM, Apache NiFi, Apache Flink, Apache Kafka, ML, AI, Apache Spark, Apache Iceberg, Python, Java, Vector DB and Open Source friends. https://bit.ly/32dAJft https://github.com/milvus-io/milvus AIM Weekly by Tim Spann
  • 46. 46 | © Copyright 2024 Zilliz 46 milvus.io github.com/milvus-io/ @milvusio @paasDev /in/timothyspann Connect with me! Thank you!