Home / Function/ _document_from_point() — langchain Function Reference

_document_from_point() — langchain Function Reference

Architecture documentation for the _document_from_point() function in qdrant.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  a55135fe_576d_57f4_200f_c6402baada22["_document_from_point()"]
  671b47a0_cdd3_a89d_e90f_0631a4bd67d3["QdrantVectorStore"]
  a55135fe_576d_57f4_200f_c6402baada22 -->|defined in| 671b47a0_cdd3_a89d_e90f_0631a4bd67d3
  554efa04_b226_2427_5014_2b27a2b0b32f["similarity_search_with_score()"]
  554efa04_b226_2427_5014_2b27a2b0b32f -->|calls| a55135fe_576d_57f4_200f_c6402baada22
  3b9e0613_eecd_e688_0717_98be6124f6d3["similarity_search_with_score_by_vector()"]
  3b9e0613_eecd_e688_0717_98be6124f6d3 -->|calls| a55135fe_576d_57f4_200f_c6402baada22
  365c8401_562f_37f6_22d0_d8da0ff6fb68["max_marginal_relevance_search_with_score_by_vector()"]
  365c8401_562f_37f6_22d0_d8da0ff6fb68 -->|calls| a55135fe_576d_57f4_200f_c6402baada22
  b12af734_aa28_b91c_e6ae_69046d2b298a["get_by_ids()"]
  b12af734_aa28_b91c_e6ae_69046d2b298a -->|calls| a55135fe_576d_57f4_200f_c6402baada22
  style a55135fe_576d_57f4_200f_c6402baada22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/langchain_qdrant/qdrant.py lines 1023–1036

    def _document_from_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_point() do?
_document_from_point() is a function in the langchain codebase, defined in libs/partners/qdrant/langchain_qdrant/qdrant.py.
Where is _document_from_point() defined?
_document_from_point() is defined in libs/partners/qdrant/langchain_qdrant/qdrant.py at line 1023.
What calls _document_from_point()?
_document_from_point() is called by 4 function(s): get_by_ids, max_marginal_relevance_search_with_score_by_vector, similarity_search_with_score, 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