Skip to content

Commit 4a933d2

Browse files
authored
chore(doc): Adds Documentation for Graph Retrievers. (#3)
* 1. Update the retriever to the latest changes 2. Addition of graph_retriever.ipynb document * Spelling updation * docs: add explanation for hybrid retrieval and LLM reranking in SpannerGraphCustomRetriever * docs: add explanation for hybrid retrieval and LLM reranking in SpannerGraphCustomRetriever * chore: updated scoring and summary of the responses + Updates the retriever doc * chore: Fix invalid Json format in notebook * chore: Fix Lint issues * chore: address PR comments * Update prompts * chore:update prompts based on gql response
1 parent 8e0f850 commit 4a933d2

File tree

6 files changed

+1031
-44
lines changed

6 files changed

+1031
-44
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ retriever.retrieve("Where does Elias Thorne's sibling live?")
8484

8585
```
8686

87-
Use `SpannerGraphCustomRetriever` to query your SpannerPropertyGraphStore with a hybrid approach, combining natural language to GQL translation with vector search capabilities.
87+
Use `SpannerGraphCustomRetriever` to query your `SpannerPropertyGraphStore` with a hybrid retrieval approach, combining natural language-to-GQL translation with vector search capabilities.
88+
89+
The Vector Context Retriever uses semantic vector search to surface relevant contexts, even when they aren't explicitly structured in the graph. The Text2GQL Retriever translates natural language into GQL queries to extract precise relationships and attributes from the property graph.
90+
91+
The results from both retrievers are evaluated using an LLM-based reranker, which scores them based on relevance, completeness, and contextual fit with the original query.
92+
93+
This hybrid + rerank pipeline enables the system to handle everything from vague, open-ended questions to structured, entity-specific queries, delivering high-confidence, context-aware responses.
94+
8895

8996
```python
9097
from llama_index_spanner import SpannerPropertyGraphStore, SpannerGraphCustomRetriever
@@ -110,7 +117,7 @@ retriever = SpannerGraphCustomRetriever(
110117
retriever.retriever("Who lives in desert?")
111118
```
112119

113-
See the full [Spanner Graph Retrievers](https://github.com/googleapis/llama-index-spanner-python/blob/main/docs/graph_retriver.ipynb) tutorial.
120+
See the full [Spanner Graph Retrievers](https://github.com/googleapis/llama-index-spanner-python/blob/main/docs/graph_retriever.ipynb) tutorial.
114121

115122
## Contributing
116123

0 commit comments

Comments
 (0)