test_qdrant_similarity_search_with_relevance_score_with_threshold() — langchain Function Reference
Architecture documentation for the test_qdrant_similarity_search_with_relevance_score_with_threshold() function in test_similarity_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5bdab860_95be_2966_3a4e_2965ebf8f0f6["test_qdrant_similarity_search_with_relevance_score_with_threshold()"] 5b7f0668_b386_695d_06c0_77020a3462af["test_similarity_search.py"] 5bdab860_95be_2966_3a4e_2965ebf8f0f6 -->|defined in| 5b7f0668_b386_695d_06c0_77020a3462af style 5bdab860_95be_2966_3a4e_2965ebf8f0f6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/test_similarity_search.py lines 157–178
def test_qdrant_similarity_search_with_relevance_score_with_threshold(
vector_name: str | None,
) -> 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 = Qdrant.from_texts(
texts,
ConsistentFakeEmbeddings(),
metadatas=metadatas,
location=":memory:",
vector_name=vector_name,
)
score_threshold = 0.98
kwargs = {"score_threshold": score_threshold}
output = docsearch.similarity_search_with_relevance_scores("foo", k=3, **kwargs)
assert len(output) == 1
assert all(score >= score_threshold for _, score in output)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_qdrant_similarity_search_with_relevance_score_with_threshold() do?
test_qdrant_similarity_search_with_relevance_score_with_threshold() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/test_similarity_search.py.
Where is test_qdrant_similarity_search_with_relevance_score_with_threshold() defined?
test_qdrant_similarity_search_with_relevance_score_with_threshold() is defined in libs/partners/qdrant/tests/integration_tests/test_similarity_search.py at line 157.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free