test_similarity_search() — langchain Function Reference
Architecture documentation for the test_similarity_search() function in test_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9494ad0b_03e6_74a7_32e3_ad52a49c2ed2["test_similarity_search()"] 7105a1c4_0f67_8c01_efc7_d00363a3ed66["test_search.py"] 9494ad0b_03e6_74a7_32e3_ad52a49c2ed2 -->|defined in| 7105a1c4_0f67_8c01_efc7_d00363a3ed66 style 9494ad0b_03e6_74a7_32e3_ad52a49c2ed2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py lines 18–36
def test_similarity_search(
location: str,
vector_name: str,
retrieval_mode: RetrievalMode,
batch_size: int,
) -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
docsearch = QdrantVectorStore.from_texts(
texts,
ConsistentFakeEmbeddings(),
location=location,
batch_size=batch_size,
vector_name=vector_name,
retrieval_mode=retrieval_mode,
sparse_embedding=ConsistentFakeSparseEmbeddings(),
)
output = docsearch.similarity_search("foo", k=1)
assert_documents_equals(actual=output, expected=[Document(page_content="foo")])
Domain
Subdomains
Source
Frequently Asked Questions
What does test_similarity_search() do?
test_similarity_search() 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() defined?
test_similarity_search() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py at line 18.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free