Topic 1 of 5 · 4 min read
Multimodal embedding models for images and text
Goal: Choose a multimodal embedding model for an image search feature and name the query types it will handle poorly.
A multimodal embedding model maps images and text into the same vector space, so a text query can retrieve images by nearest-neighbour search. CLIP started this approach: an image encoder and a text encoder trained together so that a photo and its caption land close to each other.
Check yourself · 1 of 3
What does a CLIP-style model let you do?
Why it matters
If you build search over product photos, a support-ticket screenshot library or a media archive, you need to know what the vectors actually capture. A model that finds "red running shoes" reliably may still fail on "the receipt dated 3 May". Picking the model without testing these query types is how an image search ships and then disappoints.
How to choose
- List the real queries. Pull 50 to 100 from logs or from the people who will search. Group them: objects and scenes, style and mood, text in the image, counts and spatial relations, exact identifiers.
- Pick candidates. An open-weight CLIP-style model you host yourself, or a hosted multimodal embedding API such as Voyage, Cohere or Gemini embeddings. Compare input limits, image size handling, price per image, vector size and whether you can run it where your data must stay.
- Embed once, query many times. Store image vectors in your vector index. Embed the query text at search time with the same model. Mixing models between index and query gives nonsense scores.
- Test per query type, not one overall score. See the measuring-recall topic.
What these models do well and badly
They capture objects, scenes, colour, style and general meaning well. They are weak at small text inside an image, counting ("three chairs"), precise spatial relations ("cup left of the laptop"), negation ("no people") and fine differences between near-identical items. The CLIP paper itself reports weak results on counting-style and fine-grained tasks.
Before and after
Before: a team embeds 20,000 invoice scans with a CLIP-style model and a search for "invoice 48213" returns random invoices, because the number is small text the model barely encodes.
After: the team keeps the image embeddings for "find invoices that look like this" and adds OCR text with keyword search for identifiers. Each query type goes to the method that can answer it.
What goes wrong
- Trusting a demo on clean stock photos. Your images are screenshots, scans or low-light shots.
- Switching the embedding model later without re-embedding the whole library. The old and new vectors are not comparable.
- Treating a similarity score as confidence. Nearest neighbours always exist, even when nothing relevant is in the index.
Examples
Query types for a furniture catalogue
| Query | Embeddings alone |
|---|---|
| "mid-century walnut sideboard" | Works: style and material |
| "sofa with three cushions" | Unreliable: counting |
| "model KX-220 label" | Fails: small text, use OCR |
| "chairs but not armchairs" | Unreliable: negation |
The table is the test plan: five queries per row decide which rows need a second method.
Key points
- A multimodal embedding model places images and text in one space, so one index can answer text queries over images.
- Index and query must be embedded with the same model, and changing the model means re-embedding everything.
- These models are strong on objects, scenes and style, and weak on small text, counts, spatial relations and negation.
- Choose a model by testing it on your own query types, grouped by type, not on a generic benchmark number.
- A nearest neighbour is always returned, so a high rank does not mean the result is relevant.
Common mistakes
- Judging a model from the vendor's demo images instead of a sample of your own library.
- Mixing image vectors from one model with query vectors from another after an upgrade.
- Expecting an image embedding to read the text on a screenshot or a label.
- Reporting one overall accuracy figure that hides the query types that fail.
Check yourself · 2 of 3
Which query is a multimodal embedding model most likely to handle poorly?
Check yourself · 3 of 3
You upgrade the embedding model for new images only and keep old vectors. What is the risk?
Practice items, not counted towards your mastery.
Start here
- ColPali: Efficient Document Retrieval with Vision Language Models (opens in a new tab)PaperFree
Introduces retrieval over page screenshots and the ViDoRe benchmark, with the case against parse-then-chunk pipelines.
- Learning Transferable Visual Models From Natural Language Supervision (CLIP paper) (opens in a new tab)PaperFree
The paper behind shared image and text vector spaces, including its stated weak spots such as counting and fine detail.
- ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT (opens in a new tab)PaperFree
Defines late interaction: one vector per token and a max-similarity score, the idea ColPali applies to image patches.
More for this topic
- Multimodal embeddings (Voyage AI docs) (opens in a new tab)DocsFree
Shows a hosted model that embeds text, images and screenshots into one space, with input limits and usage.
- Image similarity with Hugging Face Datasets and Transformers (opens in a new tab)ArticleFree
A short runnable walk-through of embedding images and finding nearest neighbours.