The Met Search Lab Technical Guide
The Met Search Lab is a working technical reference for The Met's collection-search approach. Rather than publishing the production application code, the lab provides a reproducible environment for inspecting, comparing, and adapting its search architecture.
It documents keyword retrieval, generated visual evidence, embeddings, hybrid scoring, semantic thresholds, and collection-navigation facets over roughly 11,000 Open Access Met objects.
AI coding agents helped build the project, including this technical guide, under human direction, review, and validation. See About This Guide for the disclosure and usage boundary.
Production, Lab, And Experimental Scope
The guide distinguishes the documented production approach, the current public lab default, and options exposed specifically for experimentation. The lab reproduces architectural decisions rather than the complete production application, evidence set, or undistributed prompts.
| Area | Documented Production Approach | Public Lab Default | Experimental Options |
|---|---|---|---|
| Collection scope | 536,294 object records, with embeddings for roughly 360,000 objects that have images. | A reproducible sample of roughly 11,000 Open Access Met objects. | Drawn from the same lab corpus so search variants can be compared on shared collection evidence. |
| Generated visual evidence | The Met's internal Agentic Vision v4 visual-description generator; the exact production prompt is not distributed here. | The Medium field from the public visual-description-lengths-v1 generator. | Short and Long compressions from the same visual reading. |
| Text embedding | Gemini Embedding 001 at 768 dimensions. | Medium Visual Description with Gemini Embedding 001 at 768 dimensions. | Short, Medium, and Long descriptions with Gemini Embedding 001 or Gemini Embedding 2. |
| Query embedding cache | Upstash Redis caches embeddings for normalized query text so repeated Semantic and Hybrid queries can reuse a compatible vector. | No cross-request query-embedding cache; the API generates a live vector unless the request supplies one. | Measure cache hit rate, provider latency, and end-to-end latency separately from Elasticsearch took. |
| Direct image embedding | Outside the production recipe documented by this lab. | Not part of the default search variant. | Gemini Embedding 2 at 768 or 3072 dimensions, plus OpenAI CLIP ViT-L/14 at 768 dimensions. |
| Vector execution | Exhaustive script-score cosine comparison across the eligible vector-bearing scope. | The same script-score execution; approximate kNN is documented but not implemented. | Alternate evidence, dimensions, thresholds, and weights within the same execution model. |
| Hybrid defaults | 50% saturated BM25, 50% thresholded semantic evidence, with similarity calibrated to 0.65. | The same 50 / 50 weights and a 0.65 starting threshold, with disjunctive facets. | Adjustable keyword balance, minimum similarity, generated keyword evidence, and fuzziness. |
Overview
Each search variant can use keyword search, semantic search, or a hybrid of both.
Keyword
Keyword search over object catalog metadata. Use it when you know the words likely appear in the record and/or want interpretable results.
Semantic
Looks for artworks that are visually or conceptually similar to the meaning of your query. Use it for visual or descriptive queries or when exact words may not appear.
Hybrid
Combines keyword and semantic evidence so literal matches and broader recall work together. Use it when you want keyword evidence to anchor results while semantic search broadens recall.
From collection object to search result
Elasticsearch stores the Met object record, generated text such as visual descriptions, and embeddings derived from generated visual descriptions or images. The pipeline first prepares that evidence for the index, then combines it at search time to produce ranked results and navigable filter counts.
1 · Build and index collection evidence
Run when collection evidence is prepared.
Inputs
Collection record + image
Prepare
Complementary evidence
Represent
Embedding models
Catalog and generated text also remain searchable without embedding.
Index
Elasticsearch object document
Human editorial review path
Human review can identify recurring errors and omissions, refine the prompt, and trigger regeneration. The live lab does not currently require per-description approval before indexing.
2 · Search and navigate the collection
Run for each visitor query.
Request
User query + filters
Retrieve
Parallel evidence
Rank
Execute + fuse
Respond
Results + navigation
Replicate The Met Approach
script_score query, not a kNN candidate pool. Hybrid search combines saturated BM25 and thresholded cosine similarity with fixed 0.5 / 0.5 weights. Semantic-only search uses the same vector clause with semantic weight 1. The production similarity threshold is 0.65. That threshold was calibrated for the specific embedding strategy used in production, not as a portable default. Test a representative query set and choose an acceptable relevance–recall tradeoff whenever the embedding model, dimensions, or embedded content changes.The live lab keeps The Met's script-score execution and 50 / 50 hybrid weights, while its default evidence recipe is intentionally simplified. A Lab default badge marks the active Medium Visual Description recipe; changing one of its settings removes the badge.
1. Prepare complementary evidence
Keep concise catalog metadata as the primary literal signal. Generate an objective visual description for each artwork image, then embed that description as the semantic signal. The production pipeline currently uses The Met's internal Agentic Vision v4 visual-description generator and a 768-dimensional Gemini text embedding. This public lab instead defaults to the Medium field from its reproducible visual-description generator. The internal v4 strategy remains documented as the historical production-aligned baseline used to calibrate the completed study, but it is not an active search option or field in the current lab index.
Use the same embedding model, dimensions, normalization, and task conventions for indexed documents and live queries. Store the model and source-text version with each vector so a reindex cannot silently mix incompatible embeddings.
2. Map the vector field
Set index: false because script score reads stored vector values directly and does not need an approximate vector index. The lab indexer also excludes embeddings from _source to avoid retaining and returning large arrays there; scripts can still access the vector values.
{
"mappings": {
"_source": {
"excludes": ["embeddings.*"]
},
"properties": {
"embeddings": {
"properties": {
"embedding__visual_description_lengths_v1_medium_gemini_768": {
"type": "dense_vector",
"dims": 768,
"index": false
}
}
}
}
}
}3. Build a complete match universe
The lexical clause saturates BM25 with score / (score + 8). The vector clause rejects documents below the similarity threshold, rescales the remaining cosine range to 0–1, and applies its weight. A bool.should union means a document can enter through either literal or semantic evidence.
Abridged structural example: the production and lab implementations use the larger field set documented below, plus eligibility and facet clauses appropriate to their collections.
{
"query": {
"bool": {
"should": [
{
"script_score": {
"query": { "multi_match": { "query": "<query>", "fields": ["title^4", "artistDisplayName^3", "medium^1.5"] } },
"script": {
"source": "(_score / (_score + params.saturation_k)) * params.weight",
"params": { "saturation_k": 8, "weight": 0.5 }
}
}
},
{
"script_score": {
"query": { "bool": { "filter": [{ "exists": { "field": "embeddings.embedding__visual_description_lengths_v1_medium_gemini_768" } }] } },
"script": {
"source": "double c = cosineSimilarity(params.vector, 'embeddings.embedding__visual_description_lengths_v1_medium_gemini_768'); if (c < params.threshold) return 0; return ((c - params.threshold) / (1 - params.threshold)) * params.weight;",
"params": { "vector": "<query vector>", "threshold": 0.65, "weight": 0.5 }
},
"min_score": 0.000001
}
}
],
"minimum_should_match": 1
}
}
}Elasticsearch documents the per-match scoring and linear vector scan behavior in its script-score query reference.
Put collection-wide hard constraints—rights, publication state, date bounds, or mandatory AND filters—inside both scoring clauses. Keep ordinary navigational facet selections out of the base query so aggregations can still calculate alternatives.
4. Add disjunctive facets
Elasticsearch calculates the scored query first, aggregations second, and post_filter last. Apply every selected facet to returned hits in the post-filter. For each facet aggregation, apply all selected facets except that facet itself. This is AND across facets and, in a multi-select interface, normally OR within one facet.
{
"aggs": {
"department": {
"filter": {
"bool": {
"filter": [
{ "term": { "classification.keyword": "Paintings" } },
{ "term": { "isHighlight": true } }
]
}
},
"aggs": {
"values": {
"terms": {
"field": "department.keyword",
"size": 50,
"show_term_doc_count_error": true
}
}
}
}
},
"post_filter": {
"bool": {
"filter": [
{ "term": { "department.keyword": "European Paintings" } },
{ "term": { "classification.keyword": "Paintings" } },
{ "term": { "isHighlight": true } }
]
}
}
}Repeat that filtered aggregation for every facet. Preserve selected values with an explicit filter bucket when they may fall outside the top terms. In a multi-shard index, inspect doc_count_error_upper_bound; script score gives a complete query match universe, but a distributed terms aggregation can still report bounded bucket-count error. The lab index uses one shard, so its local terms counts report an error bound of zero. See Elasticsearch’s post-filter guide and terms aggregation count-error guidance.
5. Benchmark before production
Vector functions in script score linearly scan the documents admitted by each clause. Disjunctive facets deliberately keep navigational filters out of the scored query, so they can cost more than a query that pushes every selected facet into the vector filter. Measure empty, broad, and narrow queries against the full collection, with production shard counts and concurrent traffic.
Start with similarity-threshold and relevance evaluation, then measure latency. If your institution prototypes kNN separately, compare it only after the exhaustive script-score baseline is stable: its bounded top-k window is not a substitute for complete collection-navigation counts.
Keyword Search
Keyword search is lexical search: it ranks documents by matching the words in your query against indexed text fields. Elasticsearch scores those matches with BM25, a relevance formula that rewards query words appearing in a document while accounting for field length and term frequency.
Multi-word queries use a minimum-match rule: two terms must both match, three to five terms may miss one term, and longer queries must match 75% of terms. Adjacent phrase matches still get a smaller boost, so phrases like pink textile are treated as phrase intent without overwhelming the term match.
Optional fuzzy keyword matching is conservative: one-to-five-character terms get no edits, six-to-ten get one edit, and longer terms get two edits. That keeps short-name searches like monet from drifting into broad typo expansions.
Queries that look like accession numbers, such as 1979.486, are boosted heavily for exact accession matches and can also match by prefix.
Keyword Fields And Weights
The list below is sorted by effective boost, not by source-code declaration order.
title^4artistDisplayName^3objectName^2.5constituents.name^2classification^2medium^1.5tags.term^1.5culture^1.25period,dynasty,reign,artistNationality, andportfoliodepartment^0.75,country^0.75region^0.5,city^0.5creditLine^0.25
The ^ number is a boost. Higher numbers make a match in that field count more. For example, a title match matters much more than a credit-line match.
Each metadata field searches both a stemmed English-analyzed version, such as title.en, and a lower-weight raw text version, such as title.
Fuzzy keyword matching is on by default for minor spelling mistakes. It uses a conservative prefix and edit-distance window so a query like qumrat can recover a close spelling such as qumran without drifting into broader neighbors like quart. Turn it off when you want stricter keyword comparisons.
Visual descriptions
medium_description^0.5
Generated-field boosts are intentionally modest. Generated visual descriptions help recall visual subjects that are missing from museum metadata, but concise museum fields should still anchor keyword ranking.
Semantic Search
Semantic search turns your query into an embedding and compares it with stored artwork embeddings. Instead of requiring the same words to appear in the object record, it looks for objects that are close to the meaning or visual idea of the query.
This is useful for descriptive searches like person looking into a mirror, scene searches like sparsely furnished interior, or subject searches where catalog metadata may not use the words you typed.
The semantic side depends on the selected embedding strategy, which controls whether the search uses generated-description vectors or image-only vectors. Min similarity controls how strict the semantic match must be before a result is shown.
Semantic variants always use script score, evaluating the similarity threshold across the complete eligible vector-bearing query scope. Their variants can still compare embeddings, thresholds, filters, generated evidence, and other settings within that exhaustive execution model.
Embeddings can also support cross-language searches because the query and indexed artwork evidence are compared by meaning rather than by shared words. That is why queries such as floresor 猫 can retrieve visually relevant objects even when the catalog text is in English.
Hybrid Search
Hybrid search combines keyword and semantic retrieval. It is useful when you want literal catalog evidence to anchor the ranking while still allowing semantic search to find visually or conceptually relevant objects that use different words.
Hybrid variants always use a plain script-score query that combines a saturated BM25 keyword clause with a thresholded cosine-similarity clause. It is more expensive than approximate retrieval, but it gives Elasticsearch a complete hybrid match set for collection navigation.
How script score differs from other fusion approaches
The lab implements only script score, but Linear and RRF are useful reference points when evaluating another architecture. Script score combines fixed transformed scores across the complete query scope. Linear generally combines scores normalized relative to bounded keyword and kNN windows; RRF combines rank positions instead of raw scores. A 50 / 50Linear sum therefore is not equivalent to this project's fixed 50 / 50 script-score formula.
Script score
Fixed score scales
Keyword evidence
score / (score + 8).Semantic evidence
0.65, then rescale the surviving range to 0–1.What matters: match strength across the complete query scope.
Linear retriever
Window-relative score scales
Keyword evidence
Semantic evidence
What matters: match strength relative to each bounded result window.
RRF retriever
Rank positions, not score scales
Keyword evidence
Semantic evidence
2/62Ranked #1 in one list:
1/61What matters: agreement across the two lists; their raw score scales are ignored.
Elasticsearch describes Linear as a weighted sum of normalized child-retriever scores and RRF as a sum of reciprocal-rank contributions. See the Linear retriever reference and RRF retriever reference. For the broader execution tradeoff and the HNSW and DiskBBQ controls, see Elastic's kNN search documentation.
Approximate kNN contributes a bounded top-k semantic result set rather than every object above a semantic threshold. For HNSW-backed fields, num_candidates sets how many nearest neighbors each shard gathers before the top k is chosen. Raising it improves recall, which can change which documents make the top k and, when the similarity cutoff leaves fewer than k, find more that qualify, but the top k remains the limit. k cannot exceed num_candidates, which is capped at 10000. DiskBBQ instead exposes visit_percentage. kNN's own similarity parameter can only remove documents from that top k. Aggregations therefore count at most k semantic matches (globally for a top-level knn search, per shard for a knn query), not every collection object that might satisfy a semantic threshold. Disjunctive hybrid retrieval adds every keyword match: a query beside top-level knn, or knn and keyword queries as bool should clauses with minimum_should_match: 1. Combining them under bool mustcounts only their intersection. With RRF, aggregations likewise cover every child retriever's matches; rank_window_size limits ranking and paging, not aggregations. A separate keyword aggregation cannot repair the gap because it cannot count semantic-only matches. Script score evaluates the semantic threshold in the query itself, so aggregations can count keyword matches plus semantic matches in one query context.
The primary variant's hits and shared filter counts therefore come from the same script-score or keyword request. There is no secondary aggregation query, top-k window count, or cross-variant bucket merge.
The tradeoff is that script score scans matching vector-bearing documents instead of using the approximate nearest-neighbor index. This is reasonable for the default 768-dimensional embedding strategy, but higher dimensional strategies should be treated as benchmark targets before relying on them for broad script-score comparisons.
Script score compared with approximate kNN
Neither execution strategy is universally better. Script score buys a complete, threshold-defined search universe for navigation; kNN buys efficient top-neighbor retrieval. Choose against the product requirement, then benchmark with the institution's own index, filters, traffic, and hardware.
| Consideration | Script score | Approximate kNN |
|---|---|---|
| Search scope | Evaluates every eligible vector-bearing document in the query scope, alongside the keyword matches in hybrid search. | Uses an indexed approximate-nearest-neighbor structure to retrieve a bounded top-k result set. |
| Facet counts | Aggregations run over the complete threshold-defined match set, enabling disjunctive collection navigation. | Aggregations describe the bounded top-k result set, not every document that could pass a semantic threshold. |
| Latency and compute | Does per-document vector scoring, so cost grows with eligible vector documents, vector dimensions, and concurrent traffic. | Usually much faster for top-neighbor retrieval; k bounds results, while index-specific search controls tune speed and recall. |
| Vector index | Reads non-indexed dense vectors and does not require the memory, storage, or construction cost of an approximate vector index. | Requires indexed vectors and pays the costs of an approximate structure such as HNSW or DiskBBQ. |
| Hybrid ranking | Makes the lexical saturation, cosine threshold, and weights explicit in one scored query. | Works well with Linear or RRF fusion, but the result depends on k, rank windows, and fusion settings. |
| Good fit | Collection discovery where complete, navigable facet counts matter and the measured response time meets the product requirement. | Large-scale or high-throughput retrieval where low latency and the best top results matter more than a complete semantic facet universe. |
The primary reason was accurate facet counts. In production-scale tests of approximate kNN, num_candidates was set to the Elasticsearch maximum of 10000 with a 0.65similarity threshold, and kNN was combined with BM25 keyword retrieval. Facet counts still covered only kNN's top-k semantic results plus keyword matches, and semantic results ran out after a few pages, so the counts were exploratory rather than complete. Script score counts every eligible object above the threshold.
The Met's collection search covers 536,294 object records. Roughly 360,000 of them have images and therefore embeddings, so only those are eligible for semantic matching. Earlier production-scale testing on a smaller, slower deployment found script score materially slower than kNN and approaching 10× the latency of plain BM25. That test established the relative compute tradeoff, not a durable latency baseline. Production now runs on a larger guaranteed-CPU deployment, where observed responses are materially faster.
Document count alone is not the decision boundary: Elasticsearch deployments can be sized for collections in the millions. What matters for script score is the eligible vector-bearing scope, dimensions, filters, concurrency, and hardware. End-to-end latency also depends on request mix, cache state, and time spent outside Elasticsearch. More compute and an appropriate shard layout can add headroom, but each institution should load-test its own query mix and set a latency budget before choosing this tradeoff. These Met observations are workload-specific, not a general benchmark or a promise of one fixed response time.
Production also uses Upstash Redis to cache query embeddings by normalized query text. Once a common Semantic or Hybrid query is cached, the application can reuse its compatible vector instead of calling the embedding provider again. A warming cache can therefore materially reduce end-to-end latency for repeated queries, while new or uncommon queries still pay the provider cost. This optimization does not make Elasticsearch script_score faster and is not reflected in Elasticsearchtook; measure cache hit rate, embedding time, and search time separately.
Use hybrid for searches like pink textile, woman and child, or ship in a storm, where catalog metadata and visible description can both carry useful evidence.
post_filter. Each facet count applies all other selected facets but excludes itself, so selecting a Department narrows Classification counts while Department continues to show alternatives. The lab's single shard gives returned terms buckets an error bound of zero; multi-shard terms aggregations still require their own count-error analysis.Embeddings
An embedding is a numeric representation of text, an image, or both. Similar meanings or visual patterns end up near each other in vector space, which lets semantic search retrieve objects even when the query and catalog record do not share exact words.
Semantic and hybrid variants search one stored vector field at a time in Elasticsearch.
Google's published dimension results show why 768 is a practical default: its MTEB score is 67.99, only 0.18 points below the best listed score, while using one-quarter as many raw vector values as 3072 dimensions. See the official Gemini Embeddings documentation.
| Dimensions | MTEB score | Raw vector values vs. 3072 |
|---|---|---|
| 2048 | 68.16 | 67% |
| 1536 | 68.17 | 50% |
| 768 | 67.99 | 25% |
| 512 | 67.55 | 17% |
| 256 | 66.19 | 8% |
| 128 | 63.31 | 4% |
The percentages compare raw vector length, not total Elasticsearch index storage, which also includes document and mapping overhead; an approximate-search design would add vector-index overhead as well. MTEB is a broad text-embedding benchmark rather than a museum-search relevance test, and Google's dimension table does not report a separate 3072 score; institutions should still evaluate dimensions with their own collections and queries.
Text Embeddings
Text embeddings represent generated visual descriptions or composed metadata as vectors. They are useful when generated text captures visible subjects, style, composition, or context that users may search for.
Each Short, Medium, and Long description is available through two parallel embedding strategies: Gemini Embedding 001 and Gemini Embedding 2 at 768 dimensions. Hold the model fixed to compare description length, or hold the description field fixed to compare the two models. Their vector spaces are incompatible, so every stored document vector is queried with its matching model and retrieval format.
Google's model lifecycle table lists Gemini Embedding 2 as the recommended replacement for Gemini Embedding 001. The lab keeps the existing 001 strategies and default intact so the new vectors can be evaluated in parallel before any migration decision.
Embeds only the 15–35-word output.short_description from the shared Long-to-Medium-to-Short response.
Embeds only the 50–150-word output.medium_description. This is also the one generated field shared by all three variants on the hybrid keyword side.
Embeds only the detailed 150–300-word output.long_description from the same Gemini response.
Image Embeddings
Image embeddings represent object images directly. They can help with visual queries where the best evidence is in the image rather than the written record.
The current multimodal model used here is Gemini Embedding 2, which maps text and images into a shared embedding space. The app indexes the same image-only input at 768 and 3072 dimensions. Live text queries use the model's search-query prompt formatting, and hybrid keyword evidence still comes from the shared Medium description. The historical baseline uses a pinned OpenAI CLIP ViT-L/14 checkpoint locally for image vectors and Replicate for matching raw-text query vectors. Because CLIP cosine scores occupy a different range, selecting it applies its calibrated 0.225 default threshold; explicit threshold edits still take precedence.
Embeds only the primary view, preferring primaryImageSmall and falling back to primaryImage. additionalImages, generated text, and catalog metadata are not included.
Uses the same primary-only image input as the 768-dimensional version, but stores the full 3072-dimensional Gemini Embedding 2 vector.
Uses the same primary-only image input with the original OpenAI CLIP ViT-L/14 checkpoint through local Transformers/MPS. Replicate supplies matching live text-query vectors. Raw 768-dimensional vectors are normalized before cosine search. Its calibrated default similarity threshold is 0.225.
Why Embed Generated Descriptions?
A generated description inserts an inspectable textual representation between an artwork image and its retrieval vector. That intermediate layer changes what can be understood, governed, reused, and tested even when the final text embedding is still a learned and imperfect representation.
Direct image embedding
image → opaque vector representation
Generated-description embedding
image → inspectable description → vector representation
Inspectable, governable evidence
Descriptions can be reviewed, corrected, regenerated, and versioned. Prompts and descriptive policies can constrain which claims and terminology become explicit search evidence, making errors and omissions easier to locate and repair.
Natural-language alignment
A vision-language model can verbalize visible actions, positions, relationships, materials, and forms that a text embedding can match compositionally. The generation prompt also controls which level of visual abstraction the representation emphasizes.
Reusable retrieval evidence
One durable description can contribute modestly to BM25 and be re-embedded with later text models without repeating visual inference over the collection. This separates visual interpretation from the retrieval model and can simplify future migrations and reindexing.
Controlled comparison
Hold a description constant while changing embedding models, or hold the embedding model constant while changing description length. The lab supports both comparisons, making retrieval differences easier to attribute.
Direct image embeddings may respond to sensitive, derogatory, sexualized, or socially charged query language through model associations even when nobody explicitly assigned those terms to an artwork. Generated descriptions create a boundary where an institution can inspect and constrain the language supplied to the text embedder, but they do not eliminate bias or prevent that embedder from learning related associations.
Descriptions also discard information. Direct image embeddings can retain incidental details, color relationships, texture, composition, and other evidence that no description verbalized. Generated descriptions trade some visual completeness for interpretability, controllability, and natural-language alignment; image embeddings provide a richer, less mediated but less inspectable visual representation. The lab exposes both so that tradeoff can be evaluated rather than assumed.
AI Generation
The Met Search Lab uses AI-generated text to make parts of the collection searchable in ways that catalog metadata alone may not support. For selected Open Access objects, the pipeline generates structured descriptions from object images and metadata, then stores that generated text alongside the original Met object record.
The generated visual descriptions in this lab are produced by vision-language models. The current prompts use Agentic Vision in Gemini 3 Flash, a capability that combines visual reasoning with code execution so the model can zoom, inspect, and ground answers in visual evidence.
Description Principles
Each description is the result of a prompt that asks the model to look carefully and report what it sees. We strive for objective, useful visual description while recognizing that every description involves choices about what to notice, name, order, and omit. The prompts try to make those choices explicit and conservative rather than pretending that generated language is neutral.
Visible Evidence First
The model is asked to describe what is visibly present: form, subject matter, composition, materials, colors, decoration, surface, condition, and distinctive details. Metadata may help disambiguate visible features, but it should not add unseen history, biography, maker knowledge, or symbolic meaning.
Structured Looking
Descriptions start with the object type or main visual form, then move through important visible content and details in a consistent spatial order. This follows the same general discipline encouraged by museum image-description practice: begin with what matters most, then branch outward without creating spatial confusion.
Plain, Searchable Language
Concrete nouns and visually justified terms are preferred over broad summaries or specialist language. The descriptions include enough detail to support search queries such as materials, objects, figures, settings, colors, and spatial relationships, while avoiding prose that reads like interpretation or evaluation.
Responsible Limits
Prompts discourage subjective judgment, emotional diagnosis, social assumptions, and claims about race, ethnicity, nationality, religion, identity, or narrative significance unless they are visually clear or explicitly supported. When something is uncertain, the description should use broader, qualified language.
Human Review Boundary And Prompt Refinement
The live lab treats generated descriptions as experimental search evidence, not individually approved museum records. Its index accepts provider-successful rows that match the active schema, prompt hash, and primary-image scope; it does not currently require a per-description human approval field.
Human review remains essential for evaluating unsupported claims, missed visible details, inconsistent terminology, overconfident identification, and patterns that could distort retrieval. Findings should feed back into the versioned prompt and regeneration workflow rather than remaining only as one-off corrections to individual records.
This approach is informed by image-description guidance such as the Cooper Hewitt Guidelines for Image Description, which treats description as an accessibility practice and emphasizes visible content, structure, spatial relationships, color, medium, and context-sensitive language. The Met Search Lab adapts those principles for search: the descriptions are not replacement catalog records, but generated visual evidence that can make visually present features easier to find.
Generated text is treated as search evidence, not museum catalog data. It feeds the keyword query alongside catalog fields and serves as source text for selected embedding strategies. The controls let you compare variants with generated keyword content on or off, and generated content panels in results help show what the model contributed.
Controlled Description-Length Study
The public visual-description prompt asks one pinned Gemini model to create Long, then Medium, then Short descriptions in a single structured response. The three fields are embedded separately with the same Gemini Embedding 001 model at 768 dimensions. Only description length changes; all three hybrid variants share Medium as their generated keyword field.
The outputs are correlated compressions of one visual reading, not independent prompt samples. Each embedding needs its own calibrated similarity threshold: the evaluation matches median result breadth to the historical V4 baseline at 0.65 on a fixed calibration split, then freezes thresholds before the held-out test. On the frozen 10,000-object study cohort, that procedure selected 0.655 for Short and 0.650 for both Medium and Long. These values are calibration results, not transferable defaults. The blind held-out pool is frozen, but its human relevance judgments remain pending, so the study does not yet establish a description-length winner. Medium remains the active lab default.
The public reference prompt lives in a versioned Markdown file. Historical Agentic Vision artifacts remain in repository history and the frozen evaluation record, but they are not indexed or exposed by the live lab and their exact production prompts are not distributed in the current tree.
Generator Reference
The executable public reference prompt below is loaded from its versioned generator Markdown file. It is a simplified, reproducible experiment inspired by The Met's production principles, not the exact production prompt.
Search Controls
These controls are the main levers for changing retrieval behavior. Use them to decide which evidence is searched, how strict the result set should be, and how keyword and semantic signals are combined.
Core controls
Keyword / Semantic Balance
One control defines the search behavior. 100 / 0 runs ordinary Keyword search, 0 / 100runs Semantic script score, and intermediate values run Hybrid script score. New variants start at The Met's 50 / 50 balance.
Between the endpoints, the percentages weight saturated BM25 and thresholded cosine similarity. This keeps both signals bounded per document so strong semantic matches can interleave with weaker keyword matches.
Embedding Strategy
Chooses whether semantic and hybrid search use the Short, Medium, or Long generated-description vector from Gemini Embedding 001 or Gemini Embedding 2, an image-only Gemini 2 vector at 768 or 3072 dimensions, or the image-only OpenAI CLIP ViT-L/14 baseline. New variants default to Medium Visual Description with Gemini Embedding 001.
Tuning
Min Similarity
The Met default is 0.65. This threshold was calibrated for descriptions from The Met's internal Agentic Vision v4 visual-description generator, embedded with Gemini Embedding 001 at 768 dimensions. The active Medium and Long Visual Description strategies independently calibrated to the same numeric value, while Short selected 0.655. Neither value is universal: higher thresholds are stricter and lower thresholds allow broader matches.
The new Gemini Embedding 2 description strategies start at 0.65 as a provisional interface default; calibrate them independently before treating result breadth or relevance as comparable to Gemini Embedding 001.
In Script score, this value also controls which semantic-only objects are included in facet counts. Tune it conservatively when using script-score facets for drill-down decisions.
Fusion Min Score
Accepts 0–1 and defaults to 0, matching the bounded composite score range. Prefer Min similarity for defining the semantic set that facets count. This top-level cutoff excludes lower-scoring documents from both hits and aggregations, so a nonzero value is recorded as part of the facet-count definition.
Toggles
Generated Keyword Content
On by default. When enabled, the shared Medium visual description participates in the same keyword query as museum metadata. Turn it off to test whether generated text helped or introduced noise.
Fuzzy Keyword Matching
On by default. Allows conservative spelling tolerance on the keyword side. Turn it off when you want stricter lexical comparisons.
Result Set
Filters
Department, Classification, Object Type, Tag, and Highlight are shared across variants. They narrow hits without changing scores. Counts come from the primary variant's complete threshold-defined query universe, and each facet excludes its own current selection while applying the other selected facets.
Reset
The Reset button clears the querystring, resets shared filters, returns to one default variant, and runs the default browse search again.
Object Pages
Result cards link to an object detail page that keeps the search context in the URL, including the query, variant, rank, and score. The page is meant for inspecting why an object appeared in a result set, not only for viewing the artwork record.
Object Record
Shows the primary image, title, date, artist or constituent lines, collection metadata, tags, measurements, and a link back to the object on metmuseum.org.
Generated Content
Displays indexed generated visual descriptions by generator version, including provider, model, schema, prompt file, and run metadata when available.
Similar Objects
Uses the current object's stored vector as the query vector, then runs an exhaustive script-score cosine search for each selected embedding strategy, matching the production execution pattern. This is object-to-object similarity, not a rerun of the text query.
Source Data
Provides expandable field summaries and raw indexed JSON so search behavior can be traced back to the exact ES document.
Similar Objects is useful for comparing embedding strategies directly. Text-description embeddings often group works by depicted subjects and visual language, while image-only embeddings can emphasize composition, medium, or visual appearance. Results are filtered to objects with images and should be read as model neighborhoods rather than curated related works. Object-page similarity scans the eligible vector-bearing documents with script_score, using the same exhaustive execution approach as semantic collection search.
Example Test Queries
These queries are useful for checking whether a search change improves the right behavior without causing regressions elsewhere.
Good For Keyword Search
These depend on exact words, names, titles, credit lines, or multi-word catalog phrases.
Exact Titles And Known Objects
Use these to verify that exact catalog matches still rank highly.
Artist, Maker, Donor, And Credit Text
These mostly test keyword retrieval because the answer depends on catalog metadata.
Multi-Word Keyword Regressions
Use these to check that multi-word searches behave like a combined intent.
Good For Semantic Search
These describe visual ideas, cross-language concepts, or subjects that may not appear literally in catalog metadata.
Subject Matter And Visual Description
These should benefit from generated visual descriptions and semantic retrieval.
Multilingual Queries
Use these to check whether semantic and hybrid search can respond to non-English descriptions.
Good For Hybrid Search
These mix literal catalog evidence with visual or conceptual intent, so both signals can help.
Mixed Literal And Visual Queries
Use these when tuning keyword/semantic balance.
Compact Smoke Test
Run this set first when changing keyword/semantic weights, keyword fields, generated fields, or embeddings.
Comparison Examples
These examples open the search page with multiple variants already configured so one search question can be compared across embedding strategies.
Controlled Description Length Study
Compares one Gemini visual reading compressed into Short, Medium, and Long descriptions, using the study's frozen equal-breadth thresholds.
- A: Short, normally 15–35 words · 0.655
- B: Medium, normally 50–150 words · 0.650
- C: Long, normally 150–300 words · 0.650
Description Length And Incidental Detail
Explores whether a longer information budget retrieves visible details that Short omits. A common threshold is useful for inspecting score-scale changes, but it does not equalize result breadth.
- A: Short should favor primary subjects and forms
- B: Medium retains more supporting visual evidence
- C: Long can retain small, background, or incidental details
Gemini Embedding 001 → Gemini Embedding 2
Uses the same English Medium visual descriptions and identical 50/50 hybrid settings with a Chinese query meaning “people looking in a mirror.” Only the embedding model changes, making this a useful probe of multilingual retrieval. Compare rankings, coverage, and overlap rather than raw scores because the models use incompatible vector spaces.
- A: Gemini Embedding 001 · Medium description · 50% keyword / 50% semantic · sim ≥ 0
- B: Gemini Embedding 2 · Medium description · 50% keyword / 50% semantic · sim ≥ 0
Comparison Of Image And Description Embeddings
Compares two direct-image embeddings with two text embeddings of the same Medium descriptions. For this relationship-sensitive query, Gemini Embedding 001 more consistently ranks narrative depictions involving a severed head, while Gemini Embedding 2 over Medium descriptions tends to retrieve isolated sculptural heads. This is a diagnostic comparison of how evidence and model choice affect retrieval, not a general benchmark.
- A: OpenAI CLIP ViT-L/14 · direct image · 768 dimensions
- B: Gemini Embedding 2 · direct image · 768 dimensions
- C: Gemini Embedding 2 · Medium description · 768 dimensions
- D: Gemini Embedding 001 · Medium description · 768 dimensions
CLIP → Gemini Embedding 2
Compares the historical OpenAI CLIP ViT-L/14 baseline with the newer Gemini Embedding 2 using the same primary images and 768-dimensional semantic search. Compare rankings and overlap rather than raw scores, because each model has a different similarity distribution.
- A: OpenAI CLIP ViT-L/14 · historical baseline · sim ≥ 0
- B: Gemini Embedding 2 · newer multimodal model · sim ≥ 0
Image Embedding Dimensions
Compares text-to-image semantic results from the same Gemini Embedding 2 model and image input at two vector dimensions.
- A: Image Only with 768 dimensions
- B: Image Only with 3072 dimensions
About This Guide
The Met Search Lab is built using AI coding agents. Their contributions include application code, tests, evaluation tooling, technical documentation, and this technical guide. Human collaborators set the goals, provide institutional and production context, review changes, validate behavior, and decide what is published.
The guide draws on The Met's production code to explain architectural decisions and implementation details that others can reproduce and adapt without access to the production application source. AI coding agents may continue to help update the lab and guide as the project and The Met's practices evolve.
Treat this as a working technical reference, not a universal recipe. Models, prompts, thresholds, infrastructure, latency observations, and governance practices must be evaluated against each institution's collection, policies, editorial capacity, and users.
Download Technical Guide For Agents (.md)Links
The data in this app comes from The Metropolitan Museum of Art Collection API and includes only Open Access images and data.