SlideShare a Scribd company logo
8
Most read
11
Most read
16
Most read
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Donghoon Jang
Database Specialist SA
AWS
Neptune Analytics
Vector Similar Search
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
2
Agenda
• Graph Data Model
• Amazon Neptune
• Vector Similarity Search with Neptune
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
3
Graph Model
그래프 데이터 모델은 관계
(Relationships) 를 기반
그래프는 연결된 데이터의
연결 및 패턴을 탐색
Name:
Alice
City:
Anytown
works_with
Name:
Bob
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
4
Graph Model
PROPERTY
GRAPH
RESOURCE
DESCRIPTION
FRAMEWORK (RDF)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
5
Graph Model Label
Node/Vertex
Property
Rel/Edge
Property
Property graph Model
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
6
Graph Model
부자연스러운
쿼리
비효율적인 처리
데이터 변경에 유연하지
않은 엄격한 스키마
vs.RelationalModel
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
7
Graph Model
UseCases
서로 연결된 데이터를 기반으로
• 데이터 자체만큼 데이터 간의 관계가 중요
• 결과가 관계의 강도, 무게 또는 질에 따라 변화
소셜
네트워크
추천 지식 그래프 사기 감지 생명 과학
네트워크 및 IT
운영
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
8
Neptune Analytics
Amazon Neptune
Amazon Neptune
Neptune
Analytics
Neptune
ML
Neptune
Database
𝑃! 𝑃"
𝑃#
𝑃$
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
9
Neptune Analytics
NeptuneDatabases
Neptune
Workbench
Social
networking
Knowledge
graph
Fraud
detection
1 writer and up to 15 read replicas
6 copies of data
across 3 AZs
Up to 128 TiB Automated backup
and restore
Database fast
clone
Bulk load
from S3
Neptune
Streams
Status
Endpoint
Query Read replica
Profile and auto scaling
Explain
AWS Backup Neptune ML Amazon
OpenSearch
Security Graph
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
10
Neptune Analytics
Ø 그래프 워크로드를 위한 단일 서비스
Ø 고성능 그래프 분석 쿼리 및 그래프 알고리즘
Ø Gen AI 애플리케이션을 위한 벡터 저장 및 검색
사용 사례
• 임시 분석
• 낮은 지연 시간의 분석 쿼리
• 그래프 데이터를 이용한 벡터 검색
클러스터링 분석의 예
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
11
Neptune Analytics
Centrality
Degree
PageRank
Closeness
Path Finding
Breadth First Search
Single Source Shortest Path
topK Hop-Limited BFS
Vector Similarity
topK Search
Vector Distance
Clustering
Weakly Connected Components
Label Propagation
Strongly Connected Components
Similarity
Common Neighbors
Total Neighbors
Overlap Similarity
Jaccard Similarity
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
12
Neptune Analytics
Neptune Database Neptune Analytics
Architecture 인스턴스 기반(단일 라이터, 다중 리더)
서버리스 지원
메모리 최적화(캐싱)
메모리 기반
HPC 스타일 그래프 파티셔닝 사용
Terminology Cluster Graph
Graph Frameworks RDF
Property Graph
Property Graph
Query Languages SPARQL (RDF)
openCypher / Gremlin
openCypher – supports CALL, YIELD
Global Databases 단일 기본 리전, 최대 5개의 리더 리전 아직 지원되지 않음
Data Ingestion Bulk Load
Lambda
Bulk Load (80배 더 빠른 로드)
Data Plane API
Workload Types OLTP (transactional) OLAP (analytical)
메모리 집약적인 그래프 계산을 위해 조정됨
Storage 영구 저장 임시 분석 – 대규모 데이터 세트를 빠르게
로드하고 분석
벡터 지원
Generative AI RAG를 위한 LangChain 통합 RAG를 위한 LangChain 통합
벡터/유사성 검색
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
13
Neptune Analytics
사용 사례 사용을 고려…
그래프 데이터 세트 저장
및 관리
Neptune 데이터베이스는 뛰어난 확장성과 가용성을 위해 설계된 서버리스
그래프 데이터베이스
사용 시기 : Neptune 데이터베이스는 초당 100,000개의 쿼리, 다중 AZ
고가용성 및 다중 지역 배포로 확장해야 하는 그래프 데이터베이스
워크로드를 위한 솔루션
그래프 데이터 세트 분석 Neptune Analytics는 대량의 그래프 데이터를 빠르게 분석하여 통찰력을 얻고
추세를 찾아내는 그래프 분석 데이터베이스 엔진
사용 시기: Neptune Analytics는 널리 사용되는 그래프 분석 알고리즘과 지연
시간이 짧은 분석 쿼리를 사용하여 데이터 레이크에 저장된 기존 그래프
데이터베이스 또는 그래프 데이터 세트를 신속하게 분석하기 위한 솔루션
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
14
Neptune Analytics
// Algorithms
MATCH (n:airport {country: 'US’})
WITH collect(n) as airports, n.region as region
CALL neptune.algos.bfs.levels(n)
YIELD node, level
RETURN node, level
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
15
Neptune Analytics
MATCH (n:Book {name: ‘Travel: Portugal’})
// 1 //
CALL neptune.vectors.topKByNode(n, { topK: 10 } )
YIELD node, score, rank
// 2 //
MATCH p=(node)-[*1..3]->(suspicious)
WHERE (suspicious: seller OR suspicious: lister OR suspicious: buyer)
// 3 //
RETURN n, collect(p), score, rank
ORDER BY rank DESC
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
16
Neptune & Vector Similar Search
Neptune
Analytics
Graph Analytics and Vector Search
Amazon
S3
Generative AI Models (LLM)
Amazon
SageMaker
LangChain
OSS
Amazon
Bedrock
Neptune
Database
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
17
Vector Similarity Search
• 벡터 검색은 암시적 유사성을 찾음
• 그래프는 명시적인 컨텍스트를 찾음
• Gen AI 애플리케이션에 대한 더욱
풍부한 응답 제공
Neptune Analytics
Native vector index
Graph
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
18
Vector Similarity Search
Natural language
queries
Vector similarity
search (VSS)
Vector Embedding
공항과 항로 검색
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
19
Vector Similarity Search
• 읽기 쿼리는 세 가지 기본 부분을 기반으로 함 :
• Find
• Filter
• Format
MATCH (a:airport)-[:route]->(b:airport)
WHERE a.code = 'CZM'
RETURN a.code as Source, b.code AS
Destination
Find
Filter
Format
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
20
Vector Similarity Search
Natural language
queries
VSS and
traversals
Vector Embedding
공항과 항로 검색
import boto3
from langchain.embeddings import BedrockEmbeddings
import pandas as pd
df = pd.read_csv("air-routes-latest-nodes.csv")
bedrock_client = boto3.client(service_name="bedrock-runtime", region_name="<INSERT REGION>")
bedrock_embeddings = BedrockEmbeddings(
model_id="amazon.titan-embed-text-v1", client=bedrock_client
)
for i in df.index:
if df.loc[i]["~label"] == "airport":
json = df.loc[i].to_json()
embedding = bedrock_embeddings.embed_query(json)
df.at[i, "embedding:vector"] = (
str(embedding).replace(", ", ";").replace("[", "").replace("]", "")
)
if i % 25 == 0:
print(f"Embedding row {i}")
df.to_csv("air-routes-latest-nodes.csv", index=False)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
21
Vector Similarity Search
Natural language
queries
Vector similarity
search (VSS)
Vector Embedding
공항과 항로 검색
// Vector Similarity Distance Algorithms
MATCH (n {code: 'ANC'})
MATCH (m) WHERE m.code in ['SEA', 'FAI']
CALL neptune.algo.vectors.distance(n, m)
YIELD distance
RETURN n.code, m.code, distance
// Graph Traverse Query
MATCH (arc:airport)-[*2]->(dest)
WHERE arc.code='ARC' AND NOT (arc)-->(dest) AND dest <> arc
RETURN DISTINCT dest.city AS City
ORDER BY City
// Vector Similarity TopK Algorithms
MATCH ( n:airport {code: 'ANC'} )
CALL neptune.algo.vectors.get(n) YIELD
embedding
RETURN embedding
embedding = res['results'][0]['embedding']
print(len(embedding))
CALL neptune.algo.vectors.topKByEmbedding(
${embedding}
)
YIELD node, score
RETURN node.code, node.desc, score
MATCH ( n:airport {code: 'ANC'} )
CALL neptune.algo.vectors.topKByNode(n)
YIELD node, score
RETURN node.code, node.desc, score
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
22
Vector Similarity Search
Natural language
queries
Vector similarity
search (VSS)
Vector Embedding
공항과 항로 검색
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!

More Related Content

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
Amazon Web Services Korea
 
PDF
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
Amazon Web Services Korea
 
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea
 
PDF
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea
 
PDF
VUCA 시대의 디지털 네이티브 리더가 알아야할 AWS의 기술 ::: AWS ExecLeaders Korea 2023
Amazon Web Services Korea
 
PDF
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
Amazon Web Services Korea
 
PDF
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
Amazon Web Services Korea
 
PDF
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
Amazon Web Services Korea
 
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
Amazon Web Services Korea
 
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
Amazon Web Services Korea
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea
 
VUCA 시대의 디지털 네이티브 리더가 알아야할 AWS의 기술 ::: AWS ExecLeaders Korea 2023
Amazon Web Services Korea
 
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
Amazon Web Services Korea
 
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
Amazon Web Services Korea
 
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
Amazon Web Services Korea
 

Similar to [D3T1S06] Neptune Analytics with Vector Similarity Search (20)

PDF
[보험사를 위한 AWS Data Analytics Day] 6_Data Analytics의 현재와 미래-토ᄉ...
AWS Korea 금융산업팀
 
PDF
[보험사를 위한 AWS Data Analytics Day] 5_KB금융그룹과 계열사의 AWS 기ᄇ...
AWS Korea 금융산업팀
 
PDF
[보험사를 위한 AWS Data Analytics Day] 5_KB금융그룹과 계열사의 AWS 기ᄇ...
AWS Korea 금융산업팀
 
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기
Amazon Web Services Korea
 
PDF
분석 워크로드 마이그레이션의 모든 것-김기영, AWS Analytics Specialist SA / 김성일, AWS Analytics Sp...
Amazon Web Services Korea
 
PDF
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
Amazon Web Services Korea
 
PDF
[25D2S07]_Amazon Nova를 이용해 향샹된 RAG 활용하기.pdf
Amazon Web Services
 
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | 12가지 디자인 패턴으로 알아보는 클라우드 네이티브 마이크로서비스 아키텍처
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | AWS 마이그레이션을 통한 엔카닷컴의 DT 전략
Amazon Web Services Korea
 
PDF
제 18회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [이탈리안 BMT] : 지하철 지연 시간 데이터 분석 및 시각화를 위한 데이터 파이프라인 구축
BOAZ Bigdata
 
PPTX
강연 1. AWS 소개 및 AWS의 역사:: AWSome Day Online Conference
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | AWS에서 OpenTelemetry 기반의 애플리케이션 Observability 구축/활용하기
Amazon Web Services Korea
 
PDF
[25D2S10]_생성형 AI를 가속화하기 위한 데이터 기반 구축.pdf
Amazon Web Services
 
PDF
Amazon Elastcsearch Service 소개 및 활용 방법 (윤석찬)
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | 혁신의 키워드는 '조직'과 '문화' - 하이브리드 클라우드 플랫폼과 agile 조직이 만드는 혁신
Amazon Web Services Korea
 
PDF
서버리스 아키텍처 패턴 및 로그 처리를 위한 파이프라인 구축기 - 황윤상 솔루션즈 아키텍트, AWS / Matthew Han, SendBi...
Amazon Web Services Korea
 
PDF
AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례
Amazon Web Services Korea
 
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea
 
[보험사를 위한 AWS Data Analytics Day] 6_Data Analytics의 현재와 미래-토ᄉ...
AWS Korea 금융산업팀
 
[보험사를 위한 AWS Data Analytics Day] 5_KB금융그룹과 계열사의 AWS 기ᄇ...
AWS Korea 금융산업팀
 
[보험사를 위한 AWS Data Analytics Day] 5_KB금융그룹과 계열사의 AWS 기ᄇ...
AWS Korea 금융산업팀
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | Amazon Neptune 및 Elastic을 이용한 추천 서비스 및 검색 플랫폼 구축하기
Amazon Web Services Korea
 
분석 워크로드 마이그레이션의 모든 것-김기영, AWS Analytics Specialist SA / 김성일, AWS Analytics Sp...
Amazon Web Services Korea
 
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
Amazon Web Services Korea
 
[25D2S07]_Amazon Nova를 이용해 향샹된 RAG 활용하기.pdf
Amazon Web Services
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | 12가지 디자인 패턴으로 알아보는 클라우드 네이티브 마이크로서비스 아키텍처
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | AWS 마이그레이션을 통한 엔카닷컴의 DT 전략
Amazon Web Services Korea
 
제 18회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [이탈리안 BMT] : 지하철 지연 시간 데이터 분석 및 시각화를 위한 데이터 파이프라인 구축
BOAZ Bigdata
 
강연 1. AWS 소개 및 AWS의 역사:: AWSome Day Online Conference
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | AWS에서 OpenTelemetry 기반의 애플리케이션 Observability 구축/활용하기
Amazon Web Services Korea
 
[25D2S10]_생성형 AI를 가속화하기 위한 데이터 기반 구축.pdf
Amazon Web Services
 
Amazon Elastcsearch Service 소개 및 활용 방법 (윤석찬)
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | 혁신의 키워드는 '조직'과 '문화' - 하이브리드 클라우드 플랫폼과 agile 조직이 만드는 혁신
Amazon Web Services Korea
 
서버리스 아키텍처 패턴 및 로그 처리를 위한 파이프라인 구축기 - 황윤상 솔루션즈 아키텍트, AWS / Matthew Han, SendBi...
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | 스타트업의 서버리스 기반 SaaS 데이터 처리 및 데이터웨어하우스 구축 사례
Amazon Web Services Korea
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea
 
Ad

More from Amazon Web Services Korea (19)

PDF
[D3T1S03] Amazon DynamoDB design puzzlers
Amazon Web Services Korea
 
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
Amazon Web Services Korea
 
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
Amazon Web Services Korea
 
PDF
[D3T1S02] Aurora Limitless Database Introduction
Amazon Web Services Korea
 
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
Amazon Web Services Korea
 
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea
 
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea
 
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea
 
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea
 
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea
 
PDF
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea
 
PDF
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
Amazon Web Services Korea
 
PDF
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon Web Services Korea
 
PDF
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
Amazon Web Services Korea
 
PDF
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
Amazon Web Services Korea
 
PDF
[Keynote] Data Driven Organizations with AWS Data - 발표자: Agnes Panosian, Head...
Amazon Web Services Korea
 
[D3T1S03] Amazon DynamoDB design puzzlers
Amazon Web Services Korea
 
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
Amazon Web Services Korea
 
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
Amazon Web Services Korea
 
[D3T1S02] Aurora Limitless Database Introduction
Amazon Web Services Korea
 
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
Amazon Web Services Korea
 
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea
 
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea
 
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
Amazon Web Services Korea
 
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon Web Services Korea
 
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
Amazon Web Services Korea
 
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
Amazon Web Services Korea
 
[Keynote] Data Driven Organizations with AWS Data - 발표자: Agnes Panosian, Head...
Amazon Web Services Korea
 
Ad

[D3T1S06] Neptune Analytics with Vector Similarity Search

  • 1. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Donghoon Jang Database Specialist SA AWS Neptune Analytics Vector Similar Search
  • 2. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 2 Agenda • Graph Data Model • Amazon Neptune • Vector Similarity Search with Neptune
  • 3. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 3 Graph Model 그래프 데이터 모델은 관계 (Relationships) 를 기반 그래프는 연결된 데이터의 연결 및 패턴을 탐색 Name: Alice City: Anytown works_with Name: Bob
  • 4. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 4 Graph Model PROPERTY GRAPH RESOURCE DESCRIPTION FRAMEWORK (RDF)
  • 5. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 5 Graph Model Label Node/Vertex Property Rel/Edge Property Property graph Model
  • 6. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 6 Graph Model 부자연스러운 쿼리 비효율적인 처리 데이터 변경에 유연하지 않은 엄격한 스키마 vs.RelationalModel
  • 7. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 7 Graph Model UseCases 서로 연결된 데이터를 기반으로 • 데이터 자체만큼 데이터 간의 관계가 중요 • 결과가 관계의 강도, 무게 또는 질에 따라 변화 소셜 네트워크 추천 지식 그래프 사기 감지 생명 과학 네트워크 및 IT 운영
  • 8. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 8 Neptune Analytics Amazon Neptune Amazon Neptune Neptune Analytics Neptune ML Neptune Database 𝑃! 𝑃" 𝑃# 𝑃$
  • 9. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 9 Neptune Analytics NeptuneDatabases Neptune Workbench Social networking Knowledge graph Fraud detection 1 writer and up to 15 read replicas 6 copies of data across 3 AZs Up to 128 TiB Automated backup and restore Database fast clone Bulk load from S3 Neptune Streams Status Endpoint Query Read replica Profile and auto scaling Explain AWS Backup Neptune ML Amazon OpenSearch Security Graph
  • 10. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 10 Neptune Analytics Ø 그래프 워크로드를 위한 단일 서비스 Ø 고성능 그래프 분석 쿼리 및 그래프 알고리즘 Ø Gen AI 애플리케이션을 위한 벡터 저장 및 검색 사용 사례 • 임시 분석 • 낮은 지연 시간의 분석 쿼리 • 그래프 데이터를 이용한 벡터 검색 클러스터링 분석의 예
  • 11. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 11 Neptune Analytics Centrality Degree PageRank Closeness Path Finding Breadth First Search Single Source Shortest Path topK Hop-Limited BFS Vector Similarity topK Search Vector Distance Clustering Weakly Connected Components Label Propagation Strongly Connected Components Similarity Common Neighbors Total Neighbors Overlap Similarity Jaccard Similarity
  • 12. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 12 Neptune Analytics Neptune Database Neptune Analytics Architecture 인스턴스 기반(단일 라이터, 다중 리더) 서버리스 지원 메모리 최적화(캐싱) 메모리 기반 HPC 스타일 그래프 파티셔닝 사용 Terminology Cluster Graph Graph Frameworks RDF Property Graph Property Graph Query Languages SPARQL (RDF) openCypher / Gremlin openCypher – supports CALL, YIELD Global Databases 단일 기본 리전, 최대 5개의 리더 리전 아직 지원되지 않음 Data Ingestion Bulk Load Lambda Bulk Load (80배 더 빠른 로드) Data Plane API Workload Types OLTP (transactional) OLAP (analytical) 메모리 집약적인 그래프 계산을 위해 조정됨 Storage 영구 저장 임시 분석 – 대규모 데이터 세트를 빠르게 로드하고 분석 벡터 지원 Generative AI RAG를 위한 LangChain 통합 RAG를 위한 LangChain 통합 벡터/유사성 검색
  • 13. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 13 Neptune Analytics 사용 사례 사용을 고려… 그래프 데이터 세트 저장 및 관리 Neptune 데이터베이스는 뛰어난 확장성과 가용성을 위해 설계된 서버리스 그래프 데이터베이스 사용 시기 : Neptune 데이터베이스는 초당 100,000개의 쿼리, 다중 AZ 고가용성 및 다중 지역 배포로 확장해야 하는 그래프 데이터베이스 워크로드를 위한 솔루션 그래프 데이터 세트 분석 Neptune Analytics는 대량의 그래프 데이터를 빠르게 분석하여 통찰력을 얻고 추세를 찾아내는 그래프 분석 데이터베이스 엔진 사용 시기: Neptune Analytics는 널리 사용되는 그래프 분석 알고리즘과 지연 시간이 짧은 분석 쿼리를 사용하여 데이터 레이크에 저장된 기존 그래프 데이터베이스 또는 그래프 데이터 세트를 신속하게 분석하기 위한 솔루션
  • 14. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 14 Neptune Analytics // Algorithms MATCH (n:airport {country: 'US’}) WITH collect(n) as airports, n.region as region CALL neptune.algos.bfs.levels(n) YIELD node, level RETURN node, level
  • 15. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 15 Neptune Analytics MATCH (n:Book {name: ‘Travel: Portugal’}) // 1 // CALL neptune.vectors.topKByNode(n, { topK: 10 } ) YIELD node, score, rank // 2 // MATCH p=(node)-[*1..3]->(suspicious) WHERE (suspicious: seller OR suspicious: lister OR suspicious: buyer) // 3 // RETURN n, collect(p), score, rank ORDER BY rank DESC
  • 16. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 16 Neptune & Vector Similar Search Neptune Analytics Graph Analytics and Vector Search Amazon S3 Generative AI Models (LLM) Amazon SageMaker LangChain OSS Amazon Bedrock Neptune Database
  • 17. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 17 Vector Similarity Search • 벡터 검색은 암시적 유사성을 찾음 • 그래프는 명시적인 컨텍스트를 찾음 • Gen AI 애플리케이션에 대한 더욱 풍부한 응답 제공 Neptune Analytics Native vector index Graph
  • 18. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 18 Vector Similarity Search Natural language queries Vector similarity search (VSS) Vector Embedding 공항과 항로 검색
  • 19. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 19 Vector Similarity Search • 읽기 쿼리는 세 가지 기본 부분을 기반으로 함 : • Find • Filter • Format MATCH (a:airport)-[:route]->(b:airport) WHERE a.code = 'CZM' RETURN a.code as Source, b.code AS Destination Find Filter Format
  • 20. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 20 Vector Similarity Search Natural language queries VSS and traversals Vector Embedding 공항과 항로 검색 import boto3 from langchain.embeddings import BedrockEmbeddings import pandas as pd df = pd.read_csv("air-routes-latest-nodes.csv") bedrock_client = boto3.client(service_name="bedrock-runtime", region_name="<INSERT REGION>") bedrock_embeddings = BedrockEmbeddings( model_id="amazon.titan-embed-text-v1", client=bedrock_client ) for i in df.index: if df.loc[i]["~label"] == "airport": json = df.loc[i].to_json() embedding = bedrock_embeddings.embed_query(json) df.at[i, "embedding:vector"] = ( str(embedding).replace(", ", ";").replace("[", "").replace("]", "") ) if i % 25 == 0: print(f"Embedding row {i}") df.to_csv("air-routes-latest-nodes.csv", index=False)
  • 21. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 21 Vector Similarity Search Natural language queries Vector similarity search (VSS) Vector Embedding 공항과 항로 검색 // Vector Similarity Distance Algorithms MATCH (n {code: 'ANC'}) MATCH (m) WHERE m.code in ['SEA', 'FAI'] CALL neptune.algo.vectors.distance(n, m) YIELD distance RETURN n.code, m.code, distance // Graph Traverse Query MATCH (arc:airport)-[*2]->(dest) WHERE arc.code='ARC' AND NOT (arc)-->(dest) AND dest <> arc RETURN DISTINCT dest.city AS City ORDER BY City // Vector Similarity TopK Algorithms MATCH ( n:airport {code: 'ANC'} ) CALL neptune.algo.vectors.get(n) YIELD embedding RETURN embedding embedding = res['results'][0]['embedding'] print(len(embedding)) CALL neptune.algo.vectors.topKByEmbedding( ${embedding} ) YIELD node, score RETURN node.code, node.desc, score MATCH ( n:airport {code: 'ANC'} ) CALL neptune.algo.vectors.topKByNode(n) YIELD node, score RETURN node.code, node.desc, score
  • 22. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 22 Vector Similarity Search Natural language queries Vector similarity search (VSS) Vector Embedding 공항과 항로 검색
  • 23. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you!