RyanCodrai/turbovec · error · NotImplementedError
TurboQuantVectorStore does not support query mode {query.mod
Error message
TurboQuantVectorStore does not support query mode {query.mode!r}. Only VectorStoreQueryMode.DEFAULT is supported — MMR / SVM / hybrid modes need access to full-precision vectors which turbovec discards after quantization. Maintain a parallel store with full vectors if you need a non-default scoring mode. What it means
TurboQuantVectorStore only supports VectorStoreQueryMode.DEFAULT (top-k similarity). Modes like MMR, SVM, LINEAR_REGRESSION, and HYBRID need full-precision vectors, which quantization discards, so the store raises loudly instead of silently degrading to DEFAULT search.
Source
Thrown at turbovec-python/python/turbovec/llama_index.py:795
# must be present in the metadata value (which is typically
# a list — tag-set matching).
return all(t in value for t in target)
if op == FilterOperator.ANY:
return any(t in value for t in target)
raise NotImplementedError(
f"filter operator {op!r} not supported by TurboQuantVectorStore"
)
def query(self, query: VectorStoreQuery, **_: Any) -> VectorStoreQueryResult:
# MMR / SVM / LINEAR_REGRESSION / HYBRID etc. all need access to
# full-precision vectors (for pairwise diversity, learned scoring,
# or sparse-dense fusion). turbovec discards full precision after
# quantization, so any non-DEFAULT mode is unsupportable here.
# Raise loudly instead of silently treating it as DEFAULT, which
# the previous impl did and which let callers think they were
# getting e.g. MMR diversity when they were not.
if query.mode != VectorStoreQueryMode.DEFAULT:
raise NotImplementedError(
f"TurboQuantVectorStore does not support query mode "
f"{query.mode!r}. Only VectorStoreQueryMode.DEFAULT is "
"supported — MMR / SVM / hybrid modes need access to "
"full-precision vectors which turbovec discards after "
"quantization. Maintain a parallel store with full vectors "
"if you need a non-default scoring mode."
)
if query.query_embedding is None:
raise ValueError(
"TurboQuantVectorStore requires a pre-computed query_embedding "
"(is_embedding_query=True)."
)
qvec = np.asarray(query.query_embedding, dtype=np.float32)
if qvec.ndim == 1:
qvec = qvec[None, :]
# Cosine mode: normalize the query so the raw inner product
# against unit node vectors is true cosine similarity.
if self._similarity == COSINE:View on GitHub (pinned to ccab9f325e)
Solutions
- Remove the query_mode setting so the retriever uses DEFAULT
- Maintain a parallel full-precision store (e.g. SimpleVectorStore) for non-default query modes
- Implement MMR-style reranking yourself on the DEFAULT results
Example fix
// before retriever = index.as_retriever(vector_store_query_mode="mmr") // after retriever = index.as_retriever() # DEFAULT mode
Defensive patterns
Strategy: validation
Validate before calling
from llama_index.core.vector_stores.types import VectorStoreQueryMode
if q.mode != VectorStoreQueryMode.DEFAULT:
raise ValueError(f"TurboQuantVectorStore supports only DEFAULT, got {q.mode}") Try / catch
try:
result = store.query(q)
except NotImplementedError as e:
if "query mode" in str(e):
q.mode = VectorStoreQueryMode.DEFAULT
result = store.query(q)
else:
raise Prevention
- Never set vector_store_query_mode on retrievers backed by this store
- Keep turbovec-backed indexes and full-precision indexes separate per use case
- Document that quantized stores are DEFAULT-mode only in team guidelines
When it happens
Trigger: Calling query() with VectorStoreQuery(mode=VectorStoreQueryMode.MMR/SVM/HYBRID/...) — typically via retrievers configured with vector_store_query_mode set.
Common situations: Configuring a retriever with query_mode="mmr" for diversity; hybrid search recipes ported from other stores; accidentally inherited retriever settings.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- TurboQuantVectorStore.get(text_id) cannot return the origina
- filter condition {condition!r} not supported by TurboQuantVe
- filter operator {op!r} not supported by TurboQuantVectorStor
- duplicate node_id {dup!r} appears multiple times in the inpu
- TurboQuantVectorStore requires a pre-computed query_embeddin
AI-assisted analysis of RyanCodrai/turbovec@ccab9f325e (2026-09-06).
Data as JSON: /api/errors/a71bfeef84c1cac0.
Report an issue: GitHub.