Home / Function/ test_similarity_relevance_search_no_threshold() — langchain Function Reference

test_similarity_relevance_search_no_threshold() — langchain Function Reference

Architecture documentation for the test_similarity_relevance_search_no_threshold() function in test_search.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  6e0e97e2_bd51_e4a8_7289_ceb30180d33a["test_similarity_relevance_search_no_threshold()"]
  7105a1c4_0f67_8c01_efc7_d00363a3ed66["test_search.py"]
  6e0e97e2_bd51_e4a8_7289_ceb30180d33a -->|defined in| 7105a1c4_0f67_8c01_efc7_d00363a3ed66
  style 6e0e97e2_bd51_e4a8_7289_ceb30180d33a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py lines 150–173

def test_similarity_relevance_search_no_threshold(
    location: str,
    vector_name: str,
) -> None:
    """Test end to end construction and search."""
    texts = ["foo", "bar", "baz"]
    metadatas = [
        {"page": i, "metadata": {"page": i + 1, "pages": [i + 2, -1]}}
        for i in range(len(texts))
    ]
    docsearch = QdrantVectorStore.from_texts(
        texts,
        ConsistentFakeEmbeddings(),
        metadatas=metadatas,
        location=location,
        vector_name=vector_name,
    )
    output = docsearch.similarity_search_with_relevance_scores(
        "foo", k=3, score_threshold=None
    )
    assert len(output) == 3
    for i in range(len(output)):
        assert round(output[i][1], 2) >= 0
        assert round(output[i][1], 2) <= 1

Domain

Subdomains

Frequently Asked Questions

What does test_similarity_relevance_search_no_threshold() do?
test_similarity_relevance_search_no_threshold() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py.
Where is test_similarity_relevance_search_no_threshold() defined?
test_similarity_relevance_search_no_threshold() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py at line 150.

Analyze Your Own Codebase

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

Try Supermodel Free