Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
"entity_df = pd.read_parquet(\n",
" f\"{GRAPHRAG_FOLDER}/entities.parquet\",\n",
" columns=[\n",
" \"name\",\n",
" \"title\",\n",
" \"type\",\n",
" \"description\",\n",
" \"human_readable_id\",\n",
Expand Down Expand Up @@ -602,7 +602,7 @@
"source": [
"entity_statement = \"\"\"\n",
"MERGE (e:__Entity__ {id:value.id})\n",
"SET e += value {.human_readable_id, .description, name:replace(value.name,'\"','')}\n",
"SET e += value {.human_readable_id, .description, title:replace(value.title,'\"','')}\n",
"WITH e, value\n",
"CALL db.create.setNodeVectorProperty(e, \"description_embedding\", value.description_embedding)\n",
"CALL apoc.create.addLabels(e, case when coalesce(value.type,\"\") = \"\" then [] else [apoc.text.upperCamelCase(replace(value.type,'\"',''))] end) yield node\n",
Expand Down Expand Up @@ -912,7 +912,7 @@
"source": [
"### Importing Community Reports\n",
"\n",
"Fo the community reports we create nodes for each communitiy set the id, community, level, title, summary, rank, and rank_explanation and connect them to the entities they are about.\n",
"Fo the community reports we create nodes for each communitiy set the id, community, level, title, summary, rank, and rating_explanation and connect them to the entities they are about.\n",
"For the findings we create the findings in context of the communities."
]
},
Expand Down Expand Up @@ -950,7 +950,7 @@
" <th>summary</th>\n",
" <th>findings</th>\n",
" <th>rank</th>\n",
" <th>rank_explanation</th>\n",
" <th>rating_explanation</th>\n",
" <th>full_content</th>\n",
" </tr>\n",
" </thead>\n",
Expand Down Expand Up @@ -1000,7 +1000,7 @@
"0 [{'explanation': 'Marley's Ghost plays a cruci... 8.0 \n",
"1 [{'explanation': 'The Ghost, identified at tim... 8.5 \n",
"\n",
" rank_explanation \\\n",
" rating_explanation \\\n",
"0 The impact severity rating is high due to the ... \n",
"1 The impact severity rating is high due to the ... \n",
"\n",
Expand All @@ -1025,7 +1025,7 @@
" \"summary\",\n",
" \"findings\",\n",
" \"rank\",\n",
" \"rank_explanation\",\n",
" \"rating_explanation\",\n",
" \"full_content\",\n",
" ],\n",
")\n",
Expand Down Expand Up @@ -1061,7 +1061,7 @@
"# Import communities\n",
"community_statement = \"\"\"\n",
"MERGE (c:__Community__ {community:value.community})\n",
"SET c += value {.level, .title, .rank, .rank_explanation, .full_content, .summary}\n",
"SET c += value {.level, .title, .rank, .rating_explanation, .full_content, .summary}\n",
"WITH c, value\n",
"UNWIND range(0, size(value.findings)-1) AS finding_idx\n",
"WITH c, value, finding_idx, value.findings[finding_idx] as finding\n",
Expand Down