test_embeddings_property_sparse_mode() — langchain Function Reference
Architecture documentation for the test_embeddings_property_sparse_mode() function in test_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e7c58854_377f_0544_3c51_6e56005d3a4e["test_embeddings_property_sparse_mode()"] 7105a1c4_0f67_8c01_efc7_d00363a3ed66["test_search.py"] e7c58854_377f_0544_3c51_6e56005d3a4e -->|defined in| 7105a1c4_0f67_8c01_efc7_d00363a3ed66 style e7c58854_377f_0544_3c51_6e56005d3a4e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py lines 315–329
def test_embeddings_property_sparse_mode(location: str) -> None:
"""Test that embeddings property returns None in SPARSE mode."""
# Use from_texts to create the vectorstore, which handles collection creation
texts = ["test document"]
vectorstore = QdrantVectorStore.from_texts(
texts,
embedding=None, # No dense embedding for SPARSE mode
location=location,
retrieval_mode=RetrievalMode.SPARSE,
sparse_embedding=ConsistentFakeSparseEmbeddings(),
sparse_vector_name="sparse",
)
# In SPARSE mode, embeddings should return None
assert vectorstore.embeddings is None
Domain
Subdomains
Source
Frequently Asked Questions
What does test_embeddings_property_sparse_mode() do?
test_embeddings_property_sparse_mode() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py.
Where is test_embeddings_property_sparse_mode() defined?
test_embeddings_property_sparse_mode() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_search.py at line 315.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free