{"id":67,"date":"2026-06-29T10:21:25","date_gmt":"2026-06-29T02:21:25","guid":{"rendered":"https:\/\/genetop.top\/index.php\/2026\/06\/29\/graphrag-2026-05-26-community-report-duplicate-has-report\/"},"modified":"2026-06-29T10:21:25","modified_gmt":"2026-06-29T02:21:25","slug":"graphrag-2026-05-26-community-report-duplicate-has-report","status":"publish","type":"post","link":"https:\/\/genetop.top\/index.php\/2026\/06\/29\/graphrag-2026-05-26-community-report-duplicate-has-report\/","title":{"rendered":"GraphRAG \u4e2d Community Report \u7684&#8221;\u5e7d\u7075\u5206\u8eab&#8221;\uff1a\u540c\u4e00\u4efd\u62a5\u544a\u4e3a\u4f55\u88ab\u521b\u5efa\u4e86\u4e24\u6b21"},"content":{"rendered":"<h2 id=\"_1\">\u73b0\u8c61<\/h2>\n<p>\u5728 FalkorDB \u4e2d\u67e5\u8be2 <code>HAS_REPORT<\/code> \u8fb9\u7684 Top 10 \u8282\u70b9\u65f6\uff0c\u53d1\u73b0\u6709 4 \u4e2a community_report \u8282\u70b9\u5404\u6709 <strong>4 \u6761<\/strong> <code>HAS_REPORT<\/code> \u8fb9\u6307\u5411\u5b83\u4eec\u3002\u6309\u7167\u8bbe\u8ba1\uff0c\u6bcf\u4e2a community \u5e94\u8be5\u552f\u4e00\u5bf9\u5e94\u4e00\u4e2a report\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u4e00\u5bf9\u591a\uff1f<\/p>\n<pre><code>Edge type: HAS_REPORT\nRank  Title                                                          Count\n1     \u6280\u672f\u90e8\u6838\u5fc3\u56e2\u961f\uff1a\u540e\u7aef\u67b6\u6784\u4e0e\u7cfb\u7edf\u8bbe\u8ba1                                    4\n2     \u4ea7\u54c1\u90e8\uff1a\u7528\u6237\u589e\u957f\u4e0e\u5546\u4e1a\u5316\u7b56\u7565                                         4\n3     \u8fd0\u7ef4\u90e8\uff1a\u670d\u52a1\u7a33\u5b9a\u6027\u4e0e\u76d1\u63a7\u4f53\u7cfb                                         4\n4     \u6d4b\u8bd5\u90e8\uff1a\u8d28\u91cf\u4fdd\u969c\u4e0e\u81ea\u52a8\u5316\u6d4b\u8bd5                                         4\n<\/code><\/pre>\n<p>\u7406\u8bba\u4e0a\u6bcf\u4e2a community \u53ea\u6709\u4e00\u4e2a report\uff0c\u6bcf\u4e2a report \u53ea\u5c5e\u4e8e\u4e00\u4e2a community\uff0c<code>HAS_REPORT<\/code> \u5e94\u8be5\u662f 1:1 \u7684\u5173\u7cfb\u3002<\/p>\n<h2 id=\"_2\">\u7528\u4e00\u4e2a\u901a\u4fd7\u7684\u4f8b\u5b50\u6765\u7406\u89e3<\/h2>\n<h3 id=\"_3\">\u60f3\u8c61\u4f60\u5728\u7ba1\u7406\u4e00\u4e2a\u516c\u53f8\u7684\u7ec4\u7ec7\u67b6\u6784<\/h3>\n<p>\u5047\u8bbe\u4f60\u7684\u516c\u53f8\u6709\u8fd9\u6837\u7684\u90e8\u95e8\u7ed3\u6784\uff1a<\/p>\n<pre><code>\u6280\u672f\u90e8 (278\u4eba)\n  \u2514\u2500\u2500 \u540e\u7aef\u7ec4 (253\u4eba)\n<\/code><\/pre>\n<p>&#8220;\u540e\u7aef\u7ec4&#8221;\u662f&#8221;\u6280\u672f\u90e8&#8221;\u7684\u5b50\u90e8\u95e8\u3002\u73b0\u5728 HR \u8981\u7ed9\u6bcf\u4e2a\u90e8\u95e8\u5199\u4e00\u4efd<strong>\u90e8\u95e8\u7b80\u4ecb<\/strong>\u3002<\/p>\n<p>HR \u53d1\u73b0&#8221;\u540e\u7aef\u7ec4&#8221;\u7684\u6838\u5fc3\u6210\u5458\u548c&#8221;\u6280\u672f\u90e8&#8221;\u9ad8\u5ea6\u91cd\u53e0\uff08\u540e\u7aef\u7ec4\u7684\u4eba\u5c31\u662f\u6280\u672f\u90e8\u7684\u4e3b\u529b\uff09\uff0c\u4e8e\u662f AI \u7ed9\u4e24\u4e2a\u90e8\u95e8\u751f\u6210\u4e86<strong>\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\u7684\u7b80\u4ecb<\/strong>\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u90e8\u95e8<\/th>\n<th>\u7b80\u4ecb\u6807\u9898<\/th>\n<th>\u90e8\u95e8\u4eba\u6570<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6280\u672f\u90e8 (community 1491)<\/td>\n<td>&#8220;\u6838\u5fc3\u6280\u672f\u56e2\u961f\uff1a\u540e\u7aef\u67b6\u6784\u4e0e\u7cfb\u7edf\u8bbe\u8ba1&#8221;<\/td>\n<td>278\u4eba<\/td>\n<\/tr>\n<tr>\n<td>\u540e\u7aef\u7ec4 (community 2790)<\/td>\n<td>&#8220;\u6838\u5fc3\u6280\u672f\u56e2\u961f\uff1a\u540e\u7aef\u67b6\u6784\u4e0e\u7cfb\u7edf\u8bbe\u8ba1&#8221;<\/td>\n<td>253\u4eba<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u4efd\u7b80\u4ecb\u7684<strong>\u6807\u9898\u548c\u5185\u5bb9\u5b8c\u5168\u76f8\u540c<\/strong>\uff08\u56e0\u4e3a\u63cf\u8ff0\u7684\u672c\u8d28\u4e0a\u662f\u540c\u4e00\u7fa4\u4eba\uff09\uff0c\u53ea\u6709&#8221;\u90e8\u95e8\u4eba\u6570&#8221;\uff08size\uff09\u4e0d\u540c\u3002<\/p>\n<p>\u7531\u4e8e\u5185\u5bb9\u76f8\u540c\uff0c\u7cfb\u7edf\u7ed9\u5b83\u4eec\u7b97\u51fa\u4e86<strong>\u76f8\u540c\u7684 ID<\/strong>\uff08\u57fa\u4e8e\u5185\u5bb9\u7684 hash\uff09\u3002<\/p>\n<p>\u5bf9\u5e94\u5230\u6211\u4eec\u5b9e\u9645\u53d1\u73b0\u7684 4 \u7ec4\u95ee\u9898\u6570\u636e\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u90e8\u95e8\u7c7b\u6bd4<\/th>\n<th>\u5b9e\u9645 community<\/th>\n<th>\u7b80\u4ecb\u6807\u9898<\/th>\n<th>\u4eba\u6570(size)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6280\u672f\u90e8<\/td>\n<td>community 1491<\/td>\n<td>&#8220;\u6280\u672f\u90e8\u6838\u5fc3\u56e2\u961f\uff1a\u540e\u7aef\u67b6\u6784\u4e0e\u7cfb\u7edf\u8bbe\u8ba1&#8221;<\/td>\n<td>278<\/td>\n<\/tr>\n<tr>\n<td>\u2514\u2500\u2500 \u540e\u7aef\u7ec4<\/td>\n<td>community 2790<\/td>\n<td>&#8220;\u6280\u672f\u90e8\u6838\u5fc3\u56e2\u961f\uff1a\u540e\u7aef\u67b6\u6784\u4e0e\u7cfb\u7edf\u8bbe\u8ba1&#8221;<\/td>\n<td>253<\/td>\n<\/tr>\n<tr>\n<td>\u4ea7\u54c1\u90e8<\/td>\n<td>community 200<\/td>\n<td>&#8220;\u4ea7\u54c1\u90e8\uff1a\u7528\u6237\u589e\u957f\u4e0e\u5546\u4e1a\u5316\u7b56\u7565&#8221;<\/td>\n<td>796<\/td>\n<\/tr>\n<tr>\n<td>\u2514\u2500\u2500 \u4ea7\u54c1\u4e00\u7ec4<\/td>\n<td>community 1100<\/td>\n<td>&#8220;\u4ea7\u54c1\u90e8\uff1a\u7528\u6237\u589e\u957f\u4e0e\u5546\u4e1a\u5316\u7b56\u7565&#8221;<\/td>\n<td>631<\/td>\n<\/tr>\n<tr>\n<td>\u8fd0\u7ef4\u90e8<\/td>\n<td>community 1909<\/td>\n<td>&#8220;\u8fd0\u7ef4\u90e8\uff1a\u670d\u52a1\u7a33\u5b9a\u6027\u4e0e\u76d1\u63a7\u4f53\u7cfb&#8221;<\/td>\n<td>180<\/td>\n<\/tr>\n<tr>\n<td>\u2514\u2500\u2500 \u8fd0\u7ef4\u4e00\u7ec4<\/td>\n<td>community 3073<\/td>\n<td>&#8220;\u8fd0\u7ef4\u90e8\uff1a\u670d\u52a1\u7a33\u5b9a\u6027\u4e0e\u76d1\u63a7\u4f53\u7cfb&#8221;<\/td>\n<td>178<\/td>\n<\/tr>\n<tr>\n<td>\u6d4b\u8bd5\u90e8<\/td>\n<td>community 953<\/td>\n<td>&#8220;\u6d4b\u8bd5\u90e8\uff1a\u8d28\u91cf\u4fdd\u969c\u4e0e\u81ea\u52a8\u5316\u6d4b\u8bd5&#8221;<\/td>\n<td>21<\/td>\n<\/tr>\n<tr>\n<td>\u2514\u2500\u2500 \u6d4b\u8bd5\u4e00\u7ec4<\/td>\n<td>community 2343<\/td>\n<td>&#8220;\u6d4b\u8bd5\u90e8\uff1a\u8d28\u91cf\u4fdd\u969c\u4e0e\u81ea\u52a8\u5316\u6d4b\u8bd5&#8221;<\/td>\n<td>19<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"_4\">\u95ee\u9898\u51fa\u5728\u54ea\u91cc\uff1f<\/h3>\n<p>\u5f53\u628a\u8fd9\u4e9b\u6570\u636e\u5bfc\u5165\u56fe\u6570\u636e\u5e93\u65f6\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u521b\u5efa report \u8282\u70b9<\/strong><\/p>\n<p>\u4ee5&#8221;\u6280\u672f\u90e8&#8221;\u548c&#8221;\u540e\u7aef\u7ec4&#8221;\u4e3a\u4f8b\u3002\u7cfb\u7edf\u770b\u5230 parquet \u91cc\u6709\u4e24\u884c\u6570\u636e\uff08\u540c\u4e00\u4e2a ID\uff0c\u4e0d\u540c\u7684 community\uff09\uff0c\u5c31\u65e0\u8111\u521b\u5efa\u4e86<strong>\u4e24\u4e2a\u8282\u70b9<\/strong>\uff1a<\/p>\n<pre><code>Report \u8282\u70b9 A: {id: &quot;abc123&quot;, community: 1491, size: 278}  -- \u6280\u672f\u90e8\u7684\u7b80\u4ecb\nReport \u8282\u70b9 B: {id: &quot;abc123&quot;, community: 2790, size: 253}  -- \u540e\u7aef\u7ec4\u7684\u7b80\u4ecb\n<\/code><\/pre>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa HAS_REPORT \u8fb9<\/strong><\/p>\n<p>\u7cfb\u7edf\u904d\u5386\u6bcf\u4e2a report \u8bb0\u5f55\uff0c\u7528 <code>id<\/code> \u53bb\u5339\u914d report \u8282\u70b9\uff1a<\/p>\n<pre><code class=\"language-cypher\">-- \u5904\u7406\u6280\u672f\u90e8 (community 1491)\nMATCH (c:communities {community: 1491})\nMATCH (r:community_reports {id: &quot;abc123&quot;})  -- \u5339\u914d\u5230 2 \u4e2a\u8282\u70b9\uff08A \u548c B\uff09\uff01\nCREATE (c)-[:HAS_REPORT]-&gt;(r)\n-- \u7ed3\u679c\uff1a\u6280\u672f\u90e8 \u2192 \u8282\u70b9A, \u6280\u672f\u90e8 \u2192 \u8282\u70b9B\uff082 \u6761\u8fb9\uff09\n\n-- \u5904\u7406\u540e\u7aef\u7ec4 (community 2790)\nMATCH (c:communities {community: 2790})\nMATCH (r:community_reports {id: &quot;abc123&quot;})  -- \u540c\u6837\u5339\u914d\u5230 2 \u4e2a\u8282\u70b9\uff01\nCREATE (c)-[:HAS_REPORT]-&gt;(r)\n-- \u7ed3\u679c\uff1a\u540e\u7aef\u7ec4 \u2192 \u8282\u70b9A, \u540e\u7aef\u7ec4 \u2192 \u8282\u70b9B\uff082 \u6761\u8fb9\uff09\n<\/code><\/pre>\n<p><strong>\u6700\u7ec8\u7ed3\u679c<\/strong>\uff1a\u8fd9\u4e2a report \u6807\u9898\u4e0b\u6709 4 \u6761 HAS_REPORT \u8fb9\uff082 \u4e2a\u90e8\u95e8 \u00d7 2 \u4e2a\u540c ID \u8282\u70b9 = 4\uff09\u3002<\/p>\n<p>\u800c\u6b63\u786e\u7684\u7ed3\u679c\u5e94\u8be5\u662f\uff1a\u6280\u672f\u90e8 \u2192 \u6280\u672f\u90e8\u7684\u7b80\u4ecb\uff081 \u6761\uff09\uff0c\u540e\u7aef\u7ec4 \u2192 \u540e\u7aef\u7ec4\u7684\u7b80\u4ecb\uff081 \u6761\uff09\uff0c\u5171 2 \u6761\u3002<\/p>\n<h2 id=\"_5\">\u6839\u56e0\u5206\u6790<\/h2>\n<p>\u95ee\u9898\u7531\u4e24\u4e2a\u56e0\u7d20\u53e0\u52a0\u5bfc\u81f4\uff1a<\/p>\n<h3 id=\"1-leiden-report\">1. Leiden \u5c42\u7ea7\u805a\u7c7b\u4ea7\u751f\u4e86\u5185\u5bb9\u76f8\u540c\u7684 Report<\/h3>\n<p>GraphRAG \u4f7f\u7528 Leiden \u7b97\u6cd5\u505a\u5c42\u7ea7\u793e\u533a\u53d1\u73b0\u3002\u5f53\u5b50\u793e\u533a\u7684\u6210\u5458\u4e0e\u7236\u793e\u533a\u9ad8\u5ea6\u91cd\u53e0\u65f6\uff0cLLM \u4e3a\u5b83\u4eec\u751f\u6210\u4e86\u5185\u5bb9\u51e0\u4e4e\u76f8\u540c\u7684 report\u3002\u7531\u4e8e report ID \u662f\u57fa\u4e8e\u5185\u5bb9\u7684 hash\uff0c\u5185\u5bb9\u76f8\u540c \u2192 ID \u76f8\u540c\u3002<\/p>\n<p>\u5b9e\u9645\u6570\u636e\u9a8c\u8bc1\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>report id<\/th>\n<th>communities<\/th>\n<th>sizes<\/th>\n<th>\u5c42\u7ea7\u5173\u7cfb<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>6516e2f4&#8230;<\/td>\n<td>2790, 1491<\/td>\n<td>253, 278<\/td>\n<td>2790 \u662f 1491 \u7684\u5b50\u793e\u533a<\/td>\n<\/tr>\n<tr>\n<td>feda9fa0&#8230;<\/td>\n<td>1100, 200<\/td>\n<td>631, 796<\/td>\n<td>1100 \u662f 200 \u7684\u5b50\u793e\u533a<\/td>\n<\/tr>\n<tr>\n<td>d8f25d09&#8230;<\/td>\n<td>2343, 953<\/td>\n<td>19, 21<\/td>\n<td>2343 \u662f 953 \u7684\u5b50\u793e\u533a<\/td>\n<\/tr>\n<tr>\n<td>223c76c6&#8230;<\/td>\n<td>3073, 1909<\/td>\n<td>178, 180<\/td>\n<td>3073 \u662f 1909 \u7684\u5b50\u793e\u533a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"2\">2. \u5bfc\u5165\u903b\u8f91\u7f3a\u4e4f\u53bb\u91cd\u548c\u7cbe\u786e\u5339\u914d<\/h3>\n<p>\u5bfc\u5165\u4ee3\u7801\u4e2d\uff1a<\/p>\n<pre><code class=\"language-python\"># \u521b\u5efa\u8282\u70b9\uff1a\u65e0\u6761\u4ef6 CREATE\uff0c\u4e0d\u53bb\u91cd\n&quot;UNWIND $batch AS p CREATE (n:community_reports) SET n = p&quot;\n\n# \u521b\u5efa\u8fb9\uff1a\u53ea\u6309 id \u5339\u914d\uff0c\u6ca1\u6709\u52a0 community \u6761\u4ef6\n&quot;MATCH (r:community_reports {id: p.rid})&quot;  # \u5339\u914d\u5230\u591a\u4e2a\u540c ID \u8282\u70b9 \u2192 \u7b1b\u5361\u5c14\u79ef\n<\/code><\/pre>\n<h2 id=\"_6\">\u89e3\u51b3\u65b9\u6848<\/h2>\n<h3 id=\"has_report\">HAS_REPORT \u521b\u5efa\u65f6\u7cbe\u786e\u5339\u914d<\/h3>\n<p>\u5728\u521b\u5efa <code>HAS_REPORT<\/code> \u8fb9\u65f6\uff0c\u540c\u65f6\u5339\u914d <code>id<\/code> \u548c <code>community<\/code>\uff0c\u907f\u514d\u7b1b\u5361\u5c14\u79ef\uff1a<\/p>\n<pre><code class=\"language-python\"># Before (\u6709 bug)\n&quot;MATCH (r:community_reports {id: p.rid}) &quot;\n\n# After (\u4fee\u590d)\n&quot;MATCH (r:community_reports {id: p.rid, community: p.cnum}) &quot;\n<\/code><\/pre>\n<p>\u8fd9\u6837\u6bcf\u4e2a community \u53ea\u4f1a\u5339\u914d\u5230\u5c5e\u4e8e\u81ea\u5df1\u7684\u90a3\u4e2a report \u8282\u70b9\uff0c\u521b\u5efa 1 \u6761\u8fb9\u3002<\/p>\n<p><strong>\u6559\u8bad<\/strong>\uff1a\u5728\u56fe\u6570\u636e\u5e93\u4e2d\u7528 <code>MATCH<\/code> + <code>CREATE<\/code> \u6a21\u5f0f\u521b\u5efa\u5173\u7cfb\u65f6\uff0c\u5982\u679c\u5339\u914d\u6761\u4ef6\u4e0d\u591f\u7cbe\u786e\uff08\u76ee\u6807\u8282\u70b9\u6709\u91cd\u590d\uff09\uff0c\u5c31\u4f1a\u4ea7\u751f\u610f\u6599\u4e4b\u5916\u7684\u7b1b\u5361\u5c14\u79ef\u3002\u59cb\u7ec8\u786e\u4fdd <code>MATCH<\/code> \u6761\u4ef6\u80fd\u552f\u4e00\u5b9a\u4f4d\u5230\u76ee\u6807\u8282\u70b9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u8c61 \u5728 FalkorDB \u4e2d\u67e5\u8be2 HAS_REPORT \u8fb9\u7684 Top 10 \u8282\u70b9\u65f6\uff0c\u53d1\u73b0\u6709 4 \u4e2a comm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[95,91,98,53,93,97,96],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-graphrag","tag-community-report","tag-leiden","tag-98","tag-53","tag-93","tag-97","tag-96"],"_links":{"self":[{"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":0,"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genetop.top\/index.php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}