Skip to content

Commit e204985

Browse files
authored
Update document search method GraphRAGDemo.ipynb (#270)
* Update document search method GraphRAGDemo.ipynb * update wordings
1 parent c84b005 commit e204985

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tutorials/graphrag/GraphRAGDemo.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,15 @@
200200
"## Comparing Document Search Methods\n",
201201
"\n",
202202
"TigerGraph GraphRAG provides multiple methods to search documents in the graph. The methods are:\n",
203-
"- **Hybrid Search**: This method uses a combination of vector search and graph traversal to find the most relevant information to the query. It uses the selected algorithm to search the embeddings of documents, document chunks, entities, and relationships. These results serve as the starting point for the graph traversal. The graph traversal is used to find the most relevant information to the query.\n",
203+
"- **Similarity Search**: This is the baseline, traditional vector search approach. It compares the query embedding against the document chunk embeddings, and returns the closest top-k matches. While efficient, this method is limited to semantic similarity and does not capture additional context or structural connections.\n",
204204
"\n",
205-
"- **Similarity Search**: This method uses the selected algorithm to search the embeddings of one of the document, document chunk, entity, or relationship vector indices. It returns the most relevant information to the query based on the embeddings. This method is what you would expect from a traditional vector RAG solution.\n",
205+
"- **Contextual Search**: This method enhances vector search by incorporating graph traversal via sibling relationships (e.g., IS_AFTER) between document chunks. Starting from the top-k most relevant chunk, it expands to include surrounding chunks, ensuring that context spanning across multiple paragraphs or sections is retrieved. This provides a more complete answer when key information is distributed across adjacent text.\n",
206206
"\n",
207-
"- **Sibling Search**: This method is very similar to the Vector Search method, but it uses the sibling (IS_AFTER) relationships between document chunks to expand the context around the document chunk that is most relevant to the query. This method is useful when you want to get more context around the most relevant document chunk."
207+
"- **Hybrid Search**: Hybrid Search: Hybrid search combines vector search with graph traversal via common entities and relationships among document chunks. After identifying the top-k most relevant documents chunks and entities, it expands through the graph by leveraging contextual, entity, and containment relationships. This integration of semantic similarity with structural connections enables more comprehensive and precise retrieval.\n",
208+
"\n",
209+
"- **Community Search**: Community search extends retrieval capabilities by combining graph traversal with layered community detection. It begins with the top-k most similar communities, then traverses relevant relationships within these communities to surface both related communities and their associated document chunks. Unlike purely semantic methods, this approach leverages hierarchical community patterns to deliver richer, more coherent context. Community-based search is especially effective for broader queries, where balancing scope and detail is critical.\n",
210+
"\n"
211+
208212
]
209213
},
210214
{

0 commit comments

Comments
 (0)