Task prefixes for embedding: pair SearchQuery with Document for retrieval

tomaarsen · x · 2026-10-07

Text inputs to Google's new embedding model use task prefixes: SearchQuery, QuestionAnswering, CodeRetrieval, Classification, Clustering and more. For retrieval, pair the query with SearchQuery and corpus text with Document (which adds "title: none"—format real titles manually; no prefix for media). Dimension tradeoff: 128d gives 6x smaller vectors but MMEB v2 drops from 59.01 at 768d to 45.65; the card positions 128d for text-only, while 256d loses far less for mixed modalities.

Original post →

More from Multimodal

Multimodal channel →