Skip to content

Commit bcb7478

Browse files
natoverseAlonsoGuevaradayesouzadorbaker
authored
Next release docs (#1627)
* Wordind updates * Update yam lconfig and add notes to "deprecated" env * Add basic search section * Update versioning docs * Minor edits for clarity * Update init command * Update init to add --force in docs * Add NLP extraction params * Move vector_store to root * Add workflows to config * Add FastGraphRAG docs * add metadata column changes * Added documentation for multi index search. * Minor fixes. * Add config and table renames * Update migration notebook and comments to specify v1 * Add frequency to entity table docs * add new chunking options for metadata * Update output docs * Minor edits and cleanup * Add model ids to search configs * Spruce up migration notebook * Lint/format multi-index notebook * SpaCy model note * Update SpaCy footnote * Updated multi_index_search.ipynb to remove ruff errors. * add spacy to dictionary --------- Co-authored-by: Alonso Guevara <alonsog@microsoft.com> Co-authored-by: Dayenne Souza <ddesouza@microsoft.com> Co-authored-by: dorbaker <dorbaker@microsoft.com>
1 parent bd06d8b commit bcb7478

17 files changed

+1238
-247
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ This repository presents a methodology for using knowledge graph memory structur
4747
Using _GraphRAG_ with your data out of the box may not yield the best possible results.
4848
We strongly recommend to fine-tune your prompts following the [Prompt Tuning Guide](https://microsoft.github.io/graphrag/prompt_tuning/overview/) in our documentation.
4949

50+
## Versioning
51+
52+
Please see the [breaking changes](./breaking-changes.md) document for notes on our approach to versioning the project.
53+
54+
*Always run `graphrag init --root [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.*
55+
5056
## Responsible AI FAQ
5157

5258
See [RAI_TRANSPARENCY.md](./RAI_TRANSPARENCY.md)

breaking-changes.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# GraphRAG Data Model and Config Breaking Changes
2+
3+
This document contains notes about our versioning approach and a log of changes over time that may result in breakage. As of version 1.0 we are aligning more closely with standard [semantic versioning](https://semver.org/) practices. However, this is an ongoing research project that needs to balance experimental progress with stakeholder communication about big feature releases, so there may be times when we don't adhere perfectly to the spec.
4+
5+
There are five surface areas that may be impacted on any given release. They are:
6+
7+
- [CLI](https://microsoft.github.io/graphrag/cli/) - The CLI is the interface most project consumers are using. **Changes to the CLI will conform to standard semver.**
8+
- [API](https://github.com/microsoft/graphrag/tree/main/graphrag/api) - The API layer is the primary interface we expect developers to use if they are consuming the project as a library in their own codebases. **Changes to the API layer modules will conform to standard semver.**
9+
- Internals - Any code modules behind the CLI and API layers are considered "internal" and may change at any time without conforming to strict semver. This is intended to give the research team high flexibility to change our underlying implementation rapidly. We are not enforcing access via tightly controlled `__init__.py` files, so please understand that if you utilize modules other than the index or query API, they may break between releases in a non-semver-compliant manner.
10+
- [settings.yaml](https://microsoft.github.io/graphrag/config/yaml/) - The settings.yaml file may have changes made to it as we adjust configurability. **Changes that affect the settings.yml will result in a minor version bump**. `graphrag init` will always emit compatible starter config, so we recommend always running the command when updating GraphRAG between minor versions, and copying your endpoint information or other customizations over to the new file.
11+
- [Data model](https://microsoft.github.io/graphrag/index/outputs/) - The output data model may change over time as we adjust our approach. **Changes to the data model will conform to standard semver.** Any changes to the output tables will be shimmed for backwards compatibility between major releases, and we'll provide a migration notebook for folks to upgrade without requiring a re-index.
12+
13+
> 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.
14+
15+
# v1
16+
17+
Run the [migration notebook](./docs/examples_notebooks/index_migration_to_v1.ipynb) to convert older tables to the v1 format.
18+
19+
Note that one of the new requirements is that we write embeddings to a vector store during indexing. By default, this uses a local lancedb instance. When you re-generate the default config, a block will be added to reflect this. If you need to write to Azure AI Search instead, we recommend updating these settings before you index, so you don't need to do a separate vector ingest.
20+
21+
All of the breaking changes listed below are accounted for in the four steps above.
22+
23+
## Updated data model
24+
25+
- We have streamlined the data model of the index in a few small ways to align tables more consistently and remove redundant content. Notably:
26+
- Consistent use of `id` and `human_readable_id` across all tables; this also insures all int IDs are actually saved as ints and never strings
27+
- Alignment of fields from `create_final_entities` (such as name -> title) with `create_final_nodes`, and removal of redundant content across these tables
28+
- Rename of `document.raw_content` to `document.text`
29+
- 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
31+
- Fixed community tables to use a proper UUID for the `id` field, and retain `community` and `human_readable_id` for the short IDs
32+
- Removal of all embeddings columns from parquet files in favor of direct vector store writes
33+
34+
### Migration
35+
36+
- Run the migration notebook (some recent changes may invalidate existing caches, so migrating the format it cheaper than re-indexing).
37+
38+
## New required Embeddings
39+
40+
### Change
41+
42+
- Added new required embeddings for `DRIFTSearch` and base RAG capabilities.
43+
44+
### Migration
45+
46+
- Run a new index, leveraging existing cache.
47+
48+
## Vector Store required by default
49+
50+
### Change
51+
52+
- Vector store is now required by default for all search methods.
53+
54+
### Migration
55+
56+
- Run `graphrag init` command to generate a new settings.yaml file with the vector store configuration.
57+
- Run a new index, leveraging existing cache.
58+
59+
## Deprecate timestamp paths
60+
61+
### Change
62+
63+
- Remove support for timestamp paths, those using `${timestamp}` directory nesting.
64+
- Use the same directory for storage output and reporting output.
65+
66+
### Migration
67+
68+
- Ensure output directories no longer use `${timestamp}` directory nesting.
69+
70+
**Using Environment Variables**
71+
72+
- Ensure `GRAPHRAG_STORAGE_BASE_DIR` is set to a static directory, e.g., `output` instead of `output/${timestamp}/artifacts`.
73+
- Ensure `GRAPHRAG_REPORTING_BASE_DIR` is set to a static directory, e.g., `output` instead of `output/${timestamp}/reports`
74+
75+
[Full docs on using environment variables for configuration](https://microsoft.github.io/graphrag/config/env_vars/).
76+
77+
**Using Configuration File**
78+
79+
```yaml
80+
# rest of settings.yaml file
81+
# ...
82+
83+
storage:
84+
type: file
85+
base_dir: "output" # changed from "output/${timestamp}/artifacts"
86+
87+
reporting:
88+
type: file
89+
base_dir: "output" # changed from "output/${timestamp}/reports"
90+
```
91+
92+
[Full docs on using YAML files for configuration](https://microsoft.github.io/graphrag/config/yaml/).

dictionary.txt

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ semversioner
7878
mkdocs
7979
fnllm
8080
typer
81+
spacy
8182

8283
# Library Methods
8384
iterrows

0 commit comments

Comments
 (0)