《02刘晓国 - Elastic.pdf》由会员分享,可在线阅读,更多相关《02刘晓国 - Elastic.pdf(58页珍藏版)》请在三个皮匠报告上搜索。
1、演讲嘉宾:刘晓国,Elastic 社区首席布道师运用运用 Elasticsearch 向量搜索向量搜索创建创建 RAG 应用应用01 智能时代的搜索需求智能时代的搜索需求02Elasticsearch 向量搜索及最新进展向量搜索及最新进展03RAG 实现原理实现原理04用用 Elasticsearch 在企业搜索中的案例分享在企业搜索中的案例分享目录目录https:/ 时代对搜索提出了新要求过去用户需求现在用户需求全文搜索结构化搜索聚合统计复杂混合搜索排序调优分词向量搜索向量和经典搜索的混合语义搜索模型重排序RAG语义搜索根据搜索查询的意图意图和上下文含义下文含义检索结果,而不仅仅是关键字关键
2、字how to set up elasticsearch ml?machine learningsite:elastic.coconfigureinstallPrelertanomaly detectiongetting startedmachine learning settings词汇搜索结果词汇搜索结果how to set up elasticsearch ml?语义搜索结果语义搜索结果how to set up elasticsearch ml?通过文字搜索找到图片:覆盖雪的山峰覆盖雪的山峰通过图像比较找到相似的图片如何在 Elastic 中实现图片相似度搜Elasticsearch
3、向量搜索向量搜索及最新进展及最新进展02有两种向量模型SPARSE VectorToken Weighted PairsDENSE Vector一长串数字,每个维度一个 数十万至数百万的标记词汇量 Token 加权对 Token:Weight 每个文档-仅存储 N 个最高权重的标记(其余为 0)通过 DotProduct 实现语义搜索 与密集向量搜索相比,内存要求更低 稀疏模型可以实现“后期交互”在数据集上进行训练,以获得较高的“域内”性能 低维(312,512,1536,.)捕捉语义 对于相似性和聚类有用 多模式支持 Text Image Audio 较大的数据集占用大量内存 可解释性差dr
4、oidsyourelookingforandroidselectricsheeprobot#oidscartoonandroidlistandroiddreamrobotcartoonsheeplambNeural Network ExpansionofdogalaxyNeural Network Expansion2.09.740.08.62.74.862.021.071.041.162.46Match!(.088*2.02)+(.74*1.07)+(.62*1.04)1.61Match!Match!Score=Stored in ElasticInput Query文本扩展评分向量搜索概念
5、架构使用向量最近邻生成搜索排名向量搜索支持的应用程序架构了解 5 个关键组件注注:inference API 不适合图像搜索步骤 1:设置机器学习模型$eland_import_hub_model-url https:/cluster_URL-hub-model-id BERT-MiniLM-L6-task-type text_embedding-startBERT-MiniLM-L6选择合适的模型将模型加载到集群管理模型步骤二:数据摄取和嵌入生成 _id:product-1234,product_name:Summer Dress,description:Our best-selling,P
6、rice:118,color:blue,fabric:cotton,desc_embedding:0.452,0.3242,Standard field indexing for non-vector typesPOST/_docPOST/_docEncoding via Inference ProcessorSource data _id:product-1234,product_name:Summer Dress,description:Our best-selling,Price:118,color:blue,fabric:cotton,步骤三:发出向量查询GET product-cat