--- id: langchain-graph-retriever version: "0.8.0" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # langchain-graph-retriever — LangChain retriever for traversing document graphs on top of vector-based similarity search. License: permissive · Maintenance: aging · Downloads: 186.7K/mo ## What it is and what it does LangChain Graph Retriever extends LangChain's retriever framework by combining vector-based similarity search with graph traversal. Instead of treating documents as isolated results, it models them as nodes in a graph and explores relationships between them using strategies like breadth-first search or Maximal Marginal Relevance. This is useful for retrieval-augmented generation (RAG) systems where document relationships matter—for example, retrieving not just the most similar document but also semantically related neighbors. The package depends on LangChain's core abstractions (langchain-core), graph utilities (networkx), and standard Python libraries (pydantic, immutabledict, typing-extensions). It supports both synchronous and asynchronous retrieval workflows and integrates with multiple vector stores. The codebase is in Beta status and has not seen active development recently, though the repository remains maintained. Use it for: - Build RAG pipelines that retrieve semantically related document clusters instead of isolated top-k results. - Explore document relationships in knowledge graphs where metadata edges define connections between records. - Implement graph-aware search in applications like research paper discovery or knowledge base navigation. - Combine vector similarity with graph structure to improve retrieval relevance in multi-hop reasoning tasks. - Integrate graph traversal into LangChain agents that need to explore connected document sets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Retrieves documents from a graph structure using vector similarity search, combining graph traversal strategies with LangChain's retriever framework for efficient document discovery. Yes, if you need graph-aware document retrieval in a LangChain application and are comfortable with a Beta-status library that has not been actively developed for several months. The package has low install friction, permissive licensing, and no known vulnerabilities. However, verify that the graph traversal strategies and vector store adapters you need are production-ready before deploying to critical systems. ## Install pip install langchain-graph-retriever uv add langchain-graph-retriever poetry add langchain-graph-retriever ## Installing langchain-graph-retriever Before you install: Low install friction with a pure-Python wheel. Maintenance status is aging—last commit was 2025-05-05 and the package is 497 days past its initial release, though the repository remains active and not archived. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions beyond attribution and liability disclaimers. Quickstart: pip install langchain-graph-retriever from langchain_graph_retriever import GraphRetriever from langchain_core.vectorstores import Chroma vector_store = Chroma(embedding_function=your_embedding_function) retriever = GraphRetriever(store=vector_store, edges=[("keywords", "keywords")]) documents = retriever.retrieve("What is the capital of France?") Requires Python 3.10 or later; also requires a configured vector store (e.g., Chroma) and an embedding function. Verify before relying: - Whether graph traversal strategies (Eager, MMR) are fully documented and production-ready. - Performance characteristics when working with large document graphs. - Support status for the listed vector store adapters (AstraDB, Cassandra, Chroma, OpenSearch). ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 186.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags graph-based document retrieval, vector search with graph traversal, langchain graph rag, document graph retriever, similarity search graph exploration, langchain graph navigation, rag with graph structure, rag, graph-retrieval, langchain-integration [View on SkillFed](https://skillfed.io/packages/langchain-graph-retriever) · [View on PyPI](https://pypi.org/project/langchain-graph-retriever/)