Home / Function/ _get_docs() — langchain Function Reference

_get_docs() — langchain Function Reference

Architecture documentation for the _get_docs() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  91f26d93_49d0_6b76_bf53_e69422a76a37["_get_docs()"]
  bc11cd5d_a081_308b_a325_0c46b7e4deb4["ChatVectorDBChain"]
  91f26d93_49d0_6b76_bf53_e69422a76a37 -->|defined in| bc11cd5d_a081_308b_a325_0c46b7e4deb4
  cc60c9e9_1c90_5c4d_901c_b053eae628ef["_get_docs()"]
  91f26d93_49d0_6b76_bf53_e69422a76a37 -->|calls| cc60c9e9_1c90_5c4d_901c_b053eae628ef
  style 91f26d93_49d0_6b76_bf53_e69422a76a37 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/conversational_retrieval/base.py lines 521–535

    def _get_docs(
        self,
        question: str,
        inputs: dict[str, Any],
        *,
        run_manager: CallbackManagerForChainRun,
    ) -> list[Document]:
        """Get docs."""
        vectordbkwargs = inputs.get("vectordbkwargs", {})
        full_kwargs = {**self.search_kwargs, **vectordbkwargs}
        return self.vectorstore.similarity_search(
            question,
            k=self.top_k_docs_for_context,
            **full_kwargs,
        )

Subdomains

Calls

Frequently Asked Questions

What does _get_docs() do?
_get_docs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/conversational_retrieval/base.py.
Where is _get_docs() defined?
_get_docs() is defined in libs/langchain/langchain_classic/chains/conversational_retrieval/base.py at line 521.
What does _get_docs() call?
_get_docs() calls 1 function(s): _get_docs.

Analyze Your Own Codebase

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

Try Supermodel Free