Deep expertise in Marqo — end-to-end vector search with embedding inference baked in, ONNX/GPU acceleration, and ecommerce-specialized models. Use when implementing vector search, embeddings storage, or similarity queries with marqo.
Installs into .claude/skills of the current project.
Are you the author of Marqo Expert?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-marqo-expert)
---
name: marqo-expert
description: Deep expertise in Marqo — end-to-end vector search with embedding inference baked in, ONNX/GPU acceleration, and ecommerce-specialized models. Use when implementing vector search, embeddings storage, or similarity queries with marqo.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: vector-stores
tags: [vector-db, marqo, embeddings, onnx, multimodal, ecommerce-search]
---
# Marqo Expert Mode
You are an expert in Marqo — the open-source vector search engine that ships embedding inference *inside* the database. You design indexes with model selection at create time, ingest documents that are embedded server-side (text, images, multi-field), and run hybrid + tensor search without orchestrating a separate embedding service.
## Core Capabilities
- Indexes that bind one or more models at create time (text, image, multi-modal)
- Server-side embedding inference with ONNX runtime, CPU + GPU, batching
- Multi-modal indexes: combine text + image fields into one tensor representation
- Specialized ecommerce models (`Marqo-Ecommerce-B`, `Marqo-Ecommerce-L`, ViT-B-16-SigLIP-derived)
- Tensor search: chunk documents into vector arrays, search with `searchableAttributes`
- Hybrid search blending lexical (BM25) and vector scoring with weights
## Index/Storage Internals
Marqo wraps an OpenSearch backend (Vespa-backed in newer versions) and adds an inference layer. Models are downloaded at index creation, kept resident for low-latency embedding. The "tensor" search mode chunks long documents and stores per-chunk vectors; queries are scored by the best-chunk match.
Inference modes:
- `cpu` — default, ONNX-quantized
- `cuda` — GPU pinned, large batch sizes
- `MARQO_ENABLE_BATCH_APIS=true` for high-throughput servers
## Query Patterns
### Create index with model and chunking
```python
import marqo
mq = marqo.Client(url="http://localhost:8882")
mq.create_index(
"products",
model="hf/e5-base-v2", # any HF / OpenCLIP / Marqo model
treat_urls_and_pointers_as_images=True,
image_preprocessing={"patch_method": "frcnn"}, # region-aware image embeds
text_preprocessing={
"split_length": 2,
"split_overlap": 0,
"split_method": "sentence",
},
ann_parameters={
"space_type": "prenormalized-angular",
"parameters": {"ef_construction": 256, "m": 32},
},
)
```
### Ecommerce multi-modal index
```python
mq.create_index(
"shop",
settings_dict={
"type": "structured",
"model": "Marqo/marqo-ecommerce-embeddings-L",
"all_fields": [
{"name": "title", "type": "text", "features": ["lexical_search"]},
{"name": "description", "type": "text"},
{"name": "image_url", "type": "image_pointer"},
{"name": "price", "type": "float", "features": ["filter"]},
{"name": "_multi_text_image", "type": "multimodal_combination",
"dependent_fields": {"title": 0.4, "description": 0.3, "image_url": 0.3}},
],
"tensor_fields": ["_multi_text_image"],
},
)
```
### Ingest (server embeds for you)
```python
mq.index("shop").add_documents(
documents=[
{
"_id": "sku-001",
"title": "Mid-century lounge chair",
"description": "Walnut frame, brass legs.",
"image_url": "https://cdn.example.com/chair.jpg",
"price": 1299.0,
},
],
client_batch_size=64,
tensor_fields=["_multi_text_image"],
)
```
### Hybrid search (BM25 + tensor)
```python
results = mq.index("shop").search(
q="walnut accent chair under 1500",
search_method="HYBRID",
hybrid_parameters={
"retrievalMethod": "disjunction", # union of both
"rankingMethod": "rrf", # or weightedSum
"alpha": 0.6, # tilt toward vector
"rrfK": 60,
},
filter_string="price:[* TO 1500]",
limit=20,
attributes_to_retrieve=["title", "price", "image_url"],
)
```
### Image-as-query
```python
mq.index("shop").search(
q={"https://cdn.example.com/query.jpg": 1.0,
"modern minimalist style": 0.3}, # weighted multimodal query
limit=10,
)
```
## Performance Tuning
- Pre-pull models with `MARQO_MODELS_TO_PRELOAD` to avoid first-query lag
- Run on `cuda` for > 100 docs/sec ingest of multi-modal content
- Set `client_batch_size` to fit a GPU batch (16-128 typical)
- For ecommerce, `marqo-ecommerce-embeddings-L` improves nDCG@10 ~67% over generic CLIP
- Use structured indexes (with explicit field types) over unstructured for filter speed
- Disable image preprocessing patches (`frcnn`) when product images are clean cutouts
## Common Pitfalls
- Mixing `tensor_fields` and lexical search expectations — only `features=["lexical_search"]` fields BM25
- Sending image URLs without `treat_urls_and_pointers_as_images=True` — stored as text
- Changing model after create — requires reindex, no in-place swap
- Long documents without `text_preprocessing.split_*` — single huge chunk loses precision
- Hybrid `weightedSum` without normalized scores — tilts arbitrarily; prefer `rrf`
- Running CPU-only with large CLIP models — latencies in seconds
## When to Use This Mode
- You don't want to operate a separate embedding service (Cohere/OpenAI/your own GPUs)
- Ecommerce or product search where multi-modal (image + text) recall matters
- Want one binary that does ingest + embed + index + search + hybrid
- Teams without ML infra who still need SOTA retrieval quality
- Privacy / sovereignty constraints — inference stays inside your network
## Sources
- Marqo GitHub: https://github.com/marqo-ai/marqo
- Marqo docs (PyPI): https://pypi.org/project/marqo/
- Marqo V2 perf blog: https://www.marqo.ai/blog/marqo-v2-performance-at-scale-predictability-and-control
- Ecommerce models: https://github.com/marqo-ai/marqo-ecommerce-embeddings
- Multimodal personalization: https://www.marqo.ai/blog/context-is-all-you-need-multimodal-vector-search-with-personalization