langchain_graph_retriever¶
GraphRetriever ¶
Bases: BaseRetriever
Retriever combining vector search and graph traversal.
The GraphRetriever class retrieves documents by first performing a vector search to identify relevant documents, followed by graph traversal to explore their connections. It supports multiple traversal strategies and integrates seamlessly with LangChain's retriever framework.
ATTRIBUTE | DESCRIPTION |
---|---|
store |
The adapter or vector store used for document retrieval.
TYPE:
|
edges |
A list of EdgeSpec for use in creating a MetadataEdgeFunction, or an EdgeFunction.
TYPE:
|
strategy |
The traversal strategy to use.
TYPE:
|
apply_extra ¶
Apply extra configuration to the traversal strategy.
This method captures additional fields provided in the model_extra
argument
and applies them to the current traversal strategy. Any extra fields are
cleared after they are applied.
RETURNS | DESCRIPTION |
---|---|
Self
|
The updated GraphRetriever instance. |