# 04-graphrag **Repository Path**: fengqi0705/04-graphrag ## Basic Information - **Project Name**: 04-graphrag - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-07-21 - **Last Updated**: 2026-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README GraphRAG的实现流程,核心思想就是将自然语言转换成Cypher查询语言,从Neo4j图数据库中精确检索结构化知识: 1.路由标签,用LLM分析用户输入,识别出要查询的节点类型(SPU、SKU、Category。。。) [RouteItem(label='Trademark', entity='小米'), RouteItem(label='Category3', entity='手机')] 2.入口节点检索 3.生成Cypher语句 4.Cypher语句验证 5.Cypher语句校正 6.执行并返回 [{'start': 'User', 'type': 'View', 'end': 'SKU'}, {'start': 'SKU', 'type': 'Belong', 'end': 'SPU'}, {'start': 'SKU', 'type': 'Have', 'end': 'Attr'}, {'start': 'SPU', 'type': 'Belong', 'end': 'Trademark'}, {'start': 'SPU', 'type': 'Belong', 'end': 'Category3'}, {'start': 'Category3', 'type': 'Belong', 'end': 'Category2'}, {'start': 'Category2', 'type': 'Belong', 'end': 'Category1'}]