Home / Function/ _get_relevant_documents() — langchain Function Reference

_get_relevant_documents() — langchain Function Reference

Architecture documentation for the _get_relevant_documents() function in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  8d5bd17d_0055_b4e9_b44a_08c070f779ab["_get_relevant_documents()"]
  6a875ee3_8044_0056_6bc2_6b28386a5844["MyRetriever"]
  8d5bd17d_0055_b4e9_b44a_08c070f779ab -->|defined in| 6a875ee3_8044_0056_6bc2_6b28386a5844
  1b84a361_dc8d_d554_f735_e9db4152aa21["test_create_retriever_tool()"]
  1b84a361_dc8d_d554_f735_e9db4152aa21 -->|calls| 8d5bd17d_0055_b4e9_b44a_08c070f779ab
  3c140bbd_1e23_7686_ff06_6a252f05cd21["test_create_retriever_tool_get_type_hints()"]
  3c140bbd_1e23_7686_ff06_6a252f05cd21 -->|calls| 8d5bd17d_0055_b4e9_b44a_08c070f779ab
  style 8d5bd17d_0055_b4e9_b44a_08c070f779ab fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 2250–2253

        def _get_relevant_documents(
            self, query: str, *, run_manager: CallbackManagerForRetrieverRun
        ) -> list[Document]:
            return [Document(page_content=f"foo {query}"), Document(page_content="bar")]

Domain

Subdomains

Frequently Asked Questions

What does _get_relevant_documents() do?
_get_relevant_documents() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is _get_relevant_documents() defined?
_get_relevant_documents() is defined in libs/core/tests/unit_tests/test_tools.py at line 2250.
What calls _get_relevant_documents()?
_get_relevant_documents() is called by 2 function(s): test_create_retriever_tool, test_create_retriever_tool_get_type_hints.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free