SlideShare a Scribd company logo
1 of 30
Download to read offline
MongoDB for Generative
AI-powered Applications
Welcome
Prakul Agarwal
Senior Product Manager
Machine Learning
David Macias
Lead Product Marketer
Agenda
Intro to Generative AI-Powered Apps
Use Cases and RAG w/MongoDB Atlas
Demo: Confluent Cloud + MongoDB Atlas
MongoDB Atlas Vector Search
What is a Generative AI-powered App
Generative AI (Gen AI) is software that can generate, or
create, something new when asked through a prompt.
Adobe Firefly
What we’re seeing in the industry
Chatbots Mind Blowing Ideas
360 View + LLM
Demo at the end!
: Global auto manufacturer
Gen AI
Diagnostics
Car
sounds
What is an LLM ?
-Gen AI uses “Large Language Models” or
LLMs that provide a general-purpose AI
“brain,” no custom building needed for each
project.
-The LLM performs the “generative” functions,
for example, creating text, image, write code
or video.
-LLMs “studied” enormous amounts of public
data to learn patterns between words, images,
videos, or other data.
- OpenAI’s GPT is the most popular LLM
- ChatGPT is a Gen AI app built using the
popular GPT as it’s brain
- Meta’s LLaMa is an example of an open
source LLM
Non-specific answer
LLM
No context prompt
“How do I sell new MongoDB
and Kafka to my accounts
based on their current and
upcoming priorities?”
“MongoDB is chosen for its flexibility
and scalability, performance and
availability, and its ease of use and
security. Tailor these points to the
needs of the engineering leader
you're pitching to.”
Not specific. Doesn’t
mention Atlas or
Confluent Cloud.
Giant “brain” of general
knowledge
An LLM that hasnʼt been made useful
Making an LLM useful
General intelligence
(generic AI/ML models)
Streams
Serverless
Edge
Hybrid
Search
Access to proprietary data
A well trained LLM refined
with multimodal data
From this To This
How
Company specific data
Order history
Product info
Specific, well
informed answer
LLM
Augmenting an LLM with proprietary data
Retrieval-augmented generation (RAG)
Proprietary
Data
Context data Vector Embeddings
Metadata and
app data
Audio files
Customer
Data
Images
[0.234, 0.351 …]
[0.531, 0.276 …]
[0.713, 0.453 …]
[0.124, 0.321 …]
With context
prompt
Embedding
model
No context prompt
“How do I sell MongoDB and
Kafka to my accounts based
on their current and upcoming
priorities?”
Giant “brain” of general
knowledge
“Consider pitching that MongoDB
Atlas and Confluent Cloud work
great together for any of their
real-time app needs …”
RAG
“How do I sell MongoDB and
Kafka based on their current and
upcoming priorities? Take into
account their Atlas usage, these
call transcripts, etc.”
[0.424, 0.365 …]
Vector search retrieves
contextual data fast
What are Vectors
Vectors
(or vector embedding or just embeddings)
A vector is a list of numbers in an
N-dimensional space that represents the
“semantic” (or underlying) meaning of
something - text, image, video, etc.
How are they created?
For each data record (often just a chunk of
text), an embedding model generates a
vector to represent the data record
Prototype Enterprise-Ready
Flexibility to iterate with speed
Foundational modern app requirements:
Highly reliable, scalable, secure, multi-cloud
Teams building Gen AI powered apps need…
To go from innovative Gen AI idea to production
application
Minimal time, cost, and complexity when
augmenting LLMs with proprietary data
Multi-Cloud Scale, Resilience, Performance, & Security
A well trained LLM refined
with multimodal data
Developer data
platform
+ = An incredibly sophisticated
AI powered app
1 Developer data platform
1 3
Document Model & Unified API
Multi-Cloud Scale, Resilience, Performance, & Security
with Atlas Vector Search
Unifying operational and Gen AI data services
Confluent Cloud +
MongoDB Atlas Demo
Application
User Profiles,
E-commerce
Inventory
Vector Indexes
Collections Atlas Vector Search
Atlas
Triggers
Embedding
Model
Large
Language
Model
( 1 ) User
Query
( 2 ) Make
embedding
from query
( 3 ) Look up related
facts from Atlas
Vector Search
( 4 ) Create
final
response
MongoDB Kafka
Connector
Internal Data Systems
Customer
360 View
Asynchronously
update views with
real-time data
MongoDB
Atlas Vector
Search
Searching across Vector embeddings and
metadata
Achieving low latency for search
AI Ecosystem
Multimodality
Native
Vector Search
Searching across Metadata and Vectors
Vectors in a Document
_id: ObjectId('62f13a3fe7321ca47aecb216')
symbol: "ABMD"
quarter: 4
year: 2021
date: 2021-04-29T20:10:40.000+00:00
content: "Operator: Ladies and gentlemen, thank you for standing by, and welcome..."
content_embeddings: Array
0.03898080065846443
-0.05879044905304909
0.04323238879442215
-0.021337900310754776
-0.036346953362226486
0.028689613565802574
-0.03514527902007103
-0.07414846867322922
-0.00993054173886776
0.007234036456793547
-0.03197460621595383
embeddings are stored as an
array of floats
{
"mappings": {
"fields": {
"content_embedding": {
"type": "knnVector",
"dimensions": 1536,
"similarity": "<euclidean | dotProduct | cosine>"
},
"field1": { "type": "date" }, // optional
"field2": { "type": "double" } // optional
}
}
}
MongoDB Vector Search - Index definition
[{
"$vectorsearch": {
"queryVector": [ 0.03898080065846443, ... ],
"path": "content_embedding",
"limit": 5
"filter": {
// traditional point & range queries
},
}
}
}]
MongoDB Vector Search
Query
query = "Houses in new Jersey with a front yard which are less than 500k"
results = collection.aggregate([{
'$vectorSearch': {
"index": semantic_index_description,
"queryVector": generate_embedding(query),
"path": content_embedding,
"limit": 5
}}}])
Semantic Search Example
Achieving low latency
for search
HNSW
Hierarchical Navigable Small World graphs -
Yury Malkov et al (2016)
● Atlas Vector Search is powered by a graph based
algorithm called HNSW
● These queries are called ANN
(Approximate K nearest neighbors)
● This provides low-latency search and
high-recall results
● Atlas Vector Search keeps updating this graph async
as your underlying data changes
AI Ecosystem
Multi Modality
Connecting Text and Images
- Using models like
OpenAI CLIP you can obtain embeddings
that can work across text and images
- With Atlas Vector Search you can build powerful
applications like “Find similar images” easily
- CLIP stands for Contrastive Language-Image Pre-training
query = "Houses with swimming pool"
results = collection.aggregate([{
'$vectorSearch': {
"index": CLIP_image_index,
"queryVector": generate_embedding(query),
"limit": 3,
"path": clip_embedding
}}}])
Text to Image Search Example
image_url = "https://cdn.com/pictures/34569517.jpg"
results = collection.aggregate([{
'$vectorSearch': {
"index": CLIP_image_index,
"queryVector": generate_embedding_url(image_url),
"limit": 1,
"path": clip_embedding
}}}])
Image Similarity Search
Find Similar
Property
Thank you

More Related Content

What's hot

Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Mihai Criveti
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle
Databricks
 

What's hot (20)

Vector database
Vector databaseVector database
Vector database
 
presentation.pdf
presentation.pdfpresentation.pdf
presentation.pdf
 
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
Retrieval Augmented Generation in Practice: Scalable GenAI platforms with k8s...
 
MLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine LearningMLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine Learning
 
MLOps Using MLflow
MLOps Using MLflowMLOps Using MLflow
MLOps Using MLflow
 
Learn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML LifecycleLearn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML Lifecycle
 
Introduction to LLMs
Introduction to LLMsIntroduction to LLMs
Introduction to LLMs
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
 
Generative AI Masterclass - Model Risk Management.pptx
Generative AI Masterclass - Model Risk Management.pptxGenerative AI Masterclass - Model Risk Management.pptx
Generative AI Masterclass - Model Risk Management.pptx
 
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle
 
What’s New with Databricks Machine Learning
What’s New with Databricks Machine LearningWhat’s New with Databricks Machine Learning
What’s New with Databricks Machine Learning
 
Pythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlowPythonsevilla2019 - Introduction to MLFlow
Pythonsevilla2019 - Introduction to MLFlow
 
What is langchain
What is langchainWhat is langchain
What is langchain
 
Introduction to MLflow
Introduction to MLflowIntroduction to MLflow
Introduction to MLflow
 
Enterprise Knowledge Graph
Enterprise Knowledge GraphEnterprise Knowledge Graph
Enterprise Knowledge Graph
 
"Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow""Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow"
 
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
 
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo MazzaferroRESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
 
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Vertex AI - Unified ML Platform for the entire AI workflow on Google CloudVertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
 

Similar to Accelerating Path to Production for Generative AI-powered Applications

Similar to Accelerating Path to Production for Generative AI-powered Applications (20)

Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020
 
[「RDB技術者のためのNoSQLガイド」出版記念セミナー] Azure DocumentDB
[「RDB技術者のためのNoSQLガイド」出版記念セミナー] Azure DocumentDB[「RDB技術者のためのNoSQLガイド」出版記念セミナー] Azure DocumentDB
[「RDB技術者のためのNoSQLガイド」出版記念セミナー] Azure DocumentDB
 
Build Blockchain Prototype using Azure Workbench and Manage data on ledger
Build Blockchain Prototype using Azure Workbench and Manage data on ledgerBuild Blockchain Prototype using Azure Workbench and Manage data on ledger
Build Blockchain Prototype using Azure Workbench and Manage data on ledger
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.
 
Big Data Day LA 2016/ NoSQL track - Architecting Real Life IoT Architecture, ...
Big Data Day LA 2016/ NoSQL track - Architecting Real Life IoT Architecture, ...Big Data Day LA 2016/ NoSQL track - Architecting Real Life IoT Architecture, ...
Big Data Day LA 2016/ NoSQL track - Architecting Real Life IoT Architecture, ...
 
AIoT and edge computing solutions
AIoT and edge computing solutionsAIoT and edge computing solutions
AIoT and edge computing solutions
 
TechDayPakistan-Slides RAG with Cosmos DB.pptx
TechDayPakistan-Slides RAG with Cosmos DB.pptxTechDayPakistan-Slides RAG with Cosmos DB.pptx
TechDayPakistan-Slides RAG with Cosmos DB.pptx
 
Hyf azure ml_1
Hyf azure ml_1Hyf azure ml_1
Hyf azure ml_1
 
Meetup Toulouse Microsoft Azure : Bâtir une solution IoT
Meetup Toulouse Microsoft Azure : Bâtir une solution IoTMeetup Toulouse Microsoft Azure : Bâtir une solution IoT
Meetup Toulouse Microsoft Azure : Bâtir une solution IoT
 
MongoDB.local Austin 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB.local Austin 2018: Building Intelligent Apps with MongoDB & Google CloudMongoDB.local Austin 2018: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB.local Austin 2018: Building Intelligent Apps with MongoDB & Google Cloud
 
Summit Australia 2019 - Supercharge PowerPlatform with AI - Dipankar Bhattach...
Summit Australia 2019 - Supercharge PowerPlatform with AI - Dipankar Bhattach...Summit Australia 2019 - Supercharge PowerPlatform with AI - Dipankar Bhattach...
Summit Australia 2019 - Supercharge PowerPlatform with AI - Dipankar Bhattach...
 
IBM Meetup on November 1, 2018: Machine Learning made easy with Watson Studio
IBM Meetup on November 1, 2018: Machine Learning made easy with Watson StudioIBM Meetup on November 1, 2018: Machine Learning made easy with Watson Studio
IBM Meetup on November 1, 2018: Machine Learning made easy with Watson Studio
 
AI Solutions with Macnica.ai - AI Expo 2018 Tokyo Japan
AI Solutions with Macnica.ai - AI Expo 2018 Tokyo JapanAI Solutions with Macnica.ai - AI Expo 2018 Tokyo Japan
AI Solutions with Macnica.ai - AI Expo 2018 Tokyo Japan
 
Microsoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science RecapMicrosoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science Recap
 
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI BuilderDynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
 
Microsoft Fabric Introduction
Microsoft Fabric IntroductionMicrosoft Fabric Introduction
Microsoft Fabric Introduction
 
Think IoT and not servers - the power of the serverless analytics IoT platform
Think IoT and not servers - the power of the serverless analytics IoT platform Think IoT and not servers - the power of the serverless analytics IoT platform
Think IoT and not servers - the power of the serverless analytics IoT platform
 
MongoDB.local Sydney 2019: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB.local Sydney 2019: Building Intelligent Apps with MongoDB & Google CloudMongoDB.local Sydney 2019: Building Intelligent Apps with MongoDB & Google Cloud
MongoDB.local Sydney 2019: Building Intelligent Apps with MongoDB & Google Cloud
 
Building Intelligent Apps with MongoDB & Google Cloud
Building Intelligent Apps with MongoDB & Google CloudBuilding Intelligent Apps with MongoDB & Google Cloud
Building Intelligent Apps with MongoDB & Google Cloud
 
[Connect(); // Japan 2016] Microsoft の AI 開発最新アップデート ~ Cognitive Services からA...
[Connect(); // Japan 2016] Microsoft の AI 開発最新アップデート ~ Cognitive Services からA...[Connect(); // Japan 2016] Microsoft の AI 開発最新アップデート ~ Cognitive Services からA...
[Connect(); // Japan 2016] Microsoft の AI 開発最新アップデート ~ Cognitive Services からA...
 

More from HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 

More from HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Accelerating Path to Production for Generative AI-powered Applications

  • 1. MongoDB for Generative AI-powered Applications Welcome Prakul Agarwal Senior Product Manager Machine Learning David Macias Lead Product Marketer
  • 2. Agenda Intro to Generative AI-Powered Apps Use Cases and RAG w/MongoDB Atlas Demo: Confluent Cloud + MongoDB Atlas MongoDB Atlas Vector Search
  • 3. What is a Generative AI-powered App Generative AI (Gen AI) is software that can generate, or create, something new when asked through a prompt. Adobe Firefly
  • 4. What we’re seeing in the industry Chatbots Mind Blowing Ideas 360 View + LLM Demo at the end!
  • 5. : Global auto manufacturer Gen AI Diagnostics Car sounds
  • 6. What is an LLM ? -Gen AI uses “Large Language Models” or LLMs that provide a general-purpose AI “brain,” no custom building needed for each project. -The LLM performs the “generative” functions, for example, creating text, image, write code or video. -LLMs “studied” enormous amounts of public data to learn patterns between words, images, videos, or other data. - OpenAI’s GPT is the most popular LLM - ChatGPT is a Gen AI app built using the popular GPT as it’s brain - Meta’s LLaMa is an example of an open source LLM
  • 7. Non-specific answer LLM No context prompt “How do I sell new MongoDB and Kafka to my accounts based on their current and upcoming priorities?” “MongoDB is chosen for its flexibility and scalability, performance and availability, and its ease of use and security. Tailor these points to the needs of the engineering leader you're pitching to.” Not specific. Doesn’t mention Atlas or Confluent Cloud. Giant “brain” of general knowledge An LLM that hasnʼt been made useful
  • 8. Making an LLM useful General intelligence (generic AI/ML models) Streams Serverless Edge Hybrid Search Access to proprietary data A well trained LLM refined with multimodal data From this To This How Company specific data Order history Product info
  • 9. Specific, well informed answer LLM Augmenting an LLM with proprietary data Retrieval-augmented generation (RAG) Proprietary Data Context data Vector Embeddings Metadata and app data Audio files Customer Data Images [0.234, 0.351 …] [0.531, 0.276 …] [0.713, 0.453 …] [0.124, 0.321 …] With context prompt Embedding model No context prompt “How do I sell MongoDB and Kafka to my accounts based on their current and upcoming priorities?” Giant “brain” of general knowledge “Consider pitching that MongoDB Atlas and Confluent Cloud work great together for any of their real-time app needs …” RAG “How do I sell MongoDB and Kafka based on their current and upcoming priorities? Take into account their Atlas usage, these call transcripts, etc.” [0.424, 0.365 …] Vector search retrieves contextual data fast
  • 10. What are Vectors Vectors (or vector embedding or just embeddings) A vector is a list of numbers in an N-dimensional space that represents the “semantic” (or underlying) meaning of something - text, image, video, etc. How are they created? For each data record (often just a chunk of text), an embedding model generates a vector to represent the data record
  • 11. Prototype Enterprise-Ready Flexibility to iterate with speed Foundational modern app requirements: Highly reliable, scalable, secure, multi-cloud Teams building Gen AI powered apps need… To go from innovative Gen AI idea to production application Minimal time, cost, and complexity when augmenting LLMs with proprietary data
  • 12. Multi-Cloud Scale, Resilience, Performance, & Security A well trained LLM refined with multimodal data Developer data platform + = An incredibly sophisticated AI powered app 1 Developer data platform 1 3 Document Model & Unified API Multi-Cloud Scale, Resilience, Performance, & Security with Atlas Vector Search Unifying operational and Gen AI data services
  • 14.
  • 15. Application User Profiles, E-commerce Inventory Vector Indexes Collections Atlas Vector Search Atlas Triggers Embedding Model Large Language Model ( 1 ) User Query ( 2 ) Make embedding from query ( 3 ) Look up related facts from Atlas Vector Search ( 4 ) Create final response MongoDB Kafka Connector Internal Data Systems Customer 360 View Asynchronously update views with real-time data
  • 16. MongoDB Atlas Vector Search Searching across Vector embeddings and metadata Achieving low latency for search AI Ecosystem Multimodality
  • 18. Vectors in a Document _id: ObjectId('62f13a3fe7321ca47aecb216') symbol: "ABMD" quarter: 4 year: 2021 date: 2021-04-29T20:10:40.000+00:00 content: "Operator: Ladies and gentlemen, thank you for standing by, and welcome..." content_embeddings: Array 0.03898080065846443 -0.05879044905304909 0.04323238879442215 -0.021337900310754776 -0.036346953362226486 0.028689613565802574 -0.03514527902007103 -0.07414846867322922 -0.00993054173886776 0.007234036456793547 -0.03197460621595383 embeddings are stored as an array of floats
  • 19. { "mappings": { "fields": { "content_embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "<euclidean | dotProduct | cosine>" }, "field1": { "type": "date" }, // optional "field2": { "type": "double" } // optional } } } MongoDB Vector Search - Index definition
  • 20. [{ "$vectorsearch": { "queryVector": [ 0.03898080065846443, ... ], "path": "content_embedding", "limit": 5 "filter": { // traditional point & range queries }, } } }] MongoDB Vector Search Query
  • 21. query = "Houses in new Jersey with a front yard which are less than 500k" results = collection.aggregate([{ '$vectorSearch': { "index": semantic_index_description, "queryVector": generate_embedding(query), "path": content_embedding, "limit": 5 }}}]) Semantic Search Example
  • 23. HNSW Hierarchical Navigable Small World graphs - Yury Malkov et al (2016) ● Atlas Vector Search is powered by a graph based algorithm called HNSW ● These queries are called ANN (Approximate K nearest neighbors) ● This provides low-latency search and high-recall results ● Atlas Vector Search keeps updating this graph async as your underlying data changes
  • 25.
  • 27. Connecting Text and Images - Using models like OpenAI CLIP you can obtain embeddings that can work across text and images - With Atlas Vector Search you can build powerful applications like “Find similar images” easily - CLIP stands for Contrastive Language-Image Pre-training
  • 28. query = "Houses with swimming pool" results = collection.aggregate([{ '$vectorSearch': { "index": CLIP_image_index, "queryVector": generate_embedding(query), "limit": 3, "path": clip_embedding }}}]) Text to Image Search Example
  • 29. image_url = "https://cdn.com/pictures/34569517.jpg" results = collection.aggregate([{ '$vectorSearch': { "index": CLIP_image_index, "queryVector": generate_embedding_url(image_url), "limit": 1, "path": clip_embedding }}}]) Image Similarity Search Find Similar Property