Skip to content

Commit

Permalink
Fix init defaults for vector store and img in drift docs (#1357)
Browse files Browse the repository at this point in the history
* Fix init defaults for vector store and img in drift docs

* Adde more doc

* Spellcheck

* Remove example
  • Loading branch information
AlonsoGuevara authored Nov 5, 2024
1 parent d9f985a commit 1557ce3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .semversioner/next-release/patch-20241105183532211035.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "patch",
"description": "Fix init defaults for vector store and drift img in docs"
}
4 changes: 3 additions & 1 deletion docs/query/drift_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ DRIFT search (Dynamic Reasoning and Inference with Flexible Traversal) builds up
## Methodology

<p align="center">
<img src="img/drift-search-diagram.png" alt="Figure 1. An entire DRIFT search hierarchy highlighting the three core phases of the DRIFT search process. A (Primer): DRIFT compares the user’s query with the top K most semantically relevant community reports, generating a broad initial answer and follow-up questions to steer further exploration. B (Follow-Up): DRIFT uses local search to refine queries, producing additional intermediate answers and follow-up questions that enhance specificity, guiding the engine towards context-rich information. A glyph on each node in the diagram shows the confidence the algorithm has to continue the query expansion step. C (Output Hierarchy): The final output is a hierarchical structure of questions and answers ranked by relevance, reflecting a balanced mix of global insights and local refinements, making the results adaptable and comprehensive." width="450" align="center" />
<img src="../../img/drift-search-diagram.png" alt="Figure 1. An entire DRIFT search hierarchy highlighting the three core phases of the DRIFT search process." align="center" />
</p>
<p align="center"><i>
Figure 1. An entire DRIFT search hierarchy highlighting the three core phases of the DRIFT search process. A (Primer): DRIFT compares the user’s query with the top K most semantically relevant community reports, generating a broad initial answer and follow-up questions to steer further exploration. B (Follow-Up): DRIFT uses local search to refine queries, producing additional intermediate answers and follow-up questions that enhance specificity, guiding the engine towards context-rich information. A glyph on each node in the diagram shows the confidence the algorithm has to continue the query expansion step. C (Output Hierarchy): The final output is a hierarchical structure of questions and answers ranked by relevance, reflecting a balanced mix of global insights and local refinements, making the results adaptable and comprehensive.</i></p>
<p align="center">

DRIFT Search introduces a new approach to local search queries by including community information in the search process. This greatly expands the breadth of the query’s starting point and leads to retrieval and usage of a far higher variety of facts in the final answer. This addition expands the GraphRAG query engine by providing a more comprehensive option for local search, which uses community insights to refine a query into detailed follow-up questions.
Expand Down
2 changes: 1 addition & 1 deletion graphrag/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
VECTOR_STORE = f"""
type: {VectorStoreType.LanceDB.value}
db_uri: '{(Path(STORAGE_BASE_DIR) / "lancedb")!s}'
collection_name: default
container_name: default # A prefix for the vector store to create embedding containers. Default: 'default'.
overwrite: true\
"""

Expand Down
2 changes: 1 addition & 1 deletion graphrag/index/init_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# api_key: <api_key> # if not set, will attempt to use managed identity. Expects the `Search Index Data Contributor` RBAC role in this case.
# audience: <optional> # if using managed identity, the audience to use for the token
# overwrite: true # or false. Only applicable at index creation time
# collection_name: <collection_name> # the name of the collection to use. Default: 'default'
# container_name: default # A prefix for the AzureAISearch to create indexes. Default: 'default'.
llm:
api_key: ${{GRAPHRAG_API_KEY}}
type: {defs.EMBEDDING_TYPE.value} # or azure_openai_embedding
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ test_smoke = "pytest ./tests/smoke"
test_notebook = "pytest ./tests/notebook"
test_verbs = "pytest ./tests/verbs"
index = "python -m graphrag index"
init = "python -m graphrag init"
query = "python -m graphrag query"
prompt_tune = "python -m graphrag prompt-tune"
# Pass in a test pattern
Expand Down

0 comments on commit 1557ce3

Please sign in to comment.