Modern Analytics & Reporting with Milvus Vector DB and GenAI

chloewilliams62 199 views 17 slides Aug 14, 2024
Slide 1
Slide 1 of 17
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

About This Presentation

See how Milvus Cloud features can be applied up in the stack by developers to deliver interactive analytics using Milvus vector search and GenAI across the application life-cycle. Qarbine also includes a unique SQL-like option for a more approachable query interface than what the Milvus API provides...


Slide Content

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Modern Analytics & Reporting with
Milvus Vector DB and GenAI
1

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
2
Speaker Background
•4 ventures with 3 focused on data and analytics
and 1 in the national cyber security space.
•Lead architect for software libraries used by
over 50%+ of the Fortune 500.
•Interfaced to 50+ databases and 15+ AI services.
•Qarbine is 6
th
reporting engine with 2 previous
ones earning technology buyouts.
•Mentor at First Round Capital, Princeton
University, and Northeastern University.

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Why Milvus for a Database?
•Highly performant vector DB with cloud option
•Scalable and very configurable
•BYO LLM flexibility –public or private
•Multi-modal support
3
{
title: 'The Reported Mortality Rate of
Coronavirus Is Not Important',
title_vector: [0.041732933, ..., 0.030096486],
article_meta: {
link: 'https://medium.com/swlh/the-
important-369989c8d912',
reading_time: 13,
publication: 'The Startup',
claps: 1100,
responses: 18,
tag_1: [4, 15, 6, 7, 9],
tag_2: [[2, 3, 4], [7, 8, 9], [5, 6, 1]]
}
}
•JSON with meta data
https://cloud.zilliz.com/signup
Sign up for free Milvus Cloud account

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Modern Data & AI Aware Application
Developers with
schema knowledge
and query skills
Modern Application Challenges
Love the app!
Where’s the report
button for X, Y, & Z?
Sales Manager
Love the app!
What’s a vector query?
Just get me the data!
Analyst with legacy tools & skills
4
Argh!

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Where Qarbine Fits in the Enterprise
Summary Visualizations
5
PlusDetailed Analytic Reports
EmbeddableDev & Analyst Suite
Deployment Options:

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Application Architecture with Milvus
6
Modern Data Tool Suite
Qarbine Backend
Node.js
Express
Modular service plugins
Modular data drivers
Shared Catalog

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Full Toolset for Modern Data & AI
Configure Milvus and Gen AI services here
7
Separating data retrieval from
analysis & formatting enables devs
to define Milvus queries in the
catalog which are then simply
referenced by analysts to perform
their tasks

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
8
milvusClient.query( {
collection_name: string,
consistency_level?: ConsistencyLevelEnum,
filter: string,
ids?: string[] | number[],
limit?: number,
offset?: number,
output_fields?: string[],
partition_names?: string[],
timeout?: number
})
var milvusClient= new MilvusClient(options:ClientConfig)
Basic Milvus Retrieval in Node.js
https://github.com/milvus-io/milvus-sdk-node
https://milvus.io/docs/boolean.md(filter info)
https://milvus.io/api-reference/node/v2.2.x/About.md
milvusClient.query( {
collection_name: COLLECTION_NAME,
filter: 'id > 0',
output_fields: ['vector', 'id'],
})

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
9
milvusClient.search( {
collection_name: string,
vector_type: BinaryVector | FloatVector,
vector: number[],  BYO vector
consistency_level: ConsistencyLevelEnum,
expr: string,
nq: number,
output_fields: string[],
partition_names: string[],
search_params: SearchParam,
timeout: number,
travel_timestamp: string
})
Milvus Vector Retrieval in Node.js
Things to keep in mind:
•Vectors are usually not needed in the output so set “output_fields” accordingly and
save some bandwidth. By default, Qarbine removes the vector field of each row.
•Qarbine uses Milvus API version 1. Version 2 was inconsistent with the docs at the time.
milvusClient.search( {
vector: [ … ],
collection_name: COLLECTION_NAME,
output_fields: [‘*’],
expr: "color in ['pink_8682', 'red_9392']",
limit: 5,
})

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Qarbine No-code “Prompt” for Runtime Values
Base
Query
nearText(@userPrompt)
Need vector for “python”
Qarbine “Data Source”
Dynamic embedding lookup
Embeddable Interactive Analysis Result
General Vector DB to Analysis Result Execution Flow
Developer Benefits:
-Brings Milvus & GenAIpower to the application layer
-Qarbine natively accesses Milvus vector DB
-Developers gain a productive way to embed vector
search and interactive Gen AI RAG content
-Nested JSON answer sets are perfectly fine
-Faster time to value for everyone
Final
Query
vector: [embedding … ]
Template
Processor
Answer set

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Optional Qarbine Query Syntax
11
{ collectionName: 'quick_setup',
outputFields: [*],
vector : [ 0.19886813, … ],
filter: "color in ['pink_8682', 'red_9392']",
limit: 10 }
The more approachable Qarbine SQL oriented syntax is
select * from quick_setup
where nearVector(0.19886813, …)
and color in ('pink_8682', 'red_9392')
limit 10
Things to keep in mind:
•In Milvus filters operators ‘and’ and ‘not’ are case sensitive!
•The Qarbine SQL world is handles this nuance for you ;-)

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Dynamic Vector Determination Query
12
Base
Query nearText(“python”)
Qarbine “Data Source”
Dynamic embedding lookup
Final
Query
where nearVector(0.19886813, …)Previous Query
select * from quick_setup
where nearText(@userPrompt)
and color in ('pink_8682', 'red_9392’) limit 10
Base Dynamic
Query
Final Query
{
collectionName: quick_setup,
outputFields: ["*"],
vector : [ <VECTOR_FROM_OPEN_AI> ],
filter: "color in ['pink_8682', 'red_9392']",
limit: 10
}

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
Group
content
Dynamic RAG Analysis Output
13
Template
Processor
Qarbine Template Designer combines Microsoft Word formatting,
Excel formulas, and PowerPoint layout features
= completions("Comment on…" + stockText, “myOpenAI”)
Group summary
Formatted report header content

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
14
Interactive RAG –Just Click to “Ask AI”

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
15
Benefits of Developing an SQL Interface
Milvus integration slides right into Qarbine tools that generate SQL
select color, distance
from quick_setup
where nearVector(0.19886813,…)
AND color LIKE 'red%’
limit 25

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
16
Milvus Query Assistant
AI Assistant

Unstructured Data Meetup in NYC, 13 Aug 2024 Contact Bill Reynolds at [email protected]
How to Learn More About Milvus Analytics
17
Provides an end-to-end suite of tools to query,
analyze and present Milvus vector DB data
Request early access to the Milvus aware release
See https://qarbine.comfor more information
https://cloud.zilliz.com/signup
Sign up for free Milvus Cloud account
https://github.com/milvus-io/milvus-sdk-node
Try out the many examples and tutorial guides
Tags