您的浏览器禁用了JavaScript(一种计算机语言,用以实现您与网页的交互),请解除该禁用,或者联系我们。[-]:GenAI 新范式:GraphRAG NebulaGraph Team的探索与实战 - 发现报告

GenAI 新范式:GraphRAG NebulaGraph Team的探索与实战

信息技术2024-08-21古思为-福***
AI智能总结
查看更多
GenAI 新范式:GraphRAG NebulaGraph Team的探索与实战

NebulaGraphTeam的探索与实战 目录 图Graph是什么 01 为什么需要Graph 02 03 04 图Graph是什么 图Graph是什么 什么是图 Ingraphtheory,agraph is a data structureconsisting of nodes(vertices)andedges,used to represent relationships betweenentities, with nodes representing objectsand edges denoting connections orassociations between them. The paper written byLeonhard EulerontheSeven Bridgesof Königsbergandpublished in 1736 is regarded as the firstpaper in the history of graph theory. https://en.wikipedia.org/wiki/Graph_theory Author:WeyGuSource:https://github.com/wey-gu/graph-vis 图Graph是什么 什么是图 Ingraphtheory,agraph is a data structureconsisting of nodes(vertices)andedges,used to represent relationships betweenentities, with nodes representing objectsand edges denoting connections orassociations between them. The paper written byLeonhard EulerontheSeven Bridgesof Königsbergandpublished in 1736 is regarded as the firstpaper in the history of graph theory. https://en.wikipedia.org/wiki/Graph_theory Author:WeyGuSource:https://github.com/wey-gu/graph-vis 为什么需要Graph 为什么需要Graph Why Graph -Knowledge Graph 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork-DevSecOps 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork-DevSecOps-FraudDetection 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork-DevSecOps-FraudDetection-Supply Chain Management 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork-DevSecOps-FraudDetection-Supply Chain Management-LLM 为什么需要Graph Graph Use Cases -Knowledge Graph-Recommendation System-SocialNetwork-DevSecOps-FraudDetection-Supply Chain Management-LLM-DigitalMarketing GraphRAG GraphRAG RAG:开卷考试 Retrieval翻参考资料Augmented上下文学习增强领域知识Generation现学现卖(LLM) GraphRAG 分割、嵌入RAG:开卷考试范式 索引期 数据分割、创建语义向量表达并存储 查询期 根据任务语义,寻找相似参考 -Get Embedding of Task Description-Semantic SearchTop-Kin same EmbeddingVector Space for Related Chunks of Context 大模型学习上下文,尝试推理得出答案-In-context learningto synthesize answers orreact to the next move GraphRAG 分割的挑战:海里捞针(Needleinahaystack) -分割索引很难召回细粒度知识点,分块尺寸是一个很强的信息浓度假设,可能会稀释块内的知识。-线性分割是对知识内在的全局上下文、关联的丢失。 Source:https://www.siwei.io/graph-enabled-llama-index/ -Split can make it challenging to retrievefine-grained, fragmented knowledge. Partitioning maydilutecertain pieces ofknowledgeacross varioussegments. -Linearly segmenting large chunks of knowledgecan lead to thelossof global context/interrelationship. GraphRAG 嵌入的挑战:开卷考试相关不是相似Relevancevs. Similarity -语义是领域知识的一部分,基于通识构建的通用Embedding模型并不了解。 Domain Knowledgenot aware of by vanilla Embedding Models GraphRAG 图帮助做好开卷考试:GraphRAG -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 -Knowledge Graph is _ of Knowledge:-Refinedand Concise Form-Fine-grainedSegmentation-Interconnected-structured -Knowledge in (existing) KG is Accurate-Query towards KG is Stable, Deterministic -Domain Knowledge was pushed down to KGin relationships, which enabled reasoning inquery (andcheaply persisted domainknowledge) GraphRAG GraphRAG:图结构数据/知识参与辅助的RAG方法 -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 Author:SiweiGUSource:https://siwei.io/graph-enabled-llama-index/harry_potter_graph.html GraphRAG案例 GraphRAG案例 GraphRAG案例 图帮助做好开卷考试:Graph RAG[演示2相关与相似] -图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 例子:降低Embedding-Retrieval Hallucination GraphRAG案例 图帮助做好开卷考试:Graph RAG[演示3相关与相似] 例子:降低Embedding-Retrieval Hallucination -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 提问主角之间不存在的剧情 GraphRAG消弭幻觉:-向量搜索-图探索-rerank Author:SiweiGUSource:https://bit.ly/graph-rag-workshop GraphRAG案例 图帮助做好开卷考试:Graph RAG[演示4精细知识检索] 例子:大海捞针Needle in a haystack -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 涉及细粒度、分散知识 GraphRAG大海捞针:-找到所有知识点-从知识点触发捞出知识子图-子图构成全面知识序列 Author:SiweiGUSource:https://bit.ly/graph-rag-workshop GraphRAG案例 图帮助做好开卷考试:Graph RAG[演示5全局上下文] 例子:穿针引线Connectthedots -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 涉及细粒度、分散、多跳关联知识 >如何评估2008年全球金融危机之后,不同国家的监管变化对银行X在不同国家信贷政策的影响? GraphRAG海底捞针、穿针引线:-找到所有知识点-多跳探索、关联知识 GraphRAG案例 例子:SQLvsGraphQuery 图帮助做好开卷考试:Graph RAG[演示6结构化数据增强] -幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联-成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝练、细粒度、保有全局互联结构的压缩:大海捞针、穿针引线 --WITH nGQL on NebulaGraphFINDALL PATH WITH PROP FROM 1 TO 2 OVER *YIELDpath AS p; GraphRAG案例 图帮助做好开卷考试:Graph RAG[例子7面向业务建模的图结构检索]-幻觉:图上可以做确定可复现的高质量关联,非概率性、易幻觉关联 例子:细化图状领域知识、应用到召回(R) -成本:图库是一种高效、廉价的推理与知识合并的实现:淬炼领域知识推理、转变为I/O查-效果:图索引是凝