Home / Function/ _document_from_scored_point() — langchain Function Reference

_document_from_scored_point() — langchain Function Reference

Architecture documentation for the _document_from_scored_point() function in vectorstores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e51a8060_dfbc_bc2e_2d45_e5db47741681["_document_from_scored_point()"]
  2d095452_70a7_4606_a1b1_4650d16b5343["Qdrant"]
  e51a8060_dfbc_bc2e_2d45_e5db47741681 -->|defined in| 2d095452_70a7_4606_a1b1_4650d16b5343
  f5c7d643_9c9c_c3ee_5be7_8f0b6359b191["similarity_search_with_score_by_vector()"]
  f5c7d643_9c9c_c3ee_5be7_8f0b6359b191 -->|calls| e51a8060_dfbc_bc2e_2d45_e5db47741681
  f3b0da94_b278_98e6_0a3b_a9cd8aa11516["asimilarity_search_with_score_by_vector()"]
  f3b0da94_b278_98e6_0a3b_a9cd8aa11516 -->|calls| e51a8060_dfbc_bc2e_2d45_e5db47741681
  8c904251_65de_1c34_8693_324e08819e7e["max_marginal_relevance_search_with_score_by_vector()"]
  8c904251_65de_1c34_8693_324e08819e7e -->|calls| e51a8060_dfbc_bc2e_2d45_e5db47741681
  5b58fc45_0beb_27f4_0065_afd49a62b315["amax_marginal_relevance_search_with_score_by_vector()"]
  5b58fc45_0beb_27f4_0065_afd49a62b315 -->|calls| e51a8060_dfbc_bc2e_2d45_e5db47741681
  style e51a8060_dfbc_bc2e_2d45_e5db47741681 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/langchain_qdrant/vectorstores.py lines 2046–2059

    def _document_from_scored_point(
        cls,
        scored_point: Any,
        collection_name: str,
        content_payload_key: str,
        metadata_payload_key: str,
    ) -> Document:
        metadata = scored_point.payload.get(metadata_payload_key) or {}
        metadata["_id"] = scored_point.id
        metadata["_collection_name"] = collection_name
        return Document(
            page_content=scored_point.payload.get(content_payload_key, ""),
            metadata=metadata,
        )

Domain

Subdomains

Frequently Asked Questions

What does _document_from_scored_point() do?
_document_from_scored_point() is a function in the langchain codebase, defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py.
Where is _document_from_scored_point() defined?
_document_from_scored_point() is defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py at line 2046.
What calls _document_from_scored_point()?
_document_from_scored_point() is called by 4 function(s): amax_marginal_relevance_search_with_score_by_vector, asimilarity_search_with_score_by_vector, max_marginal_relevance_search_with_score_by_vector, similarity_search_with_score_by_vector.

Analyze Your Own Codebase

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

Try Supermodel Free