_get_docs() — langchain Function Reference
Architecture documentation for the _get_docs() function in vector_db.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 351a2d31_1d62_5bc7_cdde_9096743e5070["_get_docs()"] 5eb6dd31_a76d_429d_2244_999951beb530["VectorDBQAWithSourcesChain"] 351a2d31_1d62_5bc7_cdde_9096743e5070 -->|defined in| 5eb6dd31_a76d_429d_2244_999951beb530 a733a44b_a858_f174_7563_58bb90e6fa35["_reduce_tokens_below_limit()"] 351a2d31_1d62_5bc7_cdde_9096743e5070 -->|calls| a733a44b_a858_f174_7563_58bb90e6fa35 style 351a2d31_1d62_5bc7_cdde_9096743e5070 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/qa_with_sources/vector_db.py lines 53–65
def _get_docs(
self,
inputs: dict[str, Any],
*,
run_manager: CallbackManagerForChainRun,
) -> list[Document]:
question = inputs[self.question_key]
docs = self.vectorstore.similarity_search(
question,
k=self.k,
**self.search_kwargs,
)
return self._reduce_tokens_below_limit(docs)
Domain
Subdomains
Source
Frequently Asked Questions
What does _get_docs() do?
_get_docs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/qa_with_sources/vector_db.py.
Where is _get_docs() defined?
_get_docs() is defined in libs/langchain/langchain_classic/chains/qa_with_sources/vector_db.py at line 53.
What does _get_docs() call?
_get_docs() calls 1 function(s): _reduce_tokens_below_limit.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free