Skip to content

Commit 27c6de8

Browse files
authored
Update docs for 2.0+ (#1984)
* Update docs * Fix prompt links
1 parent 1df8972 commit 27c6de8

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# GraphRAG
22

3-
👉 [Use the GraphRAG Accelerator solution](https://github.com/Azure-Samples/graphrag-accelerator) <br/>
43
👉 [Microsoft Research Blog Post](https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/)<br/>
54
👉 [Read the docs](https://microsoft.github.io/graphrag)<br/>
65
👉 [GraphRAG Arxiv](https://arxiv.org/pdf/2404.16130)
@@ -28,7 +27,7 @@ To learn more about GraphRAG and how it can be used to enhance your LLM's abilit
2827

2928
## Quickstart
3029

31-
To get started with the GraphRAG system we recommend trying the [Solution Accelerator](https://github.com/Azure-Samples/graphrag-accelerator) package. This provides a user-friendly end-to-end experience with Azure resources.
30+
To get started with the GraphRAG system we recommend trying the [command line quickstart](https://microsoft.github.io/graphrag/get_started/).
3231

3332
## Repository Guidance
3433

breaking-changes.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ There are five surface areas that may be impacted on any given release. They are
1212

1313
> TL;DR: Always run `graphrag init --path [path] --force` between minor version bumps to ensure you have the latest config format. Run the provided migration notebook between major version bumps if you want to avoid re-indexing prior datasets. Note that this will overwrite your configuration and prompts, so backup if necessary.
1414
15+
# v2
16+
17+
Run the [migration notebook](./docs/examples_notebooks/index_migration_to_v2.ipynb) to convert older tables to the v2 format.
18+
19+
The v2 release renamed all of our index tables to simply name the items each table contains. The previous naming was a leftover requirement of our use of DataShaper, which is no longer necessary.
20+
1521
# v1
1622

1723
Run the [migration notebook](./docs/examples_notebooks/index_migration_to_v1.ipynb) to convert older tables to the v1 format.
@@ -27,7 +33,7 @@ All of the breaking changes listed below are accounted for in the four steps abo
2733
- Alignment of fields from `create_final_entities` (such as name -> title) with `create_final_nodes`, and removal of redundant content across these tables
2834
- Rename of `document.raw_content` to `document.text`
2935
- Rename of `entity.name` to `entity.title`
30-
- Rename `rank` to `combined_degree` in `create_final_relationships` and removal of `source_degree` and `target_degree`fields
36+
- Rename `rank` to `combined_degree` in `create_final_relationships` and removal of `source_degree` and `target_degree` fields
3137
- Fixed community tables to use a proper UUID for the `id` field, and retain `community` and `human_readable_id` for the short IDs
3238
- Removal of all embeddings columns from parquet files in favor of direct vector store writes
3339

docs/config/env_vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ As of version 1.3, GraphRAG no longer supports a full complement of pre-built en
44

55
The only standard environment variable we expect, and include in the default settings.yml, is `GRAPHRAG_API_KEY`. If you are already using a number of the previous GRAPHRAG_* environment variables, you can insert them with template syntax into settings.yml and they will be adopted.
66

7-
> **The environment variables below are documented as an aid for migration, but they WILL NOT be read unless you use template syntax in your settings.yml.**
7+
> **The environment variables below are documented as an aid for migration, but they WILL NOT be read unless you use template syntax in your settings.yml. We also WILL NOT be updating this page as the main config object changes.**
88
99
---
1010

docs/config/yaml.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ models:
4040
#### Fields
4141
4242
- `api_key` **str** - The OpenAI API key to use.
43-
- `auth_type` **api_key|managed_identity** - Indicate how you want to authenticate requests.
43+
- `auth_type` **api_key|azure_managed_identity** - Indicate how you want to authenticate requests.
4444
- `type` **openai_chat|azure_openai_chat|openai_embedding|azure_openai_embedding|mock_chat|mock_embeddings** - The type of LLM to use.
4545
- `model` **str** - The model name.
4646
- `encoding_model` **str** - The text encoding model to use. Default is to use the encoding model aligned with the language model (i.e., it is retrieved from tiktoken if unset).
@@ -73,16 +73,18 @@ models:
7373

7474
### input
7575

76-
Our pipeline can ingest .csv, .txt, or .json data from an input folder. See the [inputs page](../index/inputs.md) for more details and examples.
76+
Our pipeline can ingest .csv, .txt, or .json data from an input location. See the [inputs page](../index/inputs.md) for more details and examples.
7777

7878
#### Fields
7979

80-
- `type` **file|blob** - The input type to use. Default=`file`
80+
- `storage` **StorageConfig**
81+
- `type` **file|blob|cosmosdb** - The storage type to use. Default=`file`
82+
- `base_dir` **str** - The base directory to write output artifacts to, relative to the root.
83+
- `connection_string` **str** - (blob/cosmosdb only) The Azure Storage connection string.
84+
- `container_name` **str** - (blob/cosmosdb only) The Azure Storage container name.
85+
- `storage_account_blob_url` **str** - (blob only) The storage account blob URL to use.
86+
- `cosmosdb_account_blob_url` **str** - (cosmosdb only) The CosmosDB account blob URL to use.
8187
- `file_type` **text|csv|json** - The type of input data to load. Default is `text`
82-
- `base_dir` **str** - The base directory to read input from, relative to the root.
83-
- `connection_string` **str** - (blob only) The Azure Storage connection string.
84-
- `storage_account_blob_url` **str** - The storage account blob URL to use.
85-
- `container_name` **str** - (blob only) The Azure Storage container name.
8688
- `encoding` **str** - The encoding of the input file. Default is `utf-8`
8789
- `file_pattern` **str** - A regex to match input files. Default is `.*\.csv$`, `.*\.txt$`, or `.*\.json$` depending on the specified `file_type`, but you can customize it if needed.
8890
- `file_filter` **dict** - Key/value pairs to filter. Default is None.

docs/get_started.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
To get started with the GraphRAG system, you have a few options:
88

9-
👉 [Use the GraphRAG Accelerator solution](https://github.com/Azure-Samples/graphrag-accelerator) <br/>
109
👉 [Install from pypi](https://pypi.org/project/graphrag/). <br/>
1110
👉 [Use it from source](developing.md)<br/>
1211

docs/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Welcome to GraphRAG
22

33
👉 [Microsoft Research Blog Post](https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/) <br/>
4-
👉 [GraphRAG Accelerator](https://github.com/Azure-Samples/graphrag-accelerator) <br/>
54
👉 [GraphRAG Arxiv](https://arxiv.org/pdf/2404.16130)
65

76
<p align="center">
@@ -16,10 +15,6 @@ approaches using plain text snippets. The GraphRAG process involves extracting a
1615

1716
To learn more about GraphRAG and how it can be used to enhance your language model's ability to reason about your private data, please visit the [Microsoft Research Blog Post](https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/).
1817

19-
## Solution Accelerator 🚀
20-
21-
To quickstart the GraphRAG system we recommend trying the [Solution Accelerator](https://github.com/Azure-Samples/graphrag-accelerator) package. This provides a user-friendly end-to-end experience with Azure resources.
22-
2318
## Get Started with GraphRAG 🚀
2419

2520
To start using GraphRAG, check out the [_Get Started_](get_started.md) guide.

docs/index/byog.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ workflows: [create_communities, create_community_reports, generate_text_embeddin
5252
5353
### FastGraphRAG
5454
55-
[FastGraphRAG](./methods.md#fastgraphrag) uses text_units for the community reports instead of the entity and relationship descriptions. If your graph is sourced in such a way that it does not have descriptions, this might be a useful alternative. In this case, you would update your workflows list to include the text variant:
55+
[FastGraphRAG](./methods.md#fastgraphrag) uses text_units for the community reports instead of the entity and relationship descriptions. If your graph is sourced in such a way that it does not have descriptions, this might be a useful alternative. In this case, you would update your workflows list to include the text variant of the community reports workflow:
5656
5757
```yaml
5858
workflows: [create_communities, create_community_reports_text, generate_text_embeddings]
@@ -65,7 +65,6 @@ This method requires that your entities and relationships tables have valid link
6565

6666
Putting it all together:
6767

68-
- `input`: GraphRAG does require an input document set, even if you don't need us to process it. You can create an input folder and drop a dummy.txt document in there to work around this.
6968
- `output`: Create an output folder and put your entities and relationships (and optionally text_units) parquet files in it.
7069
- Update your config as noted above to only run the workflows subset you need.
7170
- Run `graphrag index --root <your project root>`

docs/index/methods.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This is the method described in the original [blog post](https://www.microsoft.c
1010
- relationship extraction: LLM is prompted to describe the relationship between each pair of entities in each text unit.
1111
- entity summarization: LLM is prompted to combine the descriptions for every instance of an entity found across the text units into a single summary.
1212
- relationship summarization: LLM is prompted to combine the descriptions for every instance of a relationship found across the text units into a single summary.
13-
- claim extraction (optiona): LLM is prompted to extract and describe claims from each text unit.
13+
- claim extraction (optional): LLM is prompted to extract and describe claims from each text unit.
1414
- community report generation: entity and relationship descriptions (and optionally claims) for each community are collected and used to prompt the LLM to generate a summary report.
1515

1616
`graphrag index --method standard`. This is the default method, so the method param can actual be omitted.
@@ -23,7 +23,7 @@ FastGraphRAG is a method that substitutes some of the language model reasoning f
2323
- relationship extraction: relationships are defined as text unit co-occurrence between entity pairs. There is no description.
2424
- entity summarization: not necessary.
2525
- relationship summarization: not necessary.
26-
- claim extraction (optiona): unused.
26+
- claim extraction (optional): unused.
2727
- community report generation: The direct text unit content containing each entity noun phrase is collected and used to prompt the LLM to generate a summary report.
2828

2929
`graphrag index --method fast`
@@ -41,4 +41,4 @@ You can install it manually by running `python -m spacy download <model_name>`,
4141

4242
## Choosing a Method
4343

44-
Standard GraphRAG provides a rich description of real-world entities and relationships, but is more expensive that FastGraphRAG. We estimate graph extraction to constitute roughly 75% of indexing cost. FastGraphRAG is therefore much cheaper, but the tradeoff is that the extracted graph is less directly relevant for use outside of GraphRAG, and the graph tends to be quite a bit noisier. If high fidelity entities and graph exploration are important to your use case, we recommend staying with traditional GraphRAG. If your use case is primarily aimed at summary questions using global search, FastGraphRAG is a reasonable and cheaper alternative.
44+
Standard GraphRAG provides a rich description of real-world entities and relationships, but is more expensive that FastGraphRAG. We estimate graph extraction to constitute roughly 75% of indexing cost. FastGraphRAG is therefore much cheaper, but the tradeoff is that the extracted graph is less directly relevant for use outside of GraphRAG, and the graph tends to be quite a bit noisier. If high fidelity entities and graph exploration are important to your use case, we recommend staying with traditional GraphRAG. If your use case is primarily aimed at summary questions using global search, FastGraphRAG provides high quality summarization at much less LLM cost.

docs/prompt_tuning/manual_prompt_tuning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Each of these prompts may be overridden by writing a custom prompt file in plain
1010

1111
### Entity/Relationship Extraction
1212

13-
[Prompt Source](http://github.com/microsoft/graphrag/blob/main/graphrag/prompts/index/entity_extraction.py)
13+
[Prompt Source](http://github.com/microsoft/graphrag/blob/main/graphrag/prompts/index/extract_graph.py)
1414

1515
#### Tokens
1616

@@ -31,7 +31,7 @@ Each of these prompts may be overridden by writing a custom prompt file in plain
3131

3232
### Claim Extraction
3333

34-
[Prompt Source](http://github.com/microsoft/graphrag/blob/main/graphrag/prompts/index/claim_extraction.py)
34+
[Prompt Source](http://github.com/microsoft/graphrag/blob/main/graphrag/prompts/index/extract_claims.py)
3535

3636
#### Tokens
3737

0 commit comments

Comments
 (0)