breaking-changes.md
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 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.
There are five surface areas that may be impacted on any given release. They are:
__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.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.TL;DR: Always run
graphrag init --path [path] --forcebetween 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.
Run the migration notebook to convert older tables to the v3 format. Our main goals with v3 were to slim down the core library to minimize long-term maintenance of features that are either largely unused or should have been out of scope for a long time anyway.
We made minimal data model changes that will affect your index for v3. The primary breaking change is that we removed a rarely-used document-grouping capability that resulted in the text_units table having a document_ids column with a list instead of a single entry in a column called document_id. v3 fixes that, and the migration notebook applies the change so you don't need to re-index.
Most of the other changes we made are removal of fields that are no longer used or are out of scope. For example, we removed the UMAP step that generates x/y coordinates for the entities - new indexes will not produce these columns, but they won't hurt anything if they are in your existing tables.
We have removed the multi-search variant from each search method in the API.
We did make several changes to the configuration model. The best way forward is to re-run init, which we always recommend for minor and major version bumps.
This is a summary of changes:
null in your config as a default, or set explicit limits to tpm/rpm.vector_store dict into a single root-level object. This is because we no longer support multi-search, and this dict required a lot of downstream complexity for that single use case.outputs block that was also only used for multi-search.strategy config dict that allowed fine tuning of internal settings. These fine tunings are never used and had associated complexity, so we removed it.container_name prefix, which caused confusion anyway. Now, the default container name will simply be the embedded field name - if you need something custom, add the index_schema block and populate as needed.umap and embed_graph blocks which were only used to add x/y fields to the entities. This fixed a long-standing dependency issue with graspologic. If you need x/y positions, see the visualization guide for using gephi.Run the migration notebook to convert older tables to the v2 format.
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.
Run the migration notebook to convert older tables to the v1 format.
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.
All of the breaking changes listed below are accounted for in the four steps above.
id and human_readable_id across all tables; this also insures all int IDs are actually saved as ints and never stringscreate_final_entities (such as name -> title) with create_final_nodes, and removal of redundant content across these tablesdocument.raw_content to document.textentity.name to entity.titlerank to combined_degree in create_final_relationships and removal of source_degree and target_degree fieldsid field, and retain community and human_readable_id for the short IDsDRIFTSearch and base RAG capabilities.graphrag init command to generate a new settings.yaml file with the vector store configuration.${timestamp} directory nesting.${timestamp} directory nesting.Using Environment Variables
GRAPHRAG_STORAGE_BASE_DIR is set to a static directory, e.g., output instead of output/${timestamp}/artifacts.GRAPHRAG_REPORTING_BASE_DIR is set to a static directory, e.g., output instead of output/${timestamp}/reportsFull docs on using environment variables for configuration.
Using Configuration File
# rest of settings.yaml file
# ...
storage:
type: file
base_dir: "output" # changed from "output/${timestamp}/artifacts"
reporting:
type: file
base_dir: "output" # changed from "output/${timestamp}/reports"