Skip to content
mentoor

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?

Choose one answer

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

  1. 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.
  2. 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.
  3. 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.
  4. 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?

Choose one answer

Check yourself · 3 of 3

You upgrade the embedding model for new images only and keep old vectors. What is the risk?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic