Deploying to gh-pages from @ microsoft/graphrag@0b2120ca45 🚀

This commit is contained in:
natoverse 2024-11-27 18:00:05 +00:00
parent 378cc7ae67
commit b32f885be7
8 changed files with 2745 additions and 2849 deletions

View File

@ -1409,6 +1409,12 @@
<p><h6>Published November 15, 2024</p>
<p>By Bryan Li, Research Intern; <a href="https://www.microsoft.com/en-us/research/people/trinhha/">Ha Trinh</a>, Senior Data Scientist; <a href="https://www.microsoft.com/en-us/research/people/daedge/">Darren Edge</a>, Senior Director; <a href="https://www.microsoft.com/en-us/research/people/jolarso/">Jonathan Larson</a>, Senior Principal Data Architect</h6></p>
</li>
<li>
<p><a href="https://www.microsoft.com/en-us/research/blog/lazygraphrag-setting-a-new-standard-for-quality-and-cost/"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.22 19.03a.75.75 0 0 1 0-1.06L18.19 13H3.75a.75.75 0 0 1 0-1.5h14.44l-4.97-4.97a.749.749 0 0 1 .326-1.275.75.75 0 0 1 .734.215l6.25 6.25a.75.75 0 0 1 0 1.06l-6.25 6.25a.75.75 0 0 1-1.06 0"/></svg></span> <strong>LazyGraphRAG: Setting a new standard for quality and cost</strong></a></p>
<hr />
<p><h6>Published November 25, 2024</p>
<p>By <a href="https://www.microsoft.com/en-us/research/people/daedge/">Darren Edge</a>, Senior Director; <a href="https://www.microsoft.com/en-us/research/people/trinhha/">Ha Trinh</a>, Senior Data Scientist; <a href="https://www.microsoft.com/en-us/research/people/jolarso/">Jonathan Larson</a>, Senior Principal Data Architect</h6></p>
</li>
</ul>
</div>

File diff suppressed because one or more lines are too long

View File

@ -2132,9 +2132,9 @@ token_encoder = tiktoken.encoding_for_model(llm_model)</div>
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<h3 id="load-community-reports-as-context-for-global-search">Load community reports as context for global search<a class="anchor-link" href="#load-community-reports-as-context-for-global-search"></a></h3><ul>
<li>Load all community reports in the <code>create_final_community_reports</code> table from the ire-indexing engine, to be used as context data for global search.</li>
<li>Load entities from the <code>create_final_nodes</code> and <code>create_final_entities</code> tables from the ire-indexing engine, to be used for calculating community weights for context ranking. Note that this is optional (if no entities are provided, we will not calculate community weights and only use the rank attribute in the community reports table for context ranking)</li>
<li>Load all communities in the <code>create_final_communites</code> table from the ire-indexing engine, to be used to reconstruct the community graph hierarchy for dynamic community selection.</li>
<li>Load all community reports in the <code>create_final_community_reports</code> table from the GraphRAG, to be used as context data for global search.</li>
<li>Load entities from the <code>create_final_nodes</code> and <code>create_final_entities</code> tables from the GraphRAG, to be used for calculating community weights for context ranking. Note that this is optional (if no entities are provided, we will not calculate community weights and only use the rank attribute in the community reports table for context ranking)</li>
<li>Load all communities in the <code>create_final_communites</code> table from the GraphRAG, to be used to reconstruct the community graph hierarchy for dynamic community selection.</li>
</ul>
</div>
</div>
@ -2581,19 +2581,19 @@ print(result.response)</div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>### Overview of Cosmic Vocalization
Cosmic Vocalization is a phenomenon that has garnered significant attention from various individuals and groups. It is perceived as a cosmic event with potential implications for security and interstellar communication. The phenomenon is described as part of an "interstellar duet," suggesting that it may involve a form of communication or interaction with cosmic entities or events [Data: Reports (6)].
Cosmic Vocalization is a phenomenon that has garnered significant attention from various individuals and groups. It is perceived as a focal point of interest within the community, suggesting its importance and the intrigue it holds for those studying or affected by it [Data: Reports (6)].
### Key Stakeholders
### Key Involvements
1. **Paranormal Military Squad**: This group is actively engaged with Cosmic Vocalization, indicating that it is considered a matter of strategic importance. Their involvement suggests that the phenomenon is being monitored and possibly addressed as part of broader security measures [Data: Reports (6)].
1. **Paranormal Military Squad**: This group is actively engaged with Cosmic Vocalization, indicating that it is part of their strategic response to cosmic phenomena. Their involvement highlights the significance of Cosmic Vocalization in security measures, suggesting that it may have implications for national or global safety [Data: Reports (6)].
2. **Alex Mercer**: Alex Mercer views Cosmic Vocalization as part of an interstellar duet, which implies a responsive or interactive approach to these cosmic events. This perspective highlights the potential for Cosmic Vocalization to be more than just a passive occurrence, but rather an active element in cosmic interactions [Data: Reports (6)].
2. **Alex Mercer**: Alex Mercer views Cosmic Vocalization as part of an interstellar duet. This perspective suggests a responsive approach to cosmic events, indicating that there may be an interactive or communicative aspect to the phenomenon [Data: Reports (6)].
3. **Taylor Cruz**: Taylor Cruz has expressed concerns about Cosmic Vocalization, fearing it might be a "homing tune." This adds a layer of urgency and potential threat, suggesting that the phenomenon could have implications for attracting or signaling to unknown entities [Data: Reports (6)].
3. **Taylor Cruz**: Taylor Cruz has raised concerns about Cosmic Vocalization, fearing it might be a homing tune. This adds a layer of urgency and potential threat, as it implies that the phenomenon could be attracting or guiding something or someone [Data: Reports (6)].
### Implications
The involvement of these stakeholders underscores the complexity and potential significance of Cosmic Vocalization. The strategic engagement by the Paranormal Military Squad, coupled with the concerns raised by individuals like Taylor Cruz, suggests that this phenomenon may have far-reaching implications that warrant careful monitoring and analysis.
The involvement of these diverse groups and individuals suggests that Cosmic Vocalization is not only a subject of scientific or academic interest but also a matter of strategic and security concern. The varying perspectives—from seeing it as a duet to fearing it as a homing signal—highlight the complexity and potential risks associated with this phenomenon. Further investigation and monitoring may be necessary to fully understand its implications and to develop appropriate responses.
</pre>
</div>
</div>
@ -2844,7 +2844,7 @@ print(
<div class="jp-OutputArea-child">
<div class="jp-OutputPrompt jp-OutputArea-prompt"></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>LLM calls: 2. Prompt tokens: 11238. Output tokens: 507.
<pre>LLM calls: 2. Prompt tokens: 11238. Output tokens: 511.
</pre>
</div>
</div>

View File

@ -2541,23 +2541,19 @@ print(result.response)</div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>### Overview of Cosmic Vocalization
Cosmic Vocalization is a phenomenon that has captured the attention of various individuals and groups within the community. It is perceived as a significant cosmic event, with different interpretations and implications for those involved.
Cosmic Vocalization is a phenomenon that has captured the attention of various individuals and groups within the community. It is perceived as a significant event with potential implications for both cosmic and terrestrial activities. The concept of Cosmic Vocalization is central to the community's focus, suggesting its importance in ongoing discussions and strategic considerations.
### Key Perspectives and Concerns
### Perspectives and Concerns
Alex Mercer views Cosmic Vocalization as part of an interstellar duet, suggesting that it may be a responsive or interactive event within the cosmos. This perspective highlights the potential for Cosmic Vocalization to be part of a larger cosmic dialogue or interaction [Data: Reports (6)].
Alex Mercer views Cosmic Vocalization as part of an interstellar duet, indicating a belief that it may be a responsive or interactive event with cosmic origins [Data: Reports (6)]. This perspective suggests that Cosmic Vocalization could be part of a larger cosmic communication or interaction, which may have implications for how it is studied and understood.
On the other hand, Taylor Cruz raises concerns about the implications of Cosmic Vocalization, fearing that it might serve as a homing tune. This interpretation adds a layer of urgency and potential threat, suggesting that the phenomenon could have unintended or dangerous consequences [Data: Reports (6)].
On the other hand, Taylor Cruz raises concerns about the potential implications of Cosmic Vocalization, fearing it might be a homing tune. This perspective adds a layer of urgency and potential threat, as it suggests that the phenomenon could be attracting attention or entities from beyond our immediate environment [Data: Reports (6)].
### Involvement of the Paranormal Military Squad
### Strategic and Security Implications
The Paranormal Military Squad is actively engaged with Cosmic Vocalization, indicating its strategic importance in their mission. Their involvement underscores the significance of Cosmic Vocalization in security measures and suggests that it is being taken seriously by entities responsible for safeguarding against cosmic threats [Data: Reports (6)].
The involvement of the Paranormal Military Squad highlights the strategic importance of Cosmic Vocalization. Their engagement indicates that the phenomenon is not only of scientific interest but also of security concern. The squad's involvement suggests that there are measures being taken to understand and possibly mitigate any risks associated with Cosmic Vocalization [Data: Reports (6)].
### Metaphorical Interpretation
The Universe is metaphorically treated as a concert hall by the Paranormal Military Squad, which reflects a broader perspective on how cosmic events like Cosmic Vocalization are interpreted and responded to by human entities. This metaphor suggests a harmonious or orchestrated view of cosmic phenomena, where each event plays a part in a larger cosmic symphony [Data: Reports (6)].
In summary, Cosmic Vocalization is a multifaceted phenomenon with various interpretations and implications. It involves key figures like Alex Mercer and Taylor Cruz, as well as strategic entities like the Paranormal Military Squad, each contributing to the understanding and response to this cosmic event.
In summary, Cosmic Vocalization is a multifaceted phenomenon that involves various stakeholders, each with their own perspectives and concerns. The community's focus on this event underscores its significance, while the involvement of security forces highlights the potential implications for safety and strategic planning.
</pre>
</div>
</div>
@ -2635,22 +2631,14 @@ result.context_data["reports"]</div>
</tr>
<tr>
<th>1</th>
<td>12</td>
<td>Paranormal Military Squad and Dulce Base Opera...</td>
<td>1</td>
<td>Earth's Interstellar Communication Initiative</td>
<td>0.16</td>
<td># Paranormal Military Squad and Dulce Base Ope...</td>
<td>7.5</td>
</tr>
<tr>
<th>2</th>
<td>14</td>
<td>Dulce Base and Paranormal Military Squad: Brid...</td>
<td>0.12</td>
<td># Dulce Base and Paranormal Military Squad: Br...</td>
<td># Earth's Interstellar Communication Initiativ...</td>
<td>8.5</td>
</tr>
<tr>
<th>3</th>
<th>2</th>
<td>16</td>
<td>Dulce Military Base and Alien Intelligence Com...</td>
<td>0.08</td>
@ -2658,11 +2646,19 @@ result.context_data["reports"]</div>
<td>8.5</td>
</tr>
<tr>
<th>3</th>
<td>4</td>
<td>Dulce Facility and Control Room of Dulce: Extr...</td>
<td>0.02</td>
<td># Dulce Facility and Control Room of Dulce: Ex...</td>
<td>8.5</td>
</tr>
<tr>
<th>4</th>
<td>18</td>
<td>Paranormal Military Squad Team and Dulce Base'...</td>
<td>0.04</td>
<td># Paranormal Military Squad Team and Dulce Bas...</td>
<td>19</td>
<td>Central Terminal and Viewing Monitors at Dulce...</td>
<td>0.02</td>
<td># Central Terminal and Viewing Monitors at Dul...</td>
<td>8.5</td>
</tr>
<tr>
@ -2675,22 +2671,6 @@ result.context_data["reports"]</div>
</tr>
<tr>
<th>6</th>
<td>19</td>
<td>Central Terminal and Viewing Monitors at Dulce...</td>
<td>0.02</td>
<td># Central Terminal and Viewing Monitors at Dul...</td>
<td>8.5</td>
</tr>
<tr>
<th>7</th>
<td>4</td>
<td>Dulce Facility and Control Room of Dulce: Extr...</td>
<td>0.02</td>
<td># Dulce Facility and Control Room of Dulce: Ex...</td>
<td>8.5</td>
</tr>
<tr>
<th>8</th>
<td>6</td>
<td>Cosmic Vocalization and Universe Interactions</td>
<td>0.02</td>
@ -2773,9 +2753,9 @@ print(
<div class="jp-OutputPrompt jp-OutputArea-prompt"></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>Build context (gpt-4o-mini)
LLM calls: 17. Prompt tokens: 12151. Output tokens: 1529.
LLM calls: 12. Prompt tokens: 8565. Output tokens: 1145.
Map-reduce (gpt-4o)
LLM calls: 2. Prompt tokens: 6922. Output tokens: 602.
LLM calls: 2. Prompt tokens: 5864. Output tokens: 509.
</pre>
</div>
</div>

View File

@ -3351,21 +3351,21 @@ print(result.response)</div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>### Overview of Agent Mercer
Agent Alex Mercer is a prominent figure within the Paranormal Military Squad, playing a crucial role in Operation: Dulce at the Dulce Base. He is recognized for his strategic and commanding presence, particularly in overseeing operations related to communication with extraterrestrial intelligence. His responsibilities include initiating broadcasts to communicate with extraterrestrial beings, decoding alien messages, and leading the team in understanding and responding to these communications [Data: Entities (0)].
Agent Alex Mercer is a prominent figure within the Paranormal Military Squad, playing a crucial role in Operation: Dulce at the Dulce Base. He is recognized for his commanding and strategic presence, particularly in overseeing operations related to communication with extraterrestrial intelligence. His responsibilities include initiating broadcasts to communicate with extraterrestrial beings, decoding alien messages, and leading the team in understanding and responding to these communications [Data: Entities (0)].
### Role and Responsibilities
Mercer is deeply involved in the philosophical and strategic aspects of interstellar communication, viewing these interactions as a form of cosmic dialogue. His leadership style is characterized by a blend of determination, compliance with mission protocols, and a protective approach towards his team. He emphasizes the importance of intuition and trust beyond protocol, particularly in his mentorship of team members like Sam Rivera [Data: Entities (0); Relationships (167)].
Alex Mercer is deeply involved in the philosophical and strategic aspects of interstellar communication, viewing these interactions as a form of cosmic dialogue. His leadership style is characterized by a blend of determination, compliance with mission protocols, and a protective approach towards his team. He collaborates with team members like Jordan Hayes, exploring secured areas and engaging in high-stakes, secretive operations. Mercer emphasizes the importance of intuition and trust beyond protocol, particularly in his mentorship of Sam Rivera [Data: Entities (0)].
### Involvement in Operation: Dulce
### Relationships and Influence
During Operation: Dulce, Mercer collaborates with team members such as Jordan Hayes, exploring secured areas and engaging in high-stakes, secretive operations. His role extends to analyzing cosmic signals, strategizing contact efforts, and maintaining clarity in human-alien communication. These experiences have led to profound changes in his perspective, reinforcing his role as a key decision-maker and guardian in missions that transcend traditional boundaries [Data: Entities (0); Relationships (336, 245)].
Mercer is known for his intellectual curiosity and is depicted as a thoughtful mentor. His experiences during encounters with alien signals have led to profound changes, reinforcing his role as a key decision-maker and guardian in missions that transcend traditional boundaries. He shares a deep commitment to discovery with colleagues like Dr. Jordan Hayes, working together on alien technology during Operation: Dulce [Data: Entities (0); Relationships (336)].
### Leadership and Influence
### Philosophical and Strategic Approach
Mercer is also recognized as a mentor to the team, providing belief and guidance, which highlights his influential role in both leadership and operational contexts. His intellectual curiosity and deep involvement in the mission's philosophical aspects make him a thoughtful leader, particularly in high-stakes situations such as the first contact with alien communications [Data: Entities (30, 0); Relationships (167)].
Agent Mercer harbors a subtle form of determination that resists easy submission to authority, as observed during the briefing for Operation: Dulce. He is involved in analyzing cosmic signals, strategizing contact efforts, and maintaining clarity in human-alien communication. His approach to leadership and strategy is marked by a balance between adhering to mission protocols and fostering an environment of trust and intuition among his team members [Data: Claims (1); Entities (0)].
In summary, Agent Alex Mercer is a pivotal figure in the Paranormal Military Squad, known for his strategic leadership and deep involvement in extraterrestrial communication efforts. His role in Operation: Dulce and his mentorship of team members underscore his significant influence and commitment to the mission's success.
In summary, Agent Alex Mercer is a pivotal figure in the Paranormal Military Squad, known for his strategic leadership, mentorship, and deep involvement in interstellar communication efforts. His role at Dulce Base highlights his commitment to understanding and engaging with extraterrestrial intelligence, making him a key player in the unfolding events of Operation: Dulce.
</pre>
</div>
</div>
@ -3411,23 +3411,21 @@ print(result.response)</div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>### Overview of Dr. Jordan Hayes
Dr. Jordan Hayes is a prominent scientist at Dulce Base, playing a crucial role in the Paranormal Military Squad's efforts to understand and communicate with extraterrestrial entities. Dr. Hayes's work is primarily focused on decoding and analyzing alien signals and codes, which are essential for interstellar communication and potentially interspecies interaction. This involves decrypting algorithms, interpreting cosmic signals, and analyzing the implications of alien society [Data: Entities (2, 17); Relationships (201, 322, 283)].
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)].
### Key Contributions and Expertise
### Role and Contributions
Dr. Hayes is noted for their adaptability and skepticism, qualities that are essential given the uncertainties and unknown challenges of their mission. They are deeply involved in the scientific exploration aspects of Operation: Dulce, where they focus on critical decryption tasks. Their expertise plays a vital role in understanding and interpreting alien messages, aiding the squad in their paranormal operations [Data: Entities (2); Relationships (201, 246)].
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 signals. 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, 91, 134)].
Dr. Hayes's efforts are on the verge of a significant scientific breakthrough, as they lead efforts in isolating and understanding complex alien signals that resemble human cognition. Their work suggests that these signals are artificial and patterned, indicating a tandem evolution with humanity. As a key figure in both the briefing room and the control room beneath New Mexico, Dr. Hayes crafts humanity's responses to cosmic alignments with stars and responsive galactic signals [Data: Entities (2); Claims (60, 91, 134)].
### Collaboration and Leadership
### Collaborative Efforts and Leadership
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); Claims (2, 13)].
Dr. Hayes works closely with colleagues like Alex Mercer and Taylor Cruz, engaging in thoughtful dialogue and showing analytical thinking about the mission's uncertainties. Despite some tension with Taylor Cruz due to differing leadership styles, Dr. Hayes continues to collaborate effectively with the team, contributing to the strategic discussions and decisions made in the briefing room [Data: Entities (2); Relationships (26, 82, 338)].
### Scientific Breakthroughs
In addition to their scientific endeavors, Dr. Hayes is involved in setting up lab stations, operating the mainframe, and playing a crucial role in the command center at Dulce Base. Their attention to detail is evident in their discovery of significant panels among secured doorways and their contemplation of the mission's broader ramifications [Data: Entities (2); Claims (2, 13)].
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 potential technological breakthrough. Dr. Hayes's efforts are crucial in crafting humanity's responses to cosmic alignments 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 (83, 91, 134)].
### Conclusion
Dr. Jordan Hayes is a central figure in the efforts to decode and understand extraterrestrial communications at Dulce Base. Their work is characterized by a blend of scientific rigor, adaptability, and a commitment to discovery, making them an invaluable asset to the Paranormal Military Squad's mission. Through their leadership and collaboration, Dr. Hayes is helping to navigate the unknown variables and challenges beyond established protocols, potentially leading to groundbreaking discoveries in the field of extraterrestrial communication [Data: Entities (2); Relationships (201, 322, 283)].
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 not only advances the understanding of alien communications but also holds the potential to redefine humanity's place in the cosmos.
</pre>
</div>
</div>
@ -3671,8 +3669,8 @@ Dr. Jordan Hayes is a central figure in the efforts to decode and understand ext
</div>
</div>
</div>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell">
<div class="jp-Cell jp-CodeCell jp-Notebook-cell">
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
<div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs">
<div class="jp-Cell-inputWrapper" tabindex="0">
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
@ -3690,27 +3688,11 @@ Dr. Jordan Hayes is a central figure in the efforts to decode and understand ext
</div>
</clipboard-copy>
</div>
<div class="highlight-ipynb hl-python"><pre><span></span><span class="n">result</span><span class="o">.</span><span class="n">context_data</span><span class="p">[</span><span class="s2">"reports"</span><span class="p">]</span><span class="o">.</span><span class="n">head</span><span class="p">()</span>
<div class="highlight-ipynb hl-python"><pre><span></span><span class="k">if</span> <span class="s2">"reports"</span> <span class="ow">in</span> <span class="n">result</span><span class="o">.</span><span class="n">context_data</span><span class="p">:</span>
<span class="n">result</span><span class="o">.</span><span class="n">context_data</span><span class="p">[</span><span class="s2">"reports"</span><span class="p">]</span><span class="o">.</span><span class="n">head</span><span class="p">()</span>
</pre></div>
<div class="clipboard-copy-txt" id="cell-17">result.context_data["reports"].head()</div>
</div>
</div>
</div>
</div>
<div class="jp-Cell-outputWrapper">
<div class="jp-Collapser jp-OutputCollapser jp-Cell-outputCollapser">
</div>
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div class="jp-OutputPrompt jp-OutputArea-prompt"></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr" tabindex="0">
<pre>
<span class="ansi-red-fg">---------------------------------------------------------------------------</span>
<span class="ansi-red-fg">KeyError</span> Traceback (most recent call last)
Cell <span class="ansi-green-fg">In[17], line 1</span>
<span class="ansi-green-fg">----&gt; 1</span> <span class="ansi-yellow-bg">result</span><span class="ansi-yellow-bg" style="color: rgb(98,98,98)">.</span><span class="ansi-yellow-bg">context_data</span><span class="ansi-yellow-bg">[</span><span class="ansi-yellow-bg" style="color: rgb(175,0,0)">"</span><span class="ansi-yellow-bg" style="color: rgb(175,0,0)">reports</span><span class="ansi-yellow-bg" style="color: rgb(175,0,0)">"</span><span class="ansi-yellow-bg">]</span><span style="color: rgb(98,98,98)">.</span>head()
<span class="ansi-red-fg">KeyError</span>: 'reports'</pre>
<div class="clipboard-copy-txt" id="cell-17">if "reports" in result.context_data:
result.context_data["reports"].head()</div>
</div>
</div>
</div>
@ -3966,34 +3948,9 @@ print(candidate_questions.response)</div>
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div class="jp-OutputPrompt jp-OutputArea-prompt"></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="application/vnd.jupyter.stderr" tabindex="0">
<pre>
<span class="ansi-red-fg">---------------------------------------------------------------------------</span>
<span class="ansi-red-fg">TypeError</span> Traceback (most recent call last)
Cell <span class="ansi-green-fg">In[21], line 5</span>
<span class="ansi-green-intense-fg ansi-bold"> 1</span> question_history <span style="color: rgb(98,98,98)">=</span> [
<span class="ansi-green-intense-fg ansi-bold"> 2</span> <span style="color: rgb(175,0,0)">"</span><span style="color: rgb(175,0,0)">Tell me about Agent Mercer</span><span style="color: rgb(175,0,0)">"</span>,
<span class="ansi-green-intense-fg ansi-bold"> 3</span> <span style="color: rgb(175,0,0)">"</span><span style="color: rgb(175,0,0)">What happens in Dulce military base?</span><span style="color: rgb(175,0,0)">"</span>,
<span class="ansi-green-intense-fg ansi-bold"> 4</span> ]
<span class="ansi-green-fg">----&gt; 5</span> candidate_questions <span style="color: rgb(98,98,98)">=</span> <span class="ansi-bold" style="color: rgb(0,135,0)">await</span> question_generator<span style="color: rgb(98,98,98)">.</span>agenerate(
<span class="ansi-green-intense-fg ansi-bold"> 6</span> question_history<span style="color: rgb(98,98,98)">=</span>question_history, context_data<span style="color: rgb(98,98,98)">=</span><span class="ansi-bold" style="color: rgb(0,135,0)">None</span>, question_count<span style="color: rgb(98,98,98)">=</span><span style="color: rgb(98,98,98)">5</span>
<span class="ansi-green-intense-fg ansi-bold"> 7</span> )
<span class="ansi-green-intense-fg ansi-bold"> 8</span> <span style="color: rgb(0,135,0)">print</span>(candidate_questions<span style="color: rgb(98,98,98)">.</span>response)
File <span class="ansi-green-fg">~/work/graphrag/graphrag/graphrag/query/question_gen/local_gen.py:74</span>, in <span class="ansi-cyan-fg">LocalQuestionGen.agenerate</span><span class="ansi-blue-fg">(self, question_history, context_data, question_count, **kwargs)</span>
<span class="ansi-green-intense-fg ansi-bold"> 70</span> conversation_history <span style="color: rgb(98,98,98)">=</span> ConversationHistory<span style="color: rgb(98,98,98)">.</span>from_list(history)
<span class="ansi-green-intense-fg ansi-bold"> 72</span> <span class="ansi-bold" style="color: rgb(0,135,0)">if</span> context_data <span class="ansi-bold" style="color: rgb(175,0,255)">is</span> <span class="ansi-bold" style="color: rgb(0,135,0)">None</span>:
<span class="ansi-green-intense-fg ansi-bold"> 73</span> <span style="color: rgb(95,135,135)"># generate context data based on the question history</span>
<span class="ansi-green-fg">---&gt; 74</span> context_data, context_records <span style="color: rgb(98,98,98)">=</span> <span style="color: rgb(0,135,0)">self</span><span style="color: rgb(98,98,98)">.</span>context_builder<span style="color: rgb(98,98,98)">.</span>build_context(
<span class="ansi-green-intense-fg ansi-bold"> 75</span> query<span style="color: rgb(98,98,98)">=</span>question_text,
<span class="ansi-green-intense-fg ansi-bold"> 76</span> conversation_history<span style="color: rgb(98,98,98)">=</span>conversation_history,
<span class="ansi-green-intense-fg ansi-bold"> 77</span> <span style="color: rgb(98,98,98)">*</span><span style="color: rgb(98,98,98)">*</span>kwargs,
<span class="ansi-green-intense-fg ansi-bold"> 78</span> <span style="color: rgb(98,98,98)">*</span><span style="color: rgb(98,98,98)">*</span><span style="color: rgb(0,135,0)">self</span><span style="color: rgb(98,98,98)">.</span>context_builder_params,
<span class="ansi-green-intense-fg ansi-bold"> 79</span> ) <span style="color: rgb(95,135,135)"># type: ignore</span>
<span class="ansi-green-intense-fg ansi-bold"> 80</span> <span class="ansi-bold" style="color: rgb(0,135,0)">else</span>:
<span class="ansi-green-intense-fg ansi-bold"> 81</span> context_records <span style="color: rgb(98,98,98)">=</span> {<span style="color: rgb(175,0,0)">"</span><span style="color: rgb(175,0,0)">context_data</span><span style="color: rgb(175,0,0)">"</span>: context_data}
<span class="ansi-red-fg">TypeError</span>: cannot unpack non-iterable ContextBuilderResult object</pre>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain" tabindex="0">
<pre>['- What is the role of the Paranormal Military Squad at Dulce Base?', '- How does Agent Alex Mercer contribute to the operations at Dulce Base?', '- What are the main objectives of Operation: Dulce at the Dulce Military Base?', '- How does the environment of Dulce Base affect the agents working there?', '- What are the challenges faced by the team at Dulce Base during their mission?']
</pre>
</div>
</div>
</div>

View File

@ -1467,11 +1467,6 @@
👉 <a href="../developing/">Use it from source</a><br/></p>
<h2 id="quickstart">Quickstart</h2>
<p>To get started with the GraphRAG system we recommend trying the <a href="https://github.com/Azure-Samples/graphrag-accelerator">Solution Accelerator</a> package. This provides a user-friendly end-to-end experience with Azure resources.</p>
<h1 id="top-level-modules">Top-Level Modules</h1>
<ul>
<li><a href="../index/overview/">Indexing Pipeline Overview</a></li>
<li><a href="../query/overview/">Query Engine Overview</a></li>
</ul>
<h1 id="overview">Overview</h1>
<p>The following is a simple end-to-end example for using the GraphRAG system.
It shows how to use the system to index some text, and then use the indexed data to answer questions about the documents.</p>
@ -1480,16 +1475,13 @@ It shows how to use the system to index some text, and then use the indexed data
</code></pre></div>
<p>The graphrag library includes a CLI for a no-code approach to getting started. Please review the full <a href="../cli/">CLI documentation</a> for further detail.</p>
<h1 id="running-the-indexer">Running the Indexer</h1>
<p>Now we need to set up a data project and some initial configuration. Let's set that up. We're using the <a href="../config/overview/">default configuration mode</a>, which you can customize as needed using a <a href="../config/yaml/">config file</a>, which we recommend, or <a href="../config/env_vars/">environment variables</a>.</p>
<p>First let's get a sample dataset ready:</p>
<p>We need to set up a data project and some initial configuration. First let's get a sample dataset ready:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>mkdir<span class="w"> </span>-p<span class="w"> </span>./ragtest/input
</code></pre></div>
<p>Now let's get a copy of A Christmas Carol by Charles Dickens from a trusted source</p>
<p>Get a copy of A Christmas Carol by Charles Dickens from a trusted source:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>curl<span class="w"> </span>https://www.gutenberg.org/cache/epub/24022/pg24022.txt<span class="w"> </span>-o<span class="w"> </span>./ragtest/input/book.txt
</code></pre></div>
<p>Next we'll inject some required config variables:</p>
<h2 id="set-up-your-workspace-variables">Set Up Your Workspace Variables</h2>
<p>First let's make sure to setup the required environment variables. For details on these environment variables, and what environment variables are available, see the <a href="../config/overview/">variables documentation</a>.</p>
<p>To initialize your workspace, first run the <code>graphrag init</code> command.
Since we have already configured a directory named <code>./ragtest</code> in the previous step, run the following command:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>graphrag<span class="w"> </span>init<span class="w"> </span>--root<span class="w"> </span>./ragtest

File diff suppressed because one or more lines are too long

Binary file not shown.