{"id":4376,"date":"2024-07-29T15:27:49","date_gmt":"2024-07-29T07:27:49","guid":{"rendered":"https:\/\/www.aqwu.net\/wp\/?p=4376"},"modified":"2024-07-30T09:41:44","modified_gmt":"2024-07-30T01:41:44","slug":"%e4%bd%bf%e7%94%a8%e6%9c%ac%e5%9c%b0-ollama-%e7%9a%84-graphrag","status":"publish","type":"post","link":"https:\/\/www.aqwu.net\/wp\/?p=4376","title":{"rendered":"\u4f7f\u7528\u672c\u5730 Ollama \u7684 GraphRAG"},"content":{"rendered":"\n<p>\u6bd5\u7adf\u7528 openai api \u6765\u4f7f\u7528 GraphRAG \u5f88\u8d35\uff0c\u6240\u4ee5\u4e0b\u9762\u662f\u5728 widnows 11 \u4e0b\u7528 ollama \u73af\u5883\u6765\u4f7f\u7528GraphRAG<\/p>\n\n\n\n<p>GraphRag \u7684 python \u73af\u5883\u662f 3.10-3.12, ollama \u7684\u6a21\u578b\u662f llama3.1:70b<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528 GraphRAG \u7cfb\u7edf\u7684\u7b80\u5355\u7aef\u5230\u7aef\u793a\u4f8b\u3002\u5b83\u6f14\u793a\u5982\u4f55\u4f7f\u7528\u7cfb\u7edf\u5bf9\u67d0\u4e9b\u6587\u672c\u8fdb\u884c\u7d22\u5f15\uff0c\u7136\u540e\u4f7f\u7528\u7d22\u5f15\u6570\u636e\u6765\u56de\u7b54\u6709\u5173\u6587\u6863\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u521b\u5efa GraphRAG \u73af\u5883<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >conda create -n graphrag python=3.10\nconda activate graphrag\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u5b89\u88c5 GraphRAG<\/strong> \u548c <strong>ollama<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u5b89\u88c5 GraphRAG<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >pip install graphrag<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u5b89\u88c5 ollama <\/strong><\/h3>\n\n\n\n<p>\u9700\u8981\u5230 <a href=\"https:\/\/ollama.com\/library\">library (ollama.com)<\/a> \u73b0\u5728\u7cfb\u7edf\u6240\u9700\u7684\u6587\u4ef6\uff0c\u8fd9\u91cc\u6d4b\u8bd5\u7684\u662fwindows \u73af\u5883\uff0c\u6240\u4ee5\u9700\u8981\u4e0b\u8f7d windows \u7248\u672c\u7684\u7a0b\u5e8f<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >https:\/\/ollama.com\/download\/OllamaSetup.exe<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u4e0b\u8f7d\u4e0b\u9762\u9700\u8981\u4f7f\u7528\u7684\u6a21\u578b <\/strong><\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >ollama pull llama3.1:70b\nollama pull nomic-embed-text<\/pre><\/div>\n\n\n\n<p>llama3.1 \u662f\u4f1a\u8bdd\u6a21\u578b\uff0c<\/p>\n\n\n\n<p>nomic-embed-text \u662f\u5d4c\u5165\u6a21\u578b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u8fd0\u884c\u7d22\u5f15\u5668<\/strong><\/h2>\n\n\n\n<p>\u73b0\u5728\u6211\u4eec\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u6570\u636e\u9879\u76ee\u548c\u4e00\u4e9b\u521d\u59cb\u914d\u7f6e\u3002\u8ba9\u6211\u4eec\u6765\u8bbe\u7f6e\u4e00\u4e0b\u3002\u6211\u4eec\u4f7f\u7528\u7684\u662f\u9ed8\u8ba4\u914d\u7f6e\u6a21\u5f0f\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\uff08\u6211\u4eec\u63a8\u8350\uff09\u6216\u73af\u5883\u53d8\u91cf\u8fdb\u884c\u81ea\u5b9a\u4e49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u521b\u5efa\u76ee\u5f55<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mkdir ragtest\\input<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u4e0b\u8f7d\u6587\u4ef6<\/strong><\/h3>\n\n\n\n<p><strong>\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u4ece\u53ef\u4fe1\u8d56\u7684\u6765\u6e90\u83b7\u53d6\u67e5\u5c14\u65af\u00b7\u72c4\u66f4\u65af \uff08Charles Dickens\uff09 \u7684\u300a\u5723\u8bde\u9882\u6b4c\u300b\u7684\u526f\u672c<\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >curl https:\/\/www.gutenberg.org\/cache\/epub\/24022\/pg24022.txt &gt; ragtest\\input\/book.txt\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 \u8bbe\u7f6e\u5de5\u4f5c\u533a\u53d8\u91cf<\/strong><\/h3>\n\n\n\n<p>\u8981\u521d\u59cb\u5316\u60a8\u7684\u5de5\u4f5c\u533a\uff0c\u8ba9\u6211\u4eec\u9996\u5148\u8fd0\u884c\u00a0<code>graphrag.index --init<\/code>\u00a0\u547d\u4ee4\u3002\u7531\u4e8e\u6211\u4eec\u5df2\u7ecf\u5728\u4e0a\u4e00\u6b65\u4e2d\u914d\u7f6e\u4e86\u4e00\u4e2a\u540d\u4e3a .ragtest&#8217; \u7684\u76ee\u5f55\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.index --init --root ragtest\nInitializing project at ragtest\n\u280b GraphRAG Indexer<\/pre><\/div>\n\n\n\n<p>\u8fd9\u5c06\u5728\u00a0<code>.\/ragtest<\/code>\u00a0\u76ee\u5f55\u4e2d\u521b\u5efa\u4e24\u4e2a\u6587\u4ef6\uff1a<code>.env<\/code>\u00a0\u548c\u00a0<code>settings.yaml<\/code><\/p>\n\n\n\n<p><code>.env<\/code>\u00a0\u5305\u542b\u8fd0\u884c GraphRAG \u7ba1\u9053\u6240\u9700\u7684\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c\u68c0\u67e5\u8be5\u6587\u4ef6\uff0c\u60a8\u5c06\u770b\u5230\u5b9a\u4e49\u7684\u5355\u4e2a\u73af\u5883\u53d8\u91cf\u00a0<code>GRAPHRAG_API_KEY=&lt;API_KEY><\/code>\u3002\u8fd9\u662f OpenAI API \u6216 Azure OpenAI \u7ec8\u7ed3\u70b9\u7684 API \u5bc6\u94a5\u3002\u60a8\u53ef\u4ee5\u5c06\u5176\u66ff\u6362\u4e3a\u60a8\u81ea\u5df1\u7684 API \u5bc6\u94a5\u3002<strong>\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528ollama \u6240\u4ee5\u4e0d\u7528\u7406\u4f1a<\/strong><\/p>\n\n\n\n<p><code>settings.yaml<\/code>\u00a0\u5305\u542b\u7ba1\u9053\u7684\u8bbe\u7f6e\u3002\u60a8\u53ef\u4ee5\u4fee\u6539\u6b64\u6587\u4ef6\u4ee5\u66f4\u6539\u7ba1\u9053\u7684\u8bbe\u7f6e\u3002\u8fd9\u91cc\u9700\u8981\u4fee\u6539\u4e00\u4e9b\u53c2\u6570<\/p>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u4fee\u6539 llm \u548c e\uff0c\u6d89\u53ca\u5230\u53c2\u6570\u6709 model, api_base \u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >llm:\n  model: llama3.1:70b\n  api_base: http:\/\/localhost:11434\/v1\n<\/pre><\/div>\n\n\n\n<p>mbeddings \u8282\u7684\u53c2\u6570\uff0c\u6d89\u53ca\u5230\u53c2\u6570\u6709 model, api_base \u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >embeddings:\n  llm:\n    model: nomic-embed-text\n    api_base: http:\/\/localhost:11434\/v1\n<\/pre><\/div>\n\n\n\n<p>\u5176\u4ed6\u53c2\u6570\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >entity_extraction:\n  max_gleanings: 0\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >claim_extraction:\n  max_gleanings: 0\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >snapshots:\n  graphml: yes\n  raw_entities: yes\n  top_level_nodes: yes\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >chunks:\n  size: 300\n  overlap: 100\n  group_by_columns: [id] # by default, we don't allow chunks to cross documents\n<\/pre><\/div>\n\n\n\n<p>\u4e0a\u9762\u5982\u679c\u4f7f\u7528 openai \u7684 api, \u5219 api_base: <\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \" >  api_base: https:\/\/api.openai.com\/v1\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.4 \u8fd0\u884c\u7d22\u5f15 pipeline<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.index --root ragtest<\/pre><\/div>\n\n\n\n<p>\u6b63\u5e38\u7684\u8f93\u51fa\u5e94\u8be5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.index --root ragtest\n\ud83d\ude80 Reading settings from ragtest\\settings.yaml\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\n\ud83d\ude80 create_base_text_units\n                                  id  ... n_tokens\n0   d6583840046247f428a9f02738842a7c  ...     1200\n1   10730234d6ccc7cee08f3cfc58d8a9a1  ...     1200\n2   980594a50d68db06e6ca257bdb9ae95e  ...     1200\n3   080d8e696ff38c653ca90fa086415e74  ...     1200\n4   0e2b719e4c97d0d8bfeb2a53f7638eb6  ...     1200\n5   7064df4af064aeb556e5bab52e896414  ...     1200\n6   759315fa84c14e81f84fc71c73746184  ...     1200\n7   e8d4072836ac08145edc2fa8c15ea2c2  ...     1200\n8   e3bef9514042131cf477476725497416  ...     1200\n9   4ffd9df98742c035b3e15bb24c3edb12  ...     1200\n10  8435b078474636a989a8c22f5493e1b6  ...     1200\n11  3763b08136628f77304cb4eb1136ea48  ...     1200\n12  206c2f9fd249659c7a897d323459cb6f  ...     1200\n13  ce95e4fc6ee410973c040fc628dce155  ...     1200\n14  260fb94666cbdfb08286ce8d8162130d  ...     1200\n15  bf29edcb41403e5af43aa101072f4fdf  ...     1200\n16  d453d198afec5b284ff36024780b088c  ...     1200\n17  c79e67fc6f74a9afbe79c158000cc71b  ...     1200\n18  77ae3762a0b062ca5350ea54a05450ae  ...     1200\n19  b029f1164f623c14a0cfaa73c246f50d  ...     1200\n20  29793cee69d4eefd5fea8a5f2f27b521  ...     1200\n21  b4dec8fbe9f2a2c6a79d09c9484d15ae  ...     1200\n22  5d70b47bf7167b7586f47fcc4355a746  ...     1200\n23  1bdf253855a115bcf51faa63d7b07e82  ...     1200\n24  999c9887098d1a25dc3b42a8da7ddc8c  ...     1200\n25  bc5fde5d1e00a3ecc1e548c8d24f1c1f  ...     1200\n26  4cf4deeb7f61acb7b7db4ce0e57fb1e6  ...     1200\n27  61a042016835080f3d334560b13b0e35  ...     1200\n28  98f3970b31dfa1d7391cdaa453d6ade7  ...     1200\n29  ebc403dd3df39bacc3443ef4afb7edfd  ...     1200\n30  1cb66ea16e5e4f2816f0e188d3acc792  ...     1200\n31  bc606176c752984da6d202275ee8c7a6  ...     1200\n32  cd8a47ace09b9cee1e8b27b0689f2822  ...     1200\n33  f40e4b274b5e1a25afbff9ecb733e1f4  ...     1200\n34  19f8fd68a8dbc1bba7058e13ce3a2e3d  ...     1200\n35  0f9b4e5a7cfc0c3c89a8898a45383588  ...     1200\n36  6c362d3f8d01c76d84443dcabf3f322a  ...     1200\n37  04e5c071e4ee5496d5380662e1339f45  ...     1200\n38  2b5ecb7fba1301d1f3d307e194a6c435  ...     1200\n39  aa8d2310a206001404282ddb3fd645aa  ...     1200\n40  0ddc17ea5e566006c000b4013f2181a5  ...     1200\n41  cd4234ed6caba8f15d09a2e3ee604b2a  ...     1055\n\n[42 rows x 5 columns]\n\ud83d\ude80 create_base_extracted_entities\n                                        entity_graph\n0  &lt;graphml xmlns=\"http:\/\/graphml.graphdrawing.or...\n\ud83d\ude80 create_summarized_entities\n                                        entity_graph\n0  &lt;graphml xmlns=\"http:\/\/graphml.graphdrawing.or...\n\ud83d\ude80 create_base_entity_graph\n   level                                    clustered_graph\n0      0  &lt;graphml xmlns=\"http:\/\/graphml.graphdrawing.or...\n1      1  &lt;graphml xmlns=\"http:\/\/graphml.graphdrawing.or...\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\n\ud83d\ude80 create_final_entities\n                                   id  ...                              description_embedding\n0    b45241d70f0e43fca764df95b2b81f77  ...  [-0.03227982670068741, 0.026621580123901367, 0...\n1    4119fd06010c494caa07f439b333f4c5  ...  [0.005379790905863047, 0.0033020235132426023, ...\n2    d3835bf3dda84ead99deadbeac5d0d7d  ...  [0.06518136709928513, 0.009380006231367588, -0...\n3    077d2820ae1845bcbb1803379a3d1eae  ...  [0.004046803805977106, 0.010871930047869682, -...\n4    3671ea0dd4e84c1a9b02c5ab2c8f4bac  ...  [0.018699107691645622, -0.0062330360524356365,...\n..                                ...  ...                                                ...\n173  5a28b94bc63b44edb30c54748fd14f15  ...  [-0.036404531449079514, -0.01810646429657936, ...\n174  f97011b2a99d44648e18d517e1eae15c  ...  [-0.019464654847979546, -0.005517757963389158,...\n175  35489ca6a63b47d6a8913cf333818bc1  ...  [-0.03391822427511215, -0.006714249961078167, ...\n176  5d3344f45e654d2c808481672f2f08dd  ...  [0.0029292278923094273, 0.03771210461854935, 0...\n177  6fb57f83baec45c9b30490ee991f433f  ...  [0.0347650907933712, -0.00041183660505339503, ...\n\n[178 rows x 8 columns]\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\datashaper\\engine\\verbs\\convert.py:72: FutureWarning: errors='ignore' is\ndeprecated and will raise in a future version. Use to_datetime without passing `errors` and catch exceptions explicitly instead\n  datetime_column = pd.to_datetime(column, errors=\"ignore\")\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\datashaper\\engine\\verbs\\convert.py:72: UserWarning: Could not infer format,\nso each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please\nspecify a format.\n  datetime_column = pd.to_datetime(column, errors=\"ignore\")\n\ud83d\ude80 create_final_nodes\n     level                          title            type  ...                 top_level_node_id  x  y\n0        0            \"PROJECT GUTENBERG\"  \"ORGANIZATION\"  ...  b45241d70f0e43fca764df95b2b81f77  0  0\n1        0            \"A CHRISTMAS CAROL\"         \"EVENT\"  ...  4119fd06010c494caa07f439b333f4c5  0  0\n2        0              \"CHARLES DICKENS\"        \"PERSON\"  ...  d3835bf3dda84ead99deadbeac5d0d7d  0  0\n3        0               \"ARTHUR RACKHAM\"        \"PERSON\"  ...  077d2820ae1845bcbb1803379a3d1eae  0  0\n4        0             \"EBENEZER SCROOGE\"        \"PERSON\"  ...  3671ea0dd4e84c1a9b02c5ab2c8f4bac  0  0\n..     ...                            ...             ...  ...                               ... .. ..\n351      1  \"LITERARY ARCHIVE FOUNDATION\"  \"ORGANIZATION\"  ...  5a28b94bc63b44edb30c54748fd14f15  0  0\n352      1              \"MICHAEL S. HART\"        \"PERSON\"  ...  f97011b2a99d44648e18d517e1eae15c  0  0\n353      1               \"SALT LAKE CITY\"           \"GEO\"  ...  35489ca6a63b47d6a8913cf333818bc1  0  0\n354      1                    \"DONATIONS\"         \"EVENT\"  ...  5d3344f45e654d2c808481672f2f08dd  0  0\n355      1          \"PUBLIC DOMAIN WORKS\"         \"EVENT\"  ...  6fb57f83baec45c9b30490ee991f433f  0  0\n\n[356 rows x 14 columns]\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\n\ud83d\ude80 create_final_communities\n    id         title  ...                                   relationship_ids                                      text_unit_ids\n0    4   Community 4  ...  [ad1595a78935472999444c9330e7730e, 735d19aea07...  [260fb94666cbdfb08286ce8d8162130d,d65838400462...\n1    2   Community 2  ...  [31a7e680c4d54101afe4c8d52d246913, 351abba16e5...  [04e5c071e4ee5496d5380662e1339f45,1bdf253855a1...\n2    0   Community 0  ...  [5ac60a941a5b4934bdc43d2f87de601c, d405c3154d0...  [04e5c071e4ee5496d5380662e1339f45,080d8e696ff3...\n3    1   Community 1  ...  [b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870...  [04e5c071e4ee5496d5380662e1339f45,080d8e696ff3...\n4   10  Community 10  ...  [31499ee6277a4d71b19cb5b6be554c69, d99eabad5df...                 [0e2b719e4c97d0d8bfeb2a53f7638eb6]\n5    6   Community 6  ...  [d53f15cb7f7845de91cc44ad44ff9f6e, 0080f96708c...                 [0e2b719e4c97d0d8bfeb2a53f7638eb6]\n6    9   Community 9  ...  [0ec262c2cfef4dd581f3655e5e496e31, 40e4ef7dbc9...                 [8435b078474636a989a8c22f5493e1b6]\n7    3   Community 3  ...  [100c2fccd7f74d9281707082f062ba72, 4d183e70076...  [19f8fd68a8dbc1bba7058e13ce3a2e3d,8435b0784746...\n8    8   Community 8  ...  [4e9ca18ccc1d4527a3bc035d07f5e162, 5564257e89f...\n9    5   Community 5  ...  [2325dafe50d1435cbee8ebcaa69688df, 9ed7e3d187b...  [4cf4deeb7f61acb7b7db4ce0e57fb1e6,bc5fde5d1e00...\n10   7   Community 7  ...  [469aeef98cd1421fa123277b93d7b83a, 2fb66f9a0de...  [1cb66ea16e5e4f2816f0e188d3acc792, 1cb66ea16e5...\n11  20  Community 20  ...  [ad1595a78935472999444c9330e7730e, 735d19aea07...  [260fb94666cbdfb08286ce8d8162130d,d65838400462...\n12  16  Community 16  ...  [31a7e680c4d54101afe4c8d52d246913, 351abba16e5...  [04e5c071e4ee5496d5380662e1339f45,1bdf253855a1...\n13  12  Community 12  ...  [5ac60a941a5b4934bdc43d2f87de601c, d405c3154d0...  [04e5c071e4ee5496d5380662e1339f45,080d8e696ff3...\n14  19  Community 19  ...  [c1a146d7fb16429ea6d0aa2a55ee597f, ede93506320...  [080d8e696ff38c653ca90fa086415e74,0e2b719e4c97...\n15  14  Community 14  ...  [f422035f8b78417f98e4d116971cf9f3, c79d686eba0...  [04e5c071e4ee5496d5380662e1339f45,1cb66ea16e5e...\n16  11  Community 11  ...  [bcfdc48e5f044e1d84c5d217c1992d4b, b232fb0f2ac...  [04e5c071e4ee5496d5380662e1339f45,10730234d6cc...\n17  13  Community 13  ...  [b3aeb7ae009a4f52ae3ae4586e32fe11, 089b9b98417...  [0e2b719e4c97d0d8bfeb2a53f7638eb6,0f9b4e5a7cfc...\n18  15  Community 15  ...  [23becf8c6fca4f47a53ec4883d4bf63f, d0ffa3bcd12...  [0f9b4e5a7cfc0c3c89a8898a45383588,1bdf253855a1...\n19  22  Community 22  ...  [83c76fbd2a004d90a5b0a6736ffed61d, d9779c41e3c...  [98f3970b31dfa1d7391cdaa453d6ade7,b029f1164f62...\n20  21  Community 21  ...  [bd43f3d439a54781bd4b721a9a269b92, adc0f95733e...\n21  18  Community 18  ...  [225105a7be14447cb03186bd40756059, efce8a9d612...  [19f8fd68a8dbc1bba7058e13ce3a2e3d,1bdf253855a1...\n22  17  Community 17  ...  [f2c06f3a0c704296bf3353b91ee8af47, 9d08f285a7b...  [b4dec8fbe9f2a2c6a79d09c9484d15ae,f40e4b274b5e...\n\n[23 rows x 6 columns]\n\ud83d\ude80 join_text_units_to_entity_ids\n                       text_unit_ids                                         entity_ids                                id\n0   0ddc17ea5e566006c000b4013f2181a5  [b45241d70f0e43fca764df95b2b81f77, f2ff8044718...  0ddc17ea5e566006c000b4013f2181a5\n1   cd4234ed6caba8f15d09a2e3ee604b2a  [b45241d70f0e43fca764df95b2b81f77, f7e11b0e297...  cd4234ed6caba8f15d09a2e3ee604b2a\n2   d6583840046247f428a9f02738842a7c  [b45241d70f0e43fca764df95b2b81f77, 4119fd06010...  d6583840046247f428a9f02738842a7c\n3   260fb94666cbdfb08286ce8d8162130d  [3671ea0dd4e84c1a9b02c5ab2c8f4bac, e7ffaee9d31...  260fb94666cbdfb08286ce8d8162130d\n4   04e5c071e4ee5496d5380662e1339f45  [19a7f254a5d64566ab5cc15472df02de, f7e11b0e297...  04e5c071e4ee5496d5380662e1339f45\n5   1bdf253855a115bcf51faa63d7b07e82  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  1bdf253855a115bcf51faa63d7b07e82\n6   29793cee69d4eefd5fea8a5f2f27b521  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  29793cee69d4eefd5fea8a5f2f27b521\n7   2b5ecb7fba1301d1f3d307e194a6c435  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  2b5ecb7fba1301d1f3d307e194a6c435\n8   4ffd9df98742c035b3e15bb24c3edb12  [19a7f254a5d64566ab5cc15472df02de, 254770028d7...  4ffd9df98742c035b3e15bb24c3edb12\n9   5d70b47bf7167b7586f47fcc4355a746  [19a7f254a5d64566ab5cc15472df02de, e7ffaee9d31...  5d70b47bf7167b7586f47fcc4355a746\n10  6c362d3f8d01c76d84443dcabf3f322a  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  6c362d3f8d01c76d84443dcabf3f322a\n11  7064df4af064aeb556e5bab52e896414  [19a7f254a5d64566ab5cc15472df02de, e7ffaee9d31...  7064df4af064aeb556e5bab52e896414\n12  759315fa84c14e81f84fc71c73746184  [19a7f254a5d64566ab5cc15472df02de, e7ffaee9d31...  759315fa84c14e81f84fc71c73746184\n13  8435b078474636a989a8c22f5493e1b6  [19a7f254a5d64566ab5cc15472df02de, 254770028d7...  8435b078474636a989a8c22f5493e1b6\n14  b4dec8fbe9f2a2c6a79d09c9484d15ae  [19a7f254a5d64566ab5cc15472df02de, e7ffaee9d31...  b4dec8fbe9f2a2c6a79d09c9484d15ae\n15  bf29edcb41403e5af43aa101072f4fdf  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  bf29edcb41403e5af43aa101072f4fdf\n16  c79e67fc6f74a9afbe79c158000cc71b  [19a7f254a5d64566ab5cc15472df02de, de988724cfd...  c79e67fc6f74a9afbe79c158000cc71b\n17  e8d4072836ac08145edc2fa8c15ea2c2  [19a7f254a5d64566ab5cc15472df02de, e7ffaee9d31...  e8d4072836ac08145edc2fa8c15ea2c2\n18  f40e4b274b5e1a25afbff9ecb733e1f4  [19a7f254a5d64566ab5cc15472df02de, f7e11b0e297...  f40e4b274b5e1a25afbff9ecb733e1f4\n19  080d8e696ff38c653ca90fa086415e74  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  080d8e696ff38c653ca90fa086415e74\n20  0f9b4e5a7cfc0c3c89a8898a45383588  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  0f9b4e5a7cfc0c3c89a8898a45383588\n21  10730234d6ccc7cee08f3cfc58d8a9a1  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  10730234d6ccc7cee08f3cfc58d8a9a1\n22  3763b08136628f77304cb4eb1136ea48  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  3763b08136628f77304cb4eb1136ea48\n23  4cf4deeb7f61acb7b7db4ce0e57fb1e6  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  4cf4deeb7f61acb7b7db4ce0e57fb1e6\n24  77ae3762a0b062ca5350ea54a05450ae  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  77ae3762a0b062ca5350ea54a05450ae\n25  980594a50d68db06e6ca257bdb9ae95e  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  980594a50d68db06e6ca257bdb9ae95e\n26  bc5fde5d1e00a3ecc1e548c8d24f1c1f  [e7ffaee9d31d4d3c96e04f911d0a8f9e, f7e11b0e297...  bc5fde5d1e00a3ecc1e548c8d24f1c1f\n27  1cb66ea16e5e4f2816f0e188d3acc792  [f7e11b0e297a44a896dc67928368f600, 1fd3fa8bb5a...  1cb66ea16e5e4f2816f0e188d3acc792\n28  98f3970b31dfa1d7391cdaa453d6ade7  [1fd3fa8bb5a2408790042ab9573779ee, de988724cfd...  98f3970b31dfa1d7391cdaa453d6ade7\n29  0e2b719e4c97d0d8bfeb2a53f7638eb6  [de988724cfdf45cebfba3b13c43ceede, 9646481f66c...  0e2b719e4c97d0d8bfeb2a53f7638eb6\n30  206c2f9fd249659c7a897d323459cb6f  [de988724cfdf45cebfba3b13c43ceede, 254770028d7...  206c2f9fd249659c7a897d323459cb6f\n31  61a042016835080f3d334560b13b0e35  [de988724cfdf45cebfba3b13c43ceede, c9632a35146...  61a042016835080f3d334560b13b0e35\n32  999c9887098d1a25dc3b42a8da7ddc8c  [de988724cfdf45cebfba3b13c43ceede, 254770028d7...  999c9887098d1a25dc3b42a8da7ddc8c\n33  b029f1164f623c14a0cfaa73c246f50d  [de988724cfdf45cebfba3b13c43ceede, 254770028d7...  b029f1164f623c14a0cfaa73c246f50d\n34  ce95e4fc6ee410973c040fc628dce155  [de988724cfdf45cebfba3b13c43ceede, 04dbbb2283b...  ce95e4fc6ee410973c040fc628dce155\n35  d453d198afec5b284ff36024780b088c  [de988724cfdf45cebfba3b13c43ceede, 254770028d7...  d453d198afec5b284ff36024780b088c\n36  e3bef9514042131cf477476725497416  [de988724cfdf45cebfba3b13c43ceede, 254770028d7...  e3bef9514042131cf477476725497416\n37  ebc403dd3df39bacc3443ef4afb7edfd  [de988724cfdf45cebfba3b13c43ceede, 9646481f66c...  ebc403dd3df39bacc3443ef4afb7edfd\n38  19f8fd68a8dbc1bba7058e13ce3a2e3d  [254770028d7a4fa9877da4ba0ad5ad21, 273daeec8ca...  19f8fd68a8dbc1bba7058e13ce3a2e3d\n39  bc606176c752984da6d202275ee8c7a6  [273daeec8cad41e6b3e450447db58ee7, 3e95dacfe57...  bc606176c752984da6d202275ee8c7a6\n40  cd8a47ace09b9cee1e8b27b0689f2822  [273daeec8cad41e6b3e450447db58ee7, 4f3c97517f7...  cd8a47ace09b9cee1e8b27b0689f2822\n41  aa8d2310a206001404282ddb3fd645aa  [f2ff8044718648e18acef16dd9a65436, 00d785e7d76...  aa8d2310a206001404282ddb3fd645aa\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\numpy\\core\\fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is\ndeprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead.\n  return bound(*args, **kwds)\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\datashaper\\engine\\verbs\\convert.py:65: FutureWarning: errors='ignore' is\ndeprecated and will raise in a future version. Use to_numeric without passing `errors` and catch exceptions explicitly instead\n  column_numeric = cast(pd.Series, pd.to_numeric(column, errors=\"ignore\"))\n\ud83d\ude80 create_final_relationships\n                                              source                                           target  ...  target_degree rank\n0                                \"PROJECT GUTENBERG\"                              \"A CHRISTMAS CAROL\"  ...              3   10\n1                                \"PROJECT GUTENBERG\"  \"PROJECT GUTENBERG LITERARY ARCHIVE FOUNDATION\"  ...              3   10\n2                                \"PROJECT GUTENBERG\"                                        \"DEFECTS\"  ...              1    8\n3                                \"PROJECT GUTENBERG\"                                \"MICHAEL S. HART\"  ...              1    8\n4                                \"PROJECT GUTENBERG\"                                 \"SALT LAKE CITY\"  ...              1    8\n..                                               ...                                              ...  ...            ...  ...\n176                                            \"BOB\"                                          \"PETER\"  ...              1    4\n177  \"PROJECT GUTENBERG LITERARY ARCHIVE FOUNDATION\"                             \"PROJECT GUTENBERG\u2122\"  ...              3    6\n178  \"PROJECT GUTENBERG LITERARY ARCHIVE FOUNDATION\"                               \"ROYALTY PAYMENTS\"  ...              1    4\n179                             \"PROJECT GUTENBERG\u2122\"                                  \"UNITED STATES\"  ...              1    4\n180                             \"PROJECT GUTENBERG\u2122\"                                  \"COPYRIGHT LAW\"  ...              1    4\n\n[181 rows x 10 columns]\n\ud83d\ude80 join_text_units_to_relationship_ids\n                                  id                                   relationship_ids\n0   d6583840046247f428a9f02738842a7c  [68762e6f0d1c41cd857c6b964a8e76c3, 101572f552b...\n1   0ddc17ea5e566006c000b4013f2181a5  [70634e10a5e845aa8c6a32fe7e8eb2b2, 04085f7cf46...\n2   cd4234ed6caba8f15d09a2e3ee604b2a  [70634e10a5e845aa8c6a32fe7e8eb2b2, d203efdbfb2...\n3   260fb94666cbdfb08286ce8d8162130d  [80020a1da63042459e00266b2a605452, 9a8ce816ee9...\n4   04e5c071e4ee5496d5380662e1339f45  [31a7e680c4d54101afe4c8d52d246913, b7e9c9ef572...\n5   1bdf253855a115bcf51faa63d7b07e82  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n6   29793cee69d4eefd5fea8a5f2f27b521  [31a7e680c4d54101afe4c8d52d246913, 4465efb7f6e...\n7   2b5ecb7fba1301d1f3d307e194a6c435  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n8   4ffd9df98742c035b3e15bb24c3edb12  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n9   6c362d3f8d01c76d84443dcabf3f322a  [31a7e680c4d54101afe4c8d52d246913, adffed660d1...\n10  7064df4af064aeb556e5bab52e896414  [31a7e680c4d54101afe4c8d52d246913, 351abba16e5...\n11  759315fa84c14e81f84fc71c73746184  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n12  8435b078474636a989a8c22f5493e1b6  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n13  bf29edcb41403e5af43aa101072f4fdf  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n14  c79e67fc6f74a9afbe79c158000cc71b  [31a7e680c4d54101afe4c8d52d246913, c1a146d7fb1...\n15  e8d4072836ac08145edc2fa8c15ea2c2  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n16  5d70b47bf7167b7586f47fcc4355a746  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n17  b4dec8fbe9f2a2c6a79d09c9484d15ae  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n18  f40e4b274b5e1a25afbff9ecb733e1f4  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n19  3763b08136628f77304cb4eb1136ea48  [072cdee531b74513984f49d99a8d64a0, 5ae335d9210...\n20  77ae3762a0b062ca5350ea54a05450ae  [5ac60a941a5b4934bdc43d2f87de601c, d405c3154d0...\n21  98f3970b31dfa1d7391cdaa453d6ade7  [5bd156c87ec44e19ae6f8f62e6e50b9d, c8e706fbdc9...\n22  61a042016835080f3d334560b13b0e35  [f422035f8b78417f98e4d116971cf9f3, c79d686eba0...\n23  19f8fd68a8dbc1bba7058e13ce3a2e3d  [c79d686eba044c5586c706cdc096817d, da1684437ab...\n24  bc5fde5d1e00a3ecc1e548c8d24f1c1f  [c79d686eba044c5586c706cdc096817d, 0f70db1e598...\n25  10730234d6ccc7cee08f3cfc58d8a9a1  [b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870...\n26  ce95e4fc6ee410973c040fc628dce155  [3e1b063bbfa9423d84e50311296d2f3c, 1dbc51475cb...\n27  080d8e696ff38c653ca90fa086415e74  [1dbc51475cb04dafa4a8833a8378635e, c12b9ebd8b4...\n28  0e2b719e4c97d0d8bfeb2a53f7638eb6  [1dbc51475cb04dafa4a8833a8378635e, fdc954b4547...\n29  206c2f9fd249659c7a897d323459cb6f  [1dbc51475cb04dafa4a8833a8378635e, c2d48b75af6...\n30  4cf4deeb7f61acb7b7db4ce0e57fb1e6  [1dbc51475cb04dafa4a8833a8378635e, c12b9ebd8b4...\n31  999c9887098d1a25dc3b42a8da7ddc8c  [1dbc51475cb04dafa4a8833a8378635e, f9005e5c01b...\n32  980594a50d68db06e6ca257bdb9ae95e  [c12b9ebd8b4e42b7896822a32e3fa6eb, 27505f6ade4...\n33  ebc403dd3df39bacc3443ef4afb7edfd  [5a6c1d15424149f69052cd8d91fbff75, f9005e5c01b...\n34  0f9b4e5a7cfc0c3c89a8898a45383588  [da1684437ab04f23adac28ff70bd8429, 6768339b540...\n35  e3bef9514042131cf477476725497416  [da1684437ab04f23adac28ff70bd8429, 4517768fc4e...\n36  d453d198afec5b284ff36024780b088c  [dbe9063124d047dc8d6fcaeadcda038f, 89b2003e978...\n37  b029f1164f623c14a0cfaa73c246f50d  [c8e706fbdc90420d952deed03c4f04b4, 83c76fbd2a0...\n38  1cb66ea16e5e4f2816f0e188d3acc792  [40450f2c91944a81944621b94f190b49, 5b9fa6a9592...\n39  cd8a47ace09b9cee1e8b27b0689f2822  [40450f2c91944a81944621b94f190b49, 5d97ff82691...\n40  bc606176c752984da6d202275ee8c7a6  [b84d71ed9c3b45819eb3205fd28e13a0, b0b464bc92a...\n41  aa8d2310a206001404282ddb3fd645aa  [24652fab20d84381b112b8491de2887e, 36be44627ec...\n\ud83d\ude80 create_final_community_reports\n   community  ...                                    id\n0         11  ...  00f4f26e-f665-4513-a11b-c2af7a02a36e\n1         12  ...  9cdd9926-6613-4dc6-8b76-1701b42a67e5\n2         13  ...  6df08abe-4339-406b-8f8e-88508ea788d4\n3         14  ...  e128aff8-1831-4546-bc12-dfe6fe5b7456\n4         15  ...  a304c0d0-8d80-459b-a6d0-338c40913f0e\n5         16  ...  570f44a7-aa91-4799-8ec0-f83b0249093c\n6         17  ...  a70866bd-ef07-4ffd-9481-32e843273f93\n7         18  ...  bea51767-f949-4533-8dec-7dac859ca953\n8         19  ...  9569bb60-3df5-44f1-be6c-eb01b2499cba\n9         20  ...  eeccba53-7dfa-4b75-93ba-af46ebfe57e7\n10        21  ...  57c87ad1-6417-45c2-a340-be1a9dd581d3\n11        22  ...  ace75235-f237-4da4-b239-40418d462680\n12         0  ...  186203c5-a162-4cad-a8f5-7c92af213b31\n13         1  ...  e8e63308-7a83-4abc-a123-87952fb88042\n14        10  ...  726b6e9a-70ab-45c5-890c-c7845d62564c\n15         2  ...  1db816f5-301a-433c-95bf-a208fb6a06e9\n16         3  ...  f06bd7e9-029f-425a-aa19-0987930dcfbb\n17         4  ...  32285e91-d28f-487a-b438-8f978c9e5a19\n18         5  ...  c0679eb7-369f-4792-8849-b326bebe1381\n19         6  ...  4588263c-01b2-4689-b103-d6effcfc6870\n20         7  ...  7097902f-0f84-4e41-93bc-b319a59abef4\n21         8  ...  5584e7b9-227d-4248-b766-aab34a3e5805\n22         9  ...  44b1d2d9-bc0d-493e-b124-f2530d55bdf8\n\n[23 rows x 10 columns]\n\ud83d\ude80 create_final_text_units\n                                  id  ...                                   relationship_ids\n0   d6583840046247f428a9f02738842a7c  ...  [68762e6f0d1c41cd857c6b964a8e76c3, 101572f552b...\n1   10730234d6ccc7cee08f3cfc58d8a9a1  ...  [b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870...\n2   980594a50d68db06e6ca257bdb9ae95e  ...  [c12b9ebd8b4e42b7896822a32e3fa6eb, 27505f6ade4...\n3   080d8e696ff38c653ca90fa086415e74  ...  [1dbc51475cb04dafa4a8833a8378635e, c12b9ebd8b4...\n4   0e2b719e4c97d0d8bfeb2a53f7638eb6  ...  [1dbc51475cb04dafa4a8833a8378635e, fdc954b4547...\n5   7064df4af064aeb556e5bab52e896414  ...  [31a7e680c4d54101afe4c8d52d246913, 351abba16e5...\n6   759315fa84c14e81f84fc71c73746184  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n7   e8d4072836ac08145edc2fa8c15ea2c2  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n8   e3bef9514042131cf477476725497416  ...  [da1684437ab04f23adac28ff70bd8429, 4517768fc4e...\n9   4ffd9df98742c035b3e15bb24c3edb12  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n10  8435b078474636a989a8c22f5493e1b6  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n11  3763b08136628f77304cb4eb1136ea48  ...  [072cdee531b74513984f49d99a8d64a0, 5ae335d9210...\n12  206c2f9fd249659c7a897d323459cb6f  ...  [1dbc51475cb04dafa4a8833a8378635e, c2d48b75af6...\n13  ce95e4fc6ee410973c040fc628dce155  ...  [3e1b063bbfa9423d84e50311296d2f3c, 1dbc51475cb...\n14  260fb94666cbdfb08286ce8d8162130d  ...  [80020a1da63042459e00266b2a605452, 9a8ce816ee9...\n15  bf29edcb41403e5af43aa101072f4fdf  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n16  d453d198afec5b284ff36024780b088c  ...  [dbe9063124d047dc8d6fcaeadcda038f, 89b2003e978...\n17  c79e67fc6f74a9afbe79c158000cc71b  ...  [31a7e680c4d54101afe4c8d52d246913, c1a146d7fb1...\n18  77ae3762a0b062ca5350ea54a05450ae  ...  [5ac60a941a5b4934bdc43d2f87de601c, d405c3154d0...\n19  b029f1164f623c14a0cfaa73c246f50d  ...  [c8e706fbdc90420d952deed03c4f04b4, 83c76fbd2a0...\n20  29793cee69d4eefd5fea8a5f2f27b521  ...  [31a7e680c4d54101afe4c8d52d246913, 4465efb7f6e...\n21  b4dec8fbe9f2a2c6a79d09c9484d15ae  ...  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n22  5d70b47bf7167b7586f47fcc4355a746  ...  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n23  1bdf253855a115bcf51faa63d7b07e82  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n24  999c9887098d1a25dc3b42a8da7ddc8c  ...  [1dbc51475cb04dafa4a8833a8378635e, f9005e5c01b...\n25  bc5fde5d1e00a3ecc1e548c8d24f1c1f  ...  [c79d686eba044c5586c706cdc096817d, 0f70db1e598...\n26  4cf4deeb7f61acb7b7db4ce0e57fb1e6  ...  [1dbc51475cb04dafa4a8833a8378635e, c12b9ebd8b4...\n27  61a042016835080f3d334560b13b0e35  ...  [f422035f8b78417f98e4d116971cf9f3, c79d686eba0...\n28  98f3970b31dfa1d7391cdaa453d6ade7  ...  [5bd156c87ec44e19ae6f8f62e6e50b9d, c8e706fbdc9...\n29  ebc403dd3df39bacc3443ef4afb7edfd  ...  [5a6c1d15424149f69052cd8d91fbff75, f9005e5c01b...\n30  1cb66ea16e5e4f2816f0e188d3acc792  ...  [40450f2c91944a81944621b94f190b49, 5b9fa6a9592...\n31  bc606176c752984da6d202275ee8c7a6  ...  [b84d71ed9c3b45819eb3205fd28e13a0, b0b464bc92a...\n32  cd8a47ace09b9cee1e8b27b0689f2822  ...  [40450f2c91944a81944621b94f190b49, 5d97ff82691...\n33  f40e4b274b5e1a25afbff9ecb733e1f4  ...  [004f40a5aeca48a1879db728eb12bcba, 4465efb7f6e...\n34  19f8fd68a8dbc1bba7058e13ce3a2e3d  ...  [c79d686eba044c5586c706cdc096817d, da1684437ab...\n35  0f9b4e5a7cfc0c3c89a8898a45383588  ...  [da1684437ab04f23adac28ff70bd8429, 6768339b540...\n36  6c362d3f8d01c76d84443dcabf3f322a  ...  [31a7e680c4d54101afe4c8d52d246913, adffed660d1...\n37  04e5c071e4ee5496d5380662e1339f45  ...  [31a7e680c4d54101afe4c8d52d246913, b7e9c9ef572...\n38  2b5ecb7fba1301d1f3d307e194a6c435  ...  [31a7e680c4d54101afe4c8d52d246913, 004f40a5aec...\n39  aa8d2310a206001404282ddb3fd645aa  ...  [24652fab20d84381b112b8491de2887e, 36be44627ec...\n40  0ddc17ea5e566006c000b4013f2181a5  ...  [70634e10a5e845aa8c6a32fe7e8eb2b2, 04085f7cf46...\n41  cd4234ed6caba8f15d09a2e3ee604b2a  ...  [70634e10a5e845aa8c6a32fe7e8eb2b2, d203efdbfb2...\n\n[42 rows x 6 columns]\nC:\\Users\\admin\\anaconda3\\envs\\graphrag\\lib\\site-packages\\datashaper\\engine\\verbs\\convert.py:72: FutureWarning: errors='ignore' is\ndeprecated and will raise in a future version. Use to_datetime without passing `errors` and catch exceptions explicitly instead\n  datetime_column = pd.to_datetime(column, errors=\"ignore\")\n\ud83d\ude80 create_base_documents\n                                 id  ...     title\n0  c305886e4aa2f6efcf64b57762777055  ...  book.txt\n\n[1 rows x 4 columns]\n\ud83d\ude80 create_final_documents\n                                 id  ...     title\n0  c305886e4aa2f6efcf64b57762777055  ...  book.txt\n\n[1 rows x 4 columns]\n\u2819 GraphRAG Indexer\n\u251c\u2500\u2500 Loading Input (text) - 1 files loaded (0 filtered) \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 100% 0:00:00 0:00:00\n\u251c\u2500\u2500 create_base_text_units\n\u251c\u2500\u2500 create_base_extracted_entities\n\u251c\u2500\u2500 create_summarized_entities\n\u251c\u2500\u2500 create_base_entity_graph\n\u251c\u2500\u2500 create_final_entities\n\u251c\u2500\u2500 create_final_nodes\n\u251c\u2500\u2500 create_final_communities\n\u251c\u2500\u2500 join_text_units_to_entity_ids\n\u251c\u2500\u2500 create_final_relationships\n\u251c\u2500\u2500 join_text_units_to_relationship_ids\n\u251c\u2500\u2500 create_final_community_reports\n\u251c\u2500\u2500 create_final_text_units\n\u251c\u2500\u2500 create_base_documents\n\u2514\u2500\u2500 create_final_documents\n\ud83d\ude80 All workflows completed successfully.\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u4f7f\u7528\u67e5\u8be2\u5f15\u64ce<\/strong><\/h2>\n\n\n\n<p>\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u4f7f\u7528\u8fd9\u4e2a\u6570\u636e\u96c6\u63d0\u51fa\u4e00\u4e9b\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528\u5168\u5c40\u641c\u7d22\u63d0\u51fa\u9ad8\u7ea7\u95ee\u9898\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.query --root ragtest --method global \"What are the top themes in this story?\"\n<\/pre><\/div>\n\n\n\n<p>\u8f93\u51fa\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.query --root ragtest --method global \"What are the top themes in this story?\"\n\n\nINFO: Reading settings from ragtest\\settings.yaml\ncreating llm client with {'api_key': 'REDACTED,len=56', 'type': \"openai_chat\", 'model': 'llama3.1:70b', 'max_tokens': 4000, 'temperature': 0.0, 'top_p': 1.0, 'n': 1, 'request_timeout': 180.0, 'api_base': 'http:\/\/localhost:11434\/v1', 'api_version': None, 'organization': None, 'proxy': None, 'cognitive_services_endpoint': None, 'deployment_name': None, 'model_supports_json': True, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}\n\nSUCCESS: Global Search Response: The story presents several prominent themes that intertwine to convey its moral and emotional messages. Below are the key themes identified:\n\n### Transformation\nThe theme of transformation is central to the narrative, particularly through the character of Ebenezer Scrooge. His profound change from a miserly individual to a compassionate person is catalyzed by encounters with the spirits of Christmas. These encounters emphasize the importance of self-reflection and the potential for redemption, especially during the Christmas season [Data: Reports (14, 12, 13, 20, 22, +more); (11)].\n\n### Generosity and Compassion\nGenerosity and compassion emerge as significant themes, illustrated by Scrooge's eventual decision to assist the Cratchit family and his changing attitude towards Christmas. The narrative underscores the impact of individual actions on the community and highlights the importance of caring for others, particularly during festive times [Data: Reports (16, 19, 12, 14, 15, +more)].\n\n### Redemption\nRedemption is a key theme, as Scrooge's journey illustrates the possibility of change and the importance of making amends for past mistakes. The story advocates for a collective responsibility to care for one another, reinforcing the idea that it is never too late to change one's ways [Data: Reports (14, 12, 13, 20, 22, +more)].\n\n### Family and Human Connection\nThe importance of family and human connection is a recurring theme, evident in the relationships within the Cratchit family and Scrooge's interactions with his nephew Fred. The narrative emphasizes the value of love, support, and togetherness, particularly during Christmas [Data: Reports (16, 19, 12, 14, 15, +more)].\n\n### Social Responsibility\nSocial responsibility and the struggles of the working class are highlighted through the character of Bob Cratchit and his family. This theme showcases the dire consequences of poverty and the need for empathy towards the less fortunate, which is particularly relevant in the context of Victorian society [Data: Reports (14, 16, 19, 12, 10, +more)].\n\n### Conclusion\nThese themes collectively illustrate the moral fabric of the story, emphasizing the transformative power of compassion, the importance of family, and the necessity of social responsibility. The narrative serves as a reminder of the potential for change and the impact of individual actions on the broader community.<\/pre><\/div>\n\n\n\n<p>\u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528\u672c\u5730\u641c\u7d22\u6765\u8be2\u95ee\u6709\u5173\u7279\u5b9a\u5b57\u7b26\u7684\u66f4\u5177\u4f53\u7684\u95ee\u9898\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.query --root ragtest --method local \"Who is Scrooge, and what are his main relationships?\"\n<\/pre><\/div>\n\n\n\n<p>\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >python -m graphrag.query --root ragtest --method local \"Who is Scrooge, and what are his main relationships?\"\n\n\nINFO: Reading settings from ragtest\\settings.yaml\n[2024-07-29T12:23:43Z WARN  lance::dataset] No existing dataset at D:\\GraphRAG\\microsoft\\ollama\\lancedb\\description_embedding.lance, it will be created\ncreating llm client with {'api_key': 'REDACTED,len=56', 'type': \"openai_chat\", 'model': 'llama3.1:70b', 'max_tokens': 4000, 'temperature': 0.0, 'top_p': 1.0, 'n': 1, 'request_timeout': 180.0, 'api_base': 'http:\/\/localhost:11434\/v1', 'api_version': None, 'organization': None, 'proxy': None, 'cognitive_services_endpoint': None, 'deployment_name': None, 'model_supports_json': True, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}\ncreating embedding llm client with {'api_key': 'REDACTED,len=56', 'type': \"openai_embedding\", 'model': 'nomic-embed-text', 'max_tokens': 4000, 'temperature': 0, 'top_p': 1, 'n': 1, 'request_timeout': 180.0, 'api_base': 'http:\/\/localhost:11434\/v1', 'api_version': None, 'organization': None, 'proxy': None, 'cognitive_services_endpoint': None, 'deployment_name': None, 'model_supports_json': None, 'tokens_per_minute': 0, 'requests_per_minute': 0, 'max_retries': 10, 'max_retry_wait': 10.0, 'sleep_on_rate_limit_recommendation': True, 'concurrent_requests': 25}\n\nSUCCESS: Local Search Response: ## Who is Scrooge?\n\nEbenezer Scrooge is the central character in Charles Dickens' classic novella \"A Christmas Carol.\" Initially depicted as a miserly and cold-hearted businessman, Scrooge embodies greed and a lack of compassion, particularly towards the poor and his employees. He is known for his disdain for Christmas and the joy it brings to others, often isolating himself from family and community connections. Scrooge's character undergoes a profound transformation throughout the story, prompted by supernatural encounters with the Ghosts of Christmas Past, Present, and Yet to Come. These spirits guide him to reflect on his life choices, ultimately leading him to embrace generosity and compassion, particularly towards those he once neglected [Data: Entities (21, 4, 141); Relationships (46, 78, 90, 107, 58)].\n\n## Main Relationships\n\n### Bob Cratchit\nOne of the most significant relationships in Scrooge's life is with Bob Cratchit, his underpaid and overworked clerk. Initially, Scrooge treats Bob with indifference, reflecting his lack of empathy towards the struggles of the working class. However, as the story progresses, Scrooge's transformation leads him to recognize Bob's hardships, particularly concerning the health of Bob's son, Tiny Tim. This relationship highlights themes of social responsibility and the impact of individual actions on the lives of others. Ultimately, Scrooge raises Bob's salary and supports his family, marking a significant shift in his character [Data: Relationships (15, 89, 33)].\n\n### Tiny Tim\nTiny Tim, Bob Cratchit's youngest son, serves as a poignant symbol of hope and compassion in the narrative. His frail health and optimistic spirit deeply affect Scrooge, prompting him to reconsider his attitudes towards kindness and generosity. Scrooge's concern for Tiny Tim's well-being becomes a crucial motivator for his transformation, emphasizing the interconnectedness of their fates. The relationship between Scrooge and Tiny Tim illustrates the potential for change and the importance of empathy in fostering human connections [Data: Relationships (89, 15)].\n\n### The Ghosts of Christmas\nScrooge's encounters with the three spirits\u2014Christmas Past, Present, and Yet to Come\u2014are pivotal in his journey of self-discovery. Each ghost presents him with vivid experiences that compel him to confront his past mistakes, recognize the joy and struggles of those around him, and ultimately face the grim future that awaits him if he does not change. These supernatural relationships serve as catalysts for Scrooge's redemption, highlighting the importance of self-reflection and the potential for personal growth [Data: Relationships (27, 29, 31)].\n\n### Jacob Marley\nJacob Marley, Scrooge's deceased business partner, plays a crucial role in initiating Scrooge's transformation. Marley appears as a ghost to warn Scrooge about the dire consequences of his miserly ways and the need for change. His spectral visit serves as a wake-up call for Scrooge, emphasizing the importance of compassion and the repercussions of a life focused solely on material wealth [Data: Relationships (22, 25)].\n\n### Scrooge's Nephew\nScrooge's relationship with his nephew, Fred, further illustrates the contrast between Scrooge's initial misanthropy and the spirit of Christmas. Fred embodies joy and familial love, consistently inviting Scrooge to join in the Christmas festivities. Despite Scrooge's rejection of these invitations, Fred's unwavering kindness highlights the potential for connection and the importance of family during the holiday season [Data: Entities (28, 140)].\n\nIn summary, Scrooge's relationships with Bob Cratchit, Tiny Tim, the Ghosts of Christmas, Jacob Marley, and his nephew Fred are central to his character development and the overarching themes of \"A Christmas Carol.\" These connections illustrate the transformative power of compassion, generosity, and human connection, ultimately leading to Scrooge's redemption.\n\n<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6bd5\u7adf\u7528 openai api \u6765\u4f7f\u7528 GraphRAG \u5f88\u8d35\uff0c\u6240\u4ee5\u4e0b\u9762\u662f\u5728 widnows 11 \u4e0b\u7528 oll [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[444,313,289,443,442,312],"tags":[527,433],"class_list":["post-4376","post","type-post","status-publish","format-standard","hentry","category-ai","category-chatgpt","category-gpt","category-llm","category-llms","category-openai","tag-graphrag","tag-ollama"],"views":3648,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4376"}],"version-history":[{"count":25,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4376\/revisions"}],"predecessor-version":[{"id":4402,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4376\/revisions\/4402"}],"wp:attachment":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}