Home / Function/ test_qdrant_similarity_search_with_score_by_vector() — langchain Function Reference

test_qdrant_similarity_search_with_score_by_vector() — langchain Function Reference

Architecture documentation for the test_qdrant_similarity_search_with_score_by_vector() function in test_similarity_search.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  07064b07_1998_62eb_0f60_c5a1deede0c4["test_qdrant_similarity_search_with_score_by_vector()"]
  5cadf282_3dc9_2b4f_c94f_ca2e1347423e["test_similarity_search.py"]
  07064b07_1998_62eb_0f60_c5a1deede0c4 -->|defined in| 5cadf282_3dc9_2b4f_c94f_ca2e1347423e
  style 07064b07_1998_62eb_0f60_c5a1deede0c4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/async_api/test_similarity_search.py lines 75–98

async def test_qdrant_similarity_search_with_score_by_vector(
    batch_size: int,
    content_payload_key: str,
    metadata_payload_key: str,
    vector_name: str | None,
    qdrant_location: str,
) -> None:
    """Test end to end construction and search."""
    texts = ["foo", "bar", "baz"]
    docsearch = Qdrant.from_texts(
        texts,
        ConsistentFakeEmbeddings(),
        content_payload_key=content_payload_key,
        metadata_payload_key=metadata_payload_key,
        batch_size=batch_size,
        vector_name=vector_name,
        location=qdrant_location,
    )
    embeddings = ConsistentFakeEmbeddings().embed_query("foo")
    output = await docsearch.asimilarity_search_with_score_by_vector(embeddings, k=1)
    assert len(output) == 1
    document, score = output[0]
    assert_documents_equals([document], [Document(page_content="foo")])
    assert score >= 0

Domain

Subdomains

Frequently Asked Questions

What does test_qdrant_similarity_search_with_score_by_vector() do?
test_qdrant_similarity_search_with_score_by_vector() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/async_api/test_similarity_search.py.
Where is test_qdrant_similarity_search_with_score_by_vector() defined?
test_qdrant_similarity_search_with_score_by_vector() is defined in libs/partners/qdrant/tests/integration_tests/async_api/test_similarity_search.py at line 75.

Analyze Your Own Codebase

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

Try Supermodel Free