test_similarity_search_with_score_by_vector() — langchain Function Reference
Architecture documentation for the test_similarity_search_with_score_by_vector() function in test_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9f851c6a_bd13_d1f6_9d73_91cde35dc73e["test_similarity_search_with_score_by_vector()"] 7105a1c4_0f67_8c01_efc7_d00363a3ed66["test_search.py"] 9f851c6a_bd13_d1f6_9d73_91cde35dc73e -->|defined in| 7105a1c4_0f67_8c01_efc7_d00363a3ed66 style 9f851c6a_bd13_d1f6_9d73_91cde35dc73e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py lines 76–99
def test_similarity_search_with_score_by_vector(
location: str,
content_payload_key: str,
metadata_payload_key: str,
vector_name: str,
batch_size: int,
) -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
docsearch = QdrantVectorStore.from_texts(
texts,
ConsistentFakeEmbeddings(),
location=location,
content_payload_key=content_payload_key,
metadata_payload_key=metadata_payload_key,
batch_size=batch_size,
vector_name=vector_name,
)
embeddings = ConsistentFakeEmbeddings().embed_query("foo")
output = docsearch.similarity_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
Source
Frequently Asked Questions
What does test_similarity_search_with_score_by_vector() do?
test_similarity_search_with_score_by_vector() 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_search_with_score_by_vector() defined?
test_similarity_search_with_score_by_vector() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py at line 76.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free