diff --git a/cli/index.html b/cli/index.html index 2ad855b4..6c7d563a 100644 --- a/cli/index.html +++ b/cli/index.html @@ -1483,24 +1483,28 @@
 query [OPTIONS]
 

Options:

-
  --method [local|global|drift]  The query algorithm to use.  [required]
-  --query TEXT                   The query to execute.  [required]
-  --config PATH                  The configuration to use.
-  --data PATH                    Indexing pipeline output directory (i.e.
-                                 contains the parquet files).
-  --root PATH                    The project root directory.  [default: .]
-  --community-level INTEGER      The community level in the Leiden community
-                                 hierarchy from which to load community
-                                 reports. Higher values represent reports from
-                                 smaller communities.  [default: 2]
-  --response-type TEXT           Free form text describing the response type
-                                 and format, can be anything, e.g. Multiple
-                                 Paragraphs, Single Paragraph, Single
-                                 Sentence, List of 3-7 Points, Single Page,
-                                 Multi-Page Report. Default: Multiple
-                                 Paragraphs  [default: Multiple Paragraphs]
-  --streaming / --no-streaming   Print response in a streaming manner.
-                                 [default: no-streaming]
+
  --method [local|global|drift]   The query algorithm to use.  [required]
+  --query TEXT                    The query to execute.  [required]
+  --config PATH                   The configuration to use.
+  --data PATH                     Indexing pipeline output directory (i.e.
+                                  contains the parquet files).
+  --root PATH                     The project root directory.  [default: .]
+  --community-level INTEGER       The community level in the Leiden community
+                                  hierarchy from which to load community
+                                  reports. Higher values represent reports
+                                  from smaller communities.  [default: 2]
+  --dynamic-community-selection / --no-dynamic-community-selection
+                                  Use global search with dynamic community
+                                  selection.  [default: no-dynamic-community-
+                                  selection]
+  --response-type TEXT            Free form text describing the response type
+                                  and format, can be anything, e.g. Multiple
+                                  Paragraphs, Single Paragraph, Single
+                                  Sentence, List of 3-7 Points, Single Page,
+                                  Multi-Page Report. Default: Multiple
+                                  Paragraphs  [default: Multiple Paragraphs]
+  --streaming / --no-streaming    Print response in a streaming manner.
+                                  [default: no-streaming]
 

update

Update an existing knowledge graph index.

diff --git a/examples_notebooks/drift_search/index.html b/examples_notebooks/drift_search/index.html index 132aca01..e8c0b9d6 100644 --- a/examples_notebooks/drift_search/index.html +++ b/examples_notebooks/drift_search/index.html @@ -2010,16 +2010,16 @@ text_unit_df.head()
@@ -2056,53 +2056,53 @@ Text unit records: 12 0 -2cf7a230c367a2dfaf0fc3c903eb8948 +06bdff339c02ab35c80fa49320d5da66 # Operation: Dulce\n\n## Chapter 1\n\nThe thru... -2500 +600 [958fdd043f17ade63cb13570b59df295] [b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[ad5a2020-cdec-4982-acdf-dbe5ee530066, 9d8a0fe... +[148fffeb994541b2b4b6dcefda7001a8, 89c08e79329... +[439081a3-bfeb-4693-968a-0f6189d8fa50, 3399e3d... 1 -6d1255303acb7c9dc951cb0f5fc3042c -be the same.\n\n\*\n\nThe sense of foreboding... -2500 +28dc4aa41a3e99deb7f354682f3e9904 +'s authoritarian performance. _Protocols_, Jor... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[5d1c9126-c48d-4755-9f9c-f739c823f95f, ec64a42... +[4119fd06010c494caa07f439b333f4c5, 077d2820ae1... +[9a6f414210e14841a5b0e661aedc898d, db541b72609... +[b09594cb-d4b7-4de4-a1af-97778300eb1b, f7c5ea4... 2 -e841f178310356740b2ee9101d12c97f -. "Your take on these signal inconsistencies?"... -2500 +813db3138ef511c34be86f841f68aa8f +, rehearsing the speech for their subordinates... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[0b22a34b-32e9-46a4-a0e8-d3d5466eba15, 7e14972... +[b45241d70f0e43fca764df95b2b81f77, 077d2820ae1... +[0467928aa65e4a4fba62bdb1467e3a54, 7cc3356d38d... +[7642fe21-7cb9-4428-848b-d2e3f5ab10ca, 6fe3d6c... 3 -f36d96862b9366d7240b5c7ceb04f12b -, absorbed in the bewilderment of contact, whi... -2500 +d0afd106abf3a2966ff88a99eef710db +, weighing his words carefully. "Our tech is t... +600 [958fdd043f17ade63cb13570b59df295] [b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, 09f18f81442... -[9cd6d645-ab97-4b39-b02e-647cea9b5545, 50dc124... +[148fffeb994541b2b4b6dcefda7001a8, 89c08e79329... +[956e4c22-e343-4b5d-ad3c-d44ca3ce5fb5] 4 -f7d43808d2fb452cd953bf50c6de6bd4 -were at once coherent and enigmatic: "*Voyage... -2500 +f4c7c95d7bf621c6eb73d331cbf0b608 +stepping into their exchange. The authority i... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[e02be3e37ca0454883a4c1fd859c24bb, 1dbc51475cb... -[87cf5900-6211-4e04-9115-50f3617c88b4] +[077d2820ae1845bcbb1803379a3d1eae, 1fd3fa8bb5a... +[478e4c72d8fb46dd8cc9f0691c9878fd, 82b0446e7c9... +[a54eda4d-b5bf-471d-989f-370eb9aff961, 9f85274... @@ -2396,38 +2396,31 @@ search = DRIFTSearch(
-
-
- -
@@ -2439,92 +2432,97 @@ search = DRIFTSearch( +
@@ -5211,7 +6078,7 @@ search = DRIFTSearch(
diff --git a/examples_notebooks/global_search/index.html b/examples_notebooks/global_search/index.html index c1335d5b..658d60a6 100644 --- a/examples_notebooks/global_search/index.html +++ b/examples_notebooks/global_search/index.html @@ -2026,7 +2026,11 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: import pandas as pd import tiktoken -from graphrag.query.indexer_adapters import read_indexer_entities, read_indexer_reports +from graphrag.query.indexer_adapters import ( + read_indexer_communities, + read_indexer_entities, + read_indexer_reports, +) from graphrag.query.llm.oai.chat_openai import ChatOpenAI from graphrag.query.llm.oai.typing import OpenaiApiType from graphrag.query.structured_search.global_search.community_context import ( @@ -2039,7 +2043,11 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: import pandas as pd import tiktoken -from graphrag.query.indexer_adapters import read_indexer_entities, read_indexer_reports +from graphrag.query.indexer_adapters import ( + read_indexer_communities, + read_indexer_entities, + read_indexer_reports, +) from graphrag.query.llm.oai.chat_openai import ChatOpenAI from graphrag.query.llm.oai.typing import OpenaiApiType from graphrag.query.structured_search.global_search.community_context import ( @@ -2102,7 +2110,7 @@ from graphrag.query.structured_search.global_search.search import GlobalSearchmax_retries=20, ) -token_encoder = tiktoken.get_encoding("cl100k_base") +token_encoder = tiktoken.encoding_for_model(llm_model)
api_key = os.environ["GRAPHRAG_API_KEY"] llm_model = os.environ["GRAPHRAG_LLM_MODEL"] @@ -2114,7 +2122,7 @@ llm = ChatOpenAI( max_retries=20, ) -token_encoder = tiktoken.get_encoding("cl100k_base")
+token_encoder = tiktoken.encoding_for_model(llm_model) @@ -2129,7 +2137,8 @@ token_encoder = tiktoken.get_encoding("cl100k_base")
@@ -2155,6 +2164,7 @@ token_encoder = tiktoken.get_encoding("cl100k_base")
# parquet files generated from indexing pipeline
 INPUT_DIR = "./inputs/operation dulce"
+COMMUNITY_TABLE = "create_final_communities"
 COMMUNITY_REPORT_TABLE = "create_final_community_reports"
 ENTITY_TABLE = "create_final_nodes"
 ENTITY_EMBEDDING_TABLE = "create_final_entities"
@@ -2165,6 +2175,7 @@ token_encoder = tiktoken.get_encoding("cl100k_base")
# parquet files generated from indexing pipeline INPUT_DIR = "./inputs/operation dulce" +COMMUNITY_TABLE = "create_final_communities" COMMUNITY_REPORT_TABLE = "create_final_community_reports" ENTITY_TABLE = "create_final_nodes" ENTITY_EMBEDDING_TABLE = "create_final_entities" @@ -2196,28 +2207,36 @@ COMMUNITY_LEVEL = 2
-
entity_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_TABLE}.parquet")
+
community_df = pd.read_parquet(f"{INPUT_DIR}/{COMMUNITY_TABLE}.parquet")
+entity_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_TABLE}.parquet")
 report_df = pd.read_parquet(f"{INPUT_DIR}/{COMMUNITY_REPORT_TABLE}.parquet")
 entity_embedding_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_EMBEDDING_TABLE}.parquet")
 
+communities = read_indexer_communities(community_df, entity_df, report_df)
 reports = read_indexer_reports(report_df, entity_df, COMMUNITY_LEVEL)
 entities = read_indexer_entities(entity_df, entity_embedding_df, COMMUNITY_LEVEL)
+
 print(f"Total report count: {len(report_df)}")
 print(
     f"Report count after filtering by community level {COMMUNITY_LEVEL}: {len(reports)}"
 )
+
 report_df.head()
 
-
entity_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_TABLE}.parquet") +
community_df = pd.read_parquet(f"{INPUT_DIR}/{COMMUNITY_TABLE}.parquet") +entity_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_TABLE}.parquet") report_df = pd.read_parquet(f"{INPUT_DIR}/{COMMUNITY_REPORT_TABLE}.parquet") entity_embedding_df = pd.read_parquet(f"{INPUT_DIR}/{ENTITY_EMBEDDING_TABLE}.parquet") +communities = read_indexer_communities(community_df, entity_df, report_df) reports = read_indexer_reports(report_df, entity_df, COMMUNITY_LEVEL) entities = read_indexer_entities(entity_df, entity_embedding_df, COMMUNITY_LEVEL) + print(f"Total report count: {len(report_df)}") print( f"Report count after filtering by community level {COMMUNITY_LEVEL}: {len(reports)}" ) + report_df.head()
@@ -2230,8 +2249,8 @@ report_df.head()
@@ -2271,68 +2290,68 @@ Report count after filtering by community level 2: 5 0 -4 -# Dulce Base and the Paranormal Military Squad... +10 +# Paranormal Military Squad at Dulce Base: Dec... 1 8.5 -Dulce Base and the Paranormal Military Squad: ... +Paranormal Military Squad at Dulce Base: Decod... The impact severity rating is high due to the ... -The community is centered around Dulce Base, a... -[{'explanation': 'Dulce Base is the primary lo... -{\n "title": "Dulce Base and the Paranormal... -6f8ba6b6-506e-46c1-83ce-982d59622554 +The Paranormal Military Squad, stationed at Du... +[{'explanation': 'Jordan is a central figure i... +{\n "title": "Paranormal Military Squad at ... +1ba2d200-dd26-4693-affe-a5539d0a0e0d 1 -5 -# Sam Rivera and the Paranormal Military Squad... +11 +# Dulce and Paranormal Military Squad Operatio... 1 -7.5 -Sam Rivera and the Paranormal Military Squad a... +8.5 +Dulce and Paranormal Military Squad Operations The impact severity rating is high due to the ... -The community is centered around Sam Rivera, a... -[{'explanation': 'Sam Rivera is recognized for... -{\n "title": "Sam Rivera and the Paranormal... -418f4536-d673-4212-8a7c-ca1aac547d0f +The community centers around Dulce, a secretiv... +[{'explanation': 'Dulce is described as a top-... +{\n "title": "Dulce and Paranormal Military... +a8a530b0-ae6b-44ea-b11c-9f70d138298d 2 -0 -# Dulce Base and the Paranormal Military Squad... -0 -8.5 -Dulce Base and the Paranormal Military Squad Team -The impact severity rating is high due to the ... -Dulce Base serves as the operational hub for t... -[{'explanation': 'The Paranormal Military Squa... -{\n "title": "Dulce Base and the Paranormal... -251df57e-fd49-49a7-b262-ccaff95d7a51 +12 +# Paranormal Military Squad and Dulce Base Ope... +1 +7.5 +Paranormal Military Squad and Dulce Base Opera... +The impact severity rating is relatively high ... +The community centers around the Paranormal Mi... +[{'explanation': 'Taylor is a central figure w... +{\n "title": "Paranormal Military Squad and... +0478975b-c805-4cc1-b746-82f3e689e2f3 3 +13 +# Mission Dynamics and Leadership: Cruz and Wa... 1 -# Dulce Base and the Paranormal Military Squad... -0 -8.5 -Dulce Base and the Paranormal Military Squad: ... -The impact severity rating is high due to the ... -The community is centered around Dulce Base, a... -[{'explanation': 'Sam Rivera is recognized for... -{\n "title": "Dulce Base and the Paranormal... -6e536385-8056-4a82-8670-c0ccaf007fb4 +7.5 +Mission Dynamics and Leadership: Cruz and Wash... +The impact severity rating is relatively high ... +This report explores the intricate dynamics of... +[{'explanation': 'Cruz is a central figure in ... +{\n "title": "Mission Dynamics and Leadersh... +b56f6e68-3951-4f07-8760-63700944a375 4 -2 -# Dulce Base: Extraterrestrial Research and Co... -0 +14 +# Dulce Base and Paranormal Military Squad: Br... +1 8.5 -Dulce Base: Extraterrestrial Research and Comm... +Dulce Base and Paranormal Military Squad: Brid... The impact severity rating is high due to the ... -Dulce Base is a highly classified facility in ... -[{'explanation': 'Dulce Base is the epicenter ... -{\n "title": "Dulce Base: Extraterrestrial ... -660c8fba-b65f-4fcd-9c98-203600cf1981 +The community centers around the Dulce Base, a... +[{'explanation': 'Sam Rivera, a member of the ... +{\n "title": "Dulce Base and Paranormal Mil... +736e7006-d050-4abb-a122-00febf3f540f @@ -2374,12 +2393,14 @@ Report count after filtering by community level 2: 5
context_builder = GlobalCommunityContext(
     community_reports=reports,
+    communities=communities,
     entities=entities,  # default to None if you don't want to use community weights for ranking
     token_encoder=token_encoder,
 )
 
context_builder = GlobalCommunityContext( community_reports=reports, + communities=communities, entities=entities, # default to None if you don't want to use community weights for ranking token_encoder=token_encoder, )
@@ -2541,13 +2562,13 @@ reduce_llm_params = {
result = await search_engine.asearch(
-    "What is the major conflict in this story and who are the protagonist and antagonist?"
+    "What is Cosmic Vocalization and who are involved in it?"
 )
 
 print(result.response)
 
result = await search_engine.asearch( - "What is the major conflict in this story and who are the protagonist and antagonist?" + "What is Cosmic Vocalization and who are involved in it?" ) print(result.response)
@@ -2562,17 +2583,23 @@ print(result.response)
@@ -2642,44 +2669,140 @@ result.context_data["reports"] 0 -4 +15 Dulce Base and the Paranormal Military Squad: ... -1.000000 +1.00 # Dulce Base and the Paranormal Military Squad... -8.5 +9.5 1 -5 -Sam Rivera and the Paranormal Military Squad a... -1.000000 -# Sam Rivera and the Paranormal Military Squad... -7.5 +11 +Dulce and Paranormal Military Squad Operations +0.30 +# Dulce and Paranormal Military Squad Operatio... +8.5 2 -2 -Dulce Base: Extraterrestrial Research and Comm... -0.750000 -# Dulce Base: Extraterrestrial Research and Co... +10 +Paranormal Military Squad at Dulce Base: Decod... +0.30 +# Paranormal Military Squad at Dulce Base: Dec... 8.5 3 -3 +7 Operation: Dulce and the Paranormal Military S... -0.583333 +0.20 # Operation: Dulce and the Paranormal Military... 8.5 4 -0 -Dulce Base and the Paranormal Military Squad Team -0.416667 -# Dulce Base and the Paranormal Military Squad... +8 +Dr. Jordan Hayes and the Paranormal Military S... +0.18 +# Dr. Jordan Hayes and the Paranormal Military... 8.5 + +5 +1 +Earth's Interstellar Communication Initiative +0.16 +# Earth's Interstellar Communication Initiativ... +8.5 + + +6 +12 +Paranormal Military Squad and Dulce Base Opera... +0.16 +# Paranormal Military Squad and Dulce Base Ope... +7.5 + + +7 +13 +Mission Dynamics and Leadership: Cruz and Wash... +0.16 +# Mission Dynamics and Leadership: Cruz and Wa... +7.5 + + +8 +14 +Dulce Base and Paranormal Military Squad: Brid... +0.12 +# Dulce Base and Paranormal Military Squad: Br... +8.5 + + +9 +16 +Dulce Military Base and Alien Intelligence Com... +0.08 +# Dulce Military Base and Alien Intelligence C... +8.5 + + +10 +18 +Paranormal Military Squad Team and Dulce Base'... +0.04 +# Paranormal Military Squad Team and Dulce Bas... +8.5 + + +11 +5 +Alien Script and First Contact Operations +0.02 +# Alien Script and First Contact Operations\n\... +8.5 + + +12 +4 +Dulce Facility and Control Room of Dulce: Extr... +0.02 +# Dulce Facility and Control Room of Dulce: Ex... +8.5 + + +13 +17 +Dulce Team and Underground Command Center: Int... +0.02 +# Dulce Team and Underground Command Center: I... +8.5 + + +14 +19 +Central Terminal and Viewing Monitors at Dulce... +0.02 +# Central Terminal and Viewing Monitors at Dul... +8.5 + + +15 +6 +Cosmic Vocalization and Universe Interactions +0.02 +# Cosmic Vocalization and Universe Interaction... +7.5 + + +16 +9 +Dulce Base Exploration by TEAM and MAINFRAME ROOM +0.02 +# Dulce Base Exploration by TEAM and MAINFRAME... +7.5 + @@ -2708,10 +2831,14 @@ result.context_data["reports"]
# inspect number of LLM calls and tokens
-print(f"LLM calls: {result.llm_calls}. LLM tokens: {result.prompt_tokens}")
+print(
+    f"LLM calls: {result.llm_calls}. Prompt tokens: {result.prompt_tokens}. Output tokens: {result.output_tokens}."
+)
 
# inspect number of LLM calls and tokens -print(f"LLM calls: {result.llm_calls}. LLM tokens: {result.prompt_tokens}")
+print( + f"LLM calls: {result.llm_calls}. Prompt tokens: {result.prompt_tokens}. Output tokens: {result.output_tokens}." +) @@ -2723,7 +2850,7 @@ print(f"LLM calls: {result.llm_calls}. LLM tokens: {result.prompt_tokens}")
-
LLM calls: 2. LLM tokens: 5270
+
LLM calls: 2. Prompt tokens: 11291. Output tokens: 606.
 
diff --git a/examples_notebooks/global_search_with_dynamic_community_selection/index.html b/examples_notebooks/global_search_with_dynamic_community_selection/index.html new file mode 100644 index 00000000..745b6bc8 --- /dev/null +++ b/examples_notebooks/global_search_with_dynamic_community_selection/index.html @@ -0,0 +1,2817 @@ + + + + + + + + + + + + + + + + + + + Global search with dynamic community selection - GraphRAG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Global search with dynamic community selection

+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/examples_notebooks/inputs/operation dulce/create_final_communities.parquet b/examples_notebooks/inputs/operation dulce/create_final_communities.parquet new file mode 100644 index 00000000..0f367574 Binary files /dev/null and b/examples_notebooks/inputs/operation dulce/create_final_communities.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_community_reports.parquet b/examples_notebooks/inputs/operation dulce/create_final_community_reports.parquet index d28111c3..b85be4c3 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_community_reports.parquet and b/examples_notebooks/inputs/operation dulce/create_final_community_reports.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_covariates.parquet b/examples_notebooks/inputs/operation dulce/create_final_covariates.parquet index e4bcbd5b..4926a47e 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_covariates.parquet and b/examples_notebooks/inputs/operation dulce/create_final_covariates.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_entities.parquet b/examples_notebooks/inputs/operation dulce/create_final_entities.parquet index 30f0ac6b..d350fff6 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_entities.parquet and b/examples_notebooks/inputs/operation dulce/create_final_entities.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_nodes.parquet b/examples_notebooks/inputs/operation dulce/create_final_nodes.parquet index 97772bce..3b28884d 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_nodes.parquet and b/examples_notebooks/inputs/operation dulce/create_final_nodes.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_relationships.parquet b/examples_notebooks/inputs/operation dulce/create_final_relationships.parquet index 320f9b25..37f7b1c0 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_relationships.parquet and b/examples_notebooks/inputs/operation dulce/create_final_relationships.parquet differ diff --git a/examples_notebooks/inputs/operation dulce/create_final_text_units.parquet b/examples_notebooks/inputs/operation dulce/create_final_text_units.parquet index e78cb7f8..a94120c4 100644 Binary files a/examples_notebooks/inputs/operation dulce/create_final_text_units.parquet and b/examples_notebooks/inputs/operation dulce/create_final_text_units.parquet differ diff --git a/examples_notebooks/local_search/index.html b/examples_notebooks/local_search/index.html index 052331b5..1e086e5d 100644 --- a/examples_notebooks/local_search/index.html +++ b/examples_notebooks/local_search/index.html @@ -2373,14 +2373,14 @@ entity_df.head()
@@ -2416,7 +2416,6 @@ entity_df.head() id size graph_embedding -entity_type top_level_node_id x y @@ -2428,14 +2427,13 @@ entity_df.head() 0 ALEX MERCER PERSON -Alex Mercer is a character with a military bac... -00fafabae48948779fee2afe600f5143,1e433d6b30887... -1 -9 +Alex Mercer is a commanding and strategic figu... +06bdff339c02ab35c80fa49320d5da66,1f2c6c263f168... +3 +57 0 b45241d70f0e43fca764df95b2b81f77 -9 -None +57 None b45241d70f0e43fca764df95b2b81f77 0 @@ -2446,14 +2444,13 @@ entity_df.head() 0 TAYLOR CRUZ PERSON -Taylor Cruz is a character who plays a pivotal... -00fafabae48948779fee2afe600f5143,1e433d6b30887... -1 -12 +Taylor Cruz is a central and commanding figure... +06bdff339c02ab35c80fa49320d5da66,1f2c6c263f168... +3 +52 1 4119fd06010c494caa07f439b333f4c5 -12 -None +52 None 4119fd06010c494caa07f439b333f4c5 0 @@ -2464,14 +2461,13 @@ entity_df.head() 0 JORDAN HAYES PERSON -Dr. Jordan Hayes is a key character in a narra... -00fafabae48948779fee2afe600f5143,2cf7a230c367a... -1 -9 +Dr. Jordan Hayes is a central figure at Dulce ... +06bdff339c02ab35c80fa49320d5da66,1f2c6c263f168... +3 +48 2 d3835bf3dda84ead99deadbeac5d0d7d -9 -None +48 None d3835bf3dda84ead99deadbeac5d0d7d 0 @@ -2482,14 +2478,13 @@ entity_df.head() 0 SAM RIVERA PERSON -Sam Rivera is a character renowned for their t... -00fafabae48948779fee2afe600f5143,1e433d6b30887... -1 -15 +Sam Rivera is a key operator and technologist ... +06bdff339c02ab35c80fa49320d5da66,1b603cdb97651... +3 +48 3 077d2820ae1845bcbb1803379a3d1eae -15 -None +48 None 077d2820ae1845bcbb1803379a3d1eae 0 @@ -2500,14 +2495,13 @@ entity_df.head() 0 PARANORMAL MILITARY SQUAD ORGANIZATION -The Paranormal Military Squad is an elite clan... -00fafabae48948779fee2afe600f5143,1e433d6b30887... -1 -14 +The Paranormal Military Squad is a specialized... +06bdff339c02ab35c80fa49320d5da66,2db9206de77cf... +3 +48 4 3671ea0dd4e84c1a9b02c5ab2c8f4bac -14 -None +48 None 3671ea0dd4e84c1a9b02c5ab2c8f4bac 0 @@ -2573,7 +2567,7 @@ relationship_df.head()
@@ -2615,66 +2609,66 @@ relationship_df.head() 0 ALEX MERCER TAYLOR CRUZ -7.0 +21.0 Alex Mercer and Taylor Cruz are integral membe... -[00fafabae48948779fee2afe600f5143, 1e433d6b308... -b35c3d1a7daa4924b6bdb58bc69c354d +[06bdff339c02ab35c80fa49320d5da66, 1f2c6c263f1... +148fffeb994541b2b4b6dcefda7001a8 0 -9 -12 -21 +57 +52 +109 1 ALEX MERCER -TAYLOR CRUZ -7.0 -Alex Mercer and Taylor Cruz are integral membe... -[00fafabae48948779fee2afe600f5143, 1e433d6b308... -b35c3d1a7daa4924b6bdb58bc69c354d -0 -9 -12 -21 +JORDAN HAYES +25.0 +Alex Mercer and Jordan Hayes are integral team... +[06bdff339c02ab35c80fa49320d5da66, 1f2c6c263f1... +89c08e793298442686292454a1abff31 +1 +57 +48 +105 2 ALEX MERCER -TAYLOR CRUZ -7.0 -Alex Mercer and Taylor Cruz are integral membe... -[00fafabae48948779fee2afe600f5143, 1e433d6b308... -b35c3d1a7daa4924b6bdb58bc69c354d -0 -9 -12 -21 +SAM RIVERA +20.0 +Alex Mercer and Sam Rivera are integral member... +[06bdff339c02ab35c80fa49320d5da66, 1f2c6c263f1... +0467928aa65e4a4fba62bdb1467e3a54 +2 +57 +48 +105 3 ALEX MERCER -TAYLOR CRUZ -7.0 -Alex Mercer and Taylor Cruz are integral membe... -[00fafabae48948779fee2afe600f5143, 1e433d6b308... -b35c3d1a7daa4924b6bdb58bc69c354d -0 -9 -12 -21 +OPERATION: DULCE BRIEFING ROOM +1.0 +Alex Mercer was present in the Operation: Dulc... +[06bdff339c02ab35c80fa49320d5da66] +43c3390303c6476cb65f584e37c3e81c +3 +57 +4 +61 4 ALEX MERCER -JORDAN HAYES -6.0 -Alex Mercer and Jordan Hayes are colleagues wh... -[00fafabae48948779fee2afe600f5143, 2cf7a230c36... -a97e2ecd870944cfbe71c79bc0fcc752 -1 -9 -9 -18 +PARANORMAL MILITARY SQUAD +20.0 +Alex Mercer is a prominent and influential lea... +[06bdff339c02ab35c80fa49320d5da66, 2db9206de77... +fa14b16c17e3417dba5a4b473ea5b18d +4 +57 +48 +105 @@ -2731,7 +2725,7 @@ covariates = {"claims": claims}
@@ -2790,7 +2784,7 @@ report_df.head()
@@ -2830,68 +2824,68 @@ report_df.head() 0 -4 -# Dulce Base and the Paranormal Military Squad... +10 +# Paranormal Military Squad at Dulce Base: Dec... 1 8.5 -Dulce Base and the Paranormal Military Squad: ... +Paranormal Military Squad at Dulce Base: Decod... The impact severity rating is high due to the ... -The community is centered around Dulce Base, a... -[{'explanation': 'Dulce Base is the primary lo... -{\n "title": "Dulce Base and the Paranormal... -6f8ba6b6-506e-46c1-83ce-982d59622554 +The Paranormal Military Squad, stationed at Du... +[{'explanation': 'Jordan is a central figure i... +{\n "title": "Paranormal Military Squad at ... +1ba2d200-dd26-4693-affe-a5539d0a0e0d 1 -5 -# Sam Rivera and the Paranormal Military Squad... +11 +# Dulce and Paranormal Military Squad Operatio... 1 -7.5 -Sam Rivera and the Paranormal Military Squad a... +8.5 +Dulce and Paranormal Military Squad Operations The impact severity rating is high due to the ... -The community is centered around Sam Rivera, a... -[{'explanation': 'Sam Rivera is recognized for... -{\n "title": "Sam Rivera and the Paranormal... -418f4536-d673-4212-8a7c-ca1aac547d0f +The community centers around Dulce, a secretiv... +[{'explanation': 'Dulce is described as a top-... +{\n "title": "Dulce and Paranormal Military... +a8a530b0-ae6b-44ea-b11c-9f70d138298d 2 -0 -# Dulce Base and the Paranormal Military Squad... -0 -8.5 -Dulce Base and the Paranormal Military Squad Team -The impact severity rating is high due to the ... -Dulce Base serves as the operational hub for t... -[{'explanation': 'The Paranormal Military Squa... -{\n "title": "Dulce Base and the Paranormal... -251df57e-fd49-49a7-b262-ccaff95d7a51 +12 +# Paranormal Military Squad and Dulce Base Ope... +1 +7.5 +Paranormal Military Squad and Dulce Base Opera... +The impact severity rating is relatively high ... +The community centers around the Paranormal Mi... +[{'explanation': 'Taylor is a central figure w... +{\n "title": "Paranormal Military Squad and... +0478975b-c805-4cc1-b746-82f3e689e2f3 3 +13 +# Mission Dynamics and Leadership: Cruz and Wa... 1 -# Dulce Base and the Paranormal Military Squad... -0 -8.5 -Dulce Base and the Paranormal Military Squad: ... -The impact severity rating is high due to the ... -The community is centered around Dulce Base, a... -[{'explanation': 'Sam Rivera is recognized for... -{\n "title": "Dulce Base and the Paranormal... -6e536385-8056-4a82-8670-c0ccaf007fb4 +7.5 +Mission Dynamics and Leadership: Cruz and Wash... +The impact severity rating is relatively high ... +This report explores the intricate dynamics of... +[{'explanation': 'Cruz is a central figure in ... +{\n "title": "Mission Dynamics and Leadersh... +b56f6e68-3951-4f07-8760-63700944a375 4 -2 -# Dulce Base: Extraterrestrial Research and Co... -0 +14 +# Dulce Base and Paranormal Military Squad: Br... +1 8.5 -Dulce Base: Extraterrestrial Research and Comm... +Dulce Base and Paranormal Military Squad: Brid... The impact severity rating is high due to the ... -Dulce Base is a highly classified facility in ... -[{'explanation': 'Dulce Base is the epicenter ... -{\n "title": "Dulce Base: Extraterrestrial ... -660c8fba-b65f-4fcd-9c98-203600cf1981 +The community centers around the Dulce Base, a... +[{'explanation': 'Sam Rivera, a member of the ... +{\n "title": "Dulce Base and Paranormal Mil... +736e7006-d050-4abb-a122-00febf3f540f @@ -2953,7 +2947,7 @@ text_unit_df.head()
@@ -2990,53 +2984,53 @@ text_unit_df.head() 0 -2cf7a230c367a2dfaf0fc3c903eb8948 +06bdff339c02ab35c80fa49320d5da66 # Operation: Dulce\n\n## Chapter 1\n\nThe thru... -2500 +600 [958fdd043f17ade63cb13570b59df295] [b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[ad5a2020-cdec-4982-acdf-dbe5ee530066, 9d8a0fe... +[148fffeb994541b2b4b6dcefda7001a8, 89c08e79329... +[439081a3-bfeb-4693-968a-0f6189d8fa50, 3399e3d... 1 -6d1255303acb7c9dc951cb0f5fc3042c -be the same.\n\n\*\n\nThe sense of foreboding... -2500 +28dc4aa41a3e99deb7f354682f3e9904 +'s authoritarian performance. _Protocols_, Jor... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[5d1c9126-c48d-4755-9f9c-f739c823f95f, ec64a42... +[4119fd06010c494caa07f439b333f4c5, 077d2820ae1... +[9a6f414210e14841a5b0e661aedc898d, db541b72609... +[b09594cb-d4b7-4de4-a1af-97778300eb1b, f7c5ea4... 2 -e841f178310356740b2ee9101d12c97f -. "Your take on these signal inconsistencies?"... -2500 +813db3138ef511c34be86f841f68aa8f +, rehearsing the speech for their subordinates... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, a97e2ecd870... -[0b22a34b-32e9-46a4-a0e8-d3d5466eba15, 7e14972... +[b45241d70f0e43fca764df95b2b81f77, 077d2820ae1... +[0467928aa65e4a4fba62bdb1467e3a54, 7cc3356d38d... +[7642fe21-7cb9-4428-848b-d2e3f5ab10ca, 6fe3d6c... 3 -f36d96862b9366d7240b5c7ceb04f12b -, absorbed in the bewilderment of contact, whi... -2500 +d0afd106abf3a2966ff88a99eef710db +, weighing his words carefully. "Our tech is t... +600 [958fdd043f17ade63cb13570b59df295] [b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[b35c3d1a7daa4924b6bdb58bc69c354d, 09f18f81442... -[9cd6d645-ab97-4b39-b02e-647cea9b5545, 50dc124... +[148fffeb994541b2b4b6dcefda7001a8, 89c08e79329... +[956e4c22-e343-4b5d-ad3c-d44ca3ce5fb5] 4 -f7d43808d2fb452cd953bf50c6de6bd4 -were at once coherent and enigmatic: "*Voyage... -2500 +f4c7c95d7bf621c6eb73d331cbf0b608 +stepping into their exchange. The authority i... +600 [958fdd043f17ade63cb13570b59df295] -[b45241d70f0e43fca764df95b2b81f77, 4119fd06010... -[e02be3e37ca0454883a4c1fd859c24bb, 1dbc51475cb... -[87cf5900-6211-4e04-9115-50f3617c88b4] +[077d2820ae1845bcbb1803379a3d1eae, 1fd3fa8bb5a... +[478e4c72d8fb46dd8cc9f0691c9878fd, 82b0446e7c9... +[a54eda4d-b5bf-471d-989f-370eb9aff961, 9f85274... @@ -3366,25 +3360,23 @@ print(result.response)
@@ -3430,21 +3422,21 @@ print(result.response)
### Overview of Dr. Jordan Hayes
 
-Dr. Jordan Hayes is a prominent figure within the Paranormal Military Squad, a specialized team based at Dulce Base, dedicated to the exploration and understanding of extraterrestrial intelligence and phenomena. Dr. Hayes plays a crucial role in the squad, focusing on deciphering alien code and interpreting extraterrestrial patterns, which are essential for interspecies communication [Data: Entities (104, 2); Relationships (22, 40, 64)].
+Dr. Jordan Hayes is a prominent scientist at Dulce Base, playing a crucial role in the Paranormal Military Squad. Their work is primarily focused on the analysis and decryption of alien communications, which is vital for interstellar communication and potential interspecies interaction. Dr. Hayes is known for their expertise in deciphering alien codes and understanding extraterrestrial thought patterns, which are essential for leading communications with extraterrestrial entities [Data: Entities (17, 2); Relationships (201, 322, 283)].
 
-### Expertise and Contributions
+### Role and Contributions
 
-Dr. Hayes is known for their analytical and skeptical approach, emphasizing empirical evidence and adaptability in the face of the unknown. This mindset is particularly evident when the team explores underground facilities, where Dr. Hayes remains cautious about non-empirical possibilities while reflecting on potential data discoveries [Data: Entities (2); Claims (12, 13, 26)]. Their expertise in decryption algorithms and signal analysis is vital to the team's mission, as they work on deciphering extraterrestrial signals and engaging in interstellar communication [Data: Entities (2, 180, 166)].
+Dr. Hayes's contributions are significant in the context of Operation: Dulce, where they are deeply involved in scientific exploration and the decryption of alien communications. Their work involves decrypting algorithms, interpreting cosmic signals, and analyzing the implications of alien society. This includes isolating and understanding complex alien signals that resemble human cognition, suggesting a tandem evolution with humanity [Data: Entities (2); Claims (60, 83, 91, 134)].
 
-### Collaborative Efforts
+### Collaboration and Leadership
 
-Dr. Hayes collaborates closely with other team members, including Alex Mercer, with whom they share a mutual respect and understanding of each other's strengths and the mission's significance. This partnership is central to their efforts in decrypting and communicating with extraterrestrial intelligence [Data: Relationships (1, 4, 67); Claims (18, 42)]. Additionally, Dr. Hayes works alongside colleagues like Sam Rivera and Taylor Cruz, contributing to the team's objectives at Dulce Base through their combined skills and knowledge [Data: Relationships (21, 9, 15)].
+Dr. Hayes collaborates closely with other key members of the Paranormal Military Squad, such as Alex Mercer and Taylor Cruz. Despite some tension with Cruz due to differing leadership styles, Dr. Hayes's analytical skills and adaptability are highly valued by their colleagues. They are involved in setting up lab stations, operating the mainframe, and playing a crucial role in the command center at Dulce Base. Their leadership style emphasizes adaptability and skepticism, which are crucial given the uncertainties and unknown challenges of their mission [Data: Entities (2); Relationships (26, 82, 175, 270)].
 
-### Mission and Impact
+### Scientific Breakthroughs and Challenges
 
-The mission at Dulce Base involves uncovering the mysteries of extraterrestrial intelligence, with Dr. Hayes leading efforts in isolating signal harmonics, decrypting alien messages, and interpreting signals related to star alignments. Their work is pivotal in the team's focus on analyzing and interpreting alien signals, which is a cornerstone of their operation [Data: Entities (2, 140, 192); Claims (36, 39, 54)]. Dr. Hayes's role is not only about scientific discovery but also about ensuring that humanity approaches potential interspecies communication with understanding and diplomacy [Data: Claims (54, 61, 68)].
+Dr. Hayes is on the verge of significant scientific breakthroughs, as they lead efforts in isolating and understanding alien signals. Their work suggests that these signals are artificial and patterned, indicating a tandem evolution with humanity. This involves crafting humanity's responses to cosmic alignments with stars and responsive galactic signals, navigating the dark corridors of Dulce with a focus on the unknown variables and challenges beyond established protocols [Data: Entities (2); Claims (60, 83, 91, 134)].
 
-In summary, Dr. Jordan Hayes is a central figure in the Paranormal Military Squad, bringing a critical and methodical approach to the team's extraordinary endeavors in understanding and interacting with alien entities. Their work at Dulce Base is instrumental in bridging the gap between human and extraterrestrial communication, highlighting the importance of their role in this unique and challenging field.
+In summary, Dr. Jordan Hayes is a central figure in the efforts to understand and communicate with extraterrestrial entities, contributing significantly to the scientific and strategic objectives of the Paranormal Military Squad at Dulce Base. Their work is characterized by a blend of scientific rigor, adaptability, and a commitment to discovery, making them a vital asset to their team and mission.
 
@@ -3523,42 +3515,42 @@ In summary, Dr. Jordan Hayes is a central figure in the Paranormal Military Squa 0 -104 +17 DR. JORDAN HAYES -Dr. Jordan Hayes is a member of the Paranormal... -7 +Dr. Jordan Hayes is a key scientist at Dulce B... +18 True 1 -153 -EXPERTISE -The specialized knowledge or skill that team m... -0 +7 +JORDAN +Jordan Hayes is a key member of the Paranormal... +22 True 2 2 JORDAN HAYES -Dr. Jordan Hayes is a key character in a narra... -9 +Dr. Jordan Hayes is a central figure at Dulce ... +48 True 3 -148 -DATA ANALYSIS -The process of examining and interpreting info... -0 +47 +DR. HAYES +Dr. Hayes is a scientist working on understand... +1 True 4 -140 -STAR ALIGNMENTS -Celestial configurations that Dr. Jordan Hayes... -0 +10 +AGENT HAYES +Agent Hayes is known for emphasizing empowerme... +4 True @@ -3633,56 +3625,56 @@ In summary, Dr. Jordan Hayes is a central figure in the Paranormal Military Squa 0 -21 -JORDAN HAYES -SAM RIVERA -Jordan Hayes and Sam Rivera are colleagues at ... -5.0 -24 -2 +260 +JORDAN +DR. JORDAN HAYES +Dr. Jordan Hayes and Jordan refer to the same ... +1.0 +40 +1 True 1 -22 -JORDAN HAYES -PARANORMAL MILITARY SQUAD -Jordan Hayes is a member of the Paranormal Mil... -5.0 -23 +50 +ALEX MERCER +JORDAN +Alex Mercer values Jordan's analytical approac... +1.0 +79 2 True 2 -34 -SAM RIVERA +26 +ALEX MERCER DR. JORDAN HAYES -Dr. Jordan Hayes and Sam Rivera are colleagues... -1.0 -22 +Alex Mercer and Dr. Jordan Hayes are collabora... +5.0 +75 2 True 3 -9 +77 TAYLOR CRUZ -JORDAN HAYES -Taylor Cruz and Jordan Hayes are both integral... -6.0 -21 +JORDAN +Jordan and Taylor Cruz are team members workin... +4.0 +74 2 True 4 -40 -PARANORMAL MILITARY SQUAD +82 +TAYLOR CRUZ DR. JORDAN HAYES -Dr. Jordan Hayes is a key member of the Parano... -2.0 -21 +Dr. Jordan Hayes and Taylor Cruz are colleague... +4.0 +70 2 True @@ -3797,18 +3789,28 @@ Cell In[17], line 1 0 -5 -the universe.\n\nIn a symphony of clicks and ... +40 +and the distant hum of machinery hinted at Du... 1 -11 -, the sentinel within them ever alert.\n\nAlex... +18 +the universe.\n\nIn a symphony of clicks and ... 2 -3 -, absorbed in the bewilderment of contact, whi... +37 +from across the console, their eyes not leavi... + + +3 +19 +extraterrestrial sentience that had outreache... + + +4 +44 +It's a... symphony. It's as if they're teachi... @@ -3853,19 +3855,19 @@ Cell In[17], line 1
@@ -3979,9 +3981,34 @@ print(candidate_questions.response)
diff --git a/search/search_index.json b/search/search_index.json index 2ab5bcbc..1121b4f3 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config": {"lang": ["en"], "separator": "[\\s\\-]+", "pipeline": ["stopWordFilter"]}, "docs": [{"location": "", "title": "Welcome to GraphRAG", "text": "

\ud83d\udc49 Microsoft Research Blog Post \ud83d\udc49 GraphRAG Accelerator \ud83d\udc49 GraphRAG Arxiv

Figure 1: An LLM-generated knowledge graph built using GPT-4 Turbo.

GraphRAG is a structured, hierarchical approach to Retrieval Augmented Generation (RAG), as opposed to naive semantic-search approaches using plain text snippets. The GraphRAG process involves extracting a knowledge graph out of raw text, building a community hierarchy, generating summaries for these communities, and then leveraging these structures when perform RAG-based tasks.

To learn more about GraphRAG and how it can be used to enhance your LLMs ability to reason about your private data, please visit the Microsoft Research Blog Post.

"}, {"location": "#solution-accelerator", "title": "Solution Accelerator \ud83d\ude80", "text": "

To quickstart the GraphRAG system we recommend trying the Solution Accelerator package. This provides a user-friendly end-to-end experience with Azure resources.

"}, {"location": "#get-started-with-graphrag", "title": "Get Started with GraphRAG \ud83d\ude80", "text": "

To start using GraphRAG, check out the Get Started guide. For a deeper dive into the main sub-systems, please visit the docpages for the Indexer and Query packages.

"}, {"location": "#graphrag-vs-baseline-rag", "title": "GraphRAG vs Baseline RAG \ud83d\udd0d", "text": "

Retrieval-Augmented Generation (RAG) is a technique to improve LLM outputs using real-world information. This technique is an important part of most LLM-based tools and the majority of RAG approaches use vector similarity as the search technique, which we call Baseline RAG. GraphRAG uses knowledge graphs to provide substantial improvements in question-and-answer performance when reasoning about complex information. RAG techniques have shown promise in helping LLMs to reason about private datasets - data that the LLM is not trained on and has never seen before, such as an enterprise\u2019s proprietary research, business documents, or communications. Baseline RAG was created to help solve this problem, but we observe situations where baseline RAG performs very poorly. For example:

To address this, the tech community is working to develop methods that extend and enhance RAG. Microsoft Research\u2019s new approach, GraphRAG, uses LLMs to create a knowledge graph based on an input corpus. This graph, along with community summaries and graph machine learning outputs, are used to augment prompts at query time. GraphRAG shows substantial improvement in answering the two classes of questions described above, demonstrating intelligence or mastery that outperforms other approaches previously applied to private datasets.

"}, {"location": "#the-graphrag-process", "title": "The GraphRAG Process \ud83e\udd16", "text": "

GraphRAG builds upon our prior research and tooling using graph machine learning. The basic steps of the GraphRAG process are as follows:

"}, {"location": "#index", "title": "Index", "text": ""}, {"location": "#query", "title": "Query", "text": "

At query time, these structures are used to provide materials for the LLM context window when answering a question. The primary query modes are:

"}, {"location": "#prompt-tuning", "title": "Prompt Tuning", "text": "

Using GraphRAG with your data out of the box may not yield the best possible results. We strongly recommend to fine-tune your prompts following the Prompt Tuning Guide in our documentation.

"}, {"location": "blog_posts/", "title": "Microsoft Research Blog", "text": "