Problem
Figma wanted designers to find a frame or component from a text description, a screenshot or a selection of layers. Existing component search matched text strictly, and there was no search over frames at all. The index had to cover billions of items, and one user sees the feature properly only if their whole team is indexed. Most teams are small and there are many of them, so even a small share of users meant indexing almost all teams.
Example from the article: a smiley component should be found by "happy", "face" or "grin", whatever its name is.
Solution in brief
Figma embeds thumbnails of frames and components with the open source CLIP model and stores the vectors in OpenSearch next to filter metadata. Query text, screenshots and layer selections go through the same model. Most of the effort went into cost: profiling showed that finding and rendering frames, not embedding them, was the main compute cost, and OpenSearch memory was the second.
Questions this case answers
- How to build and serve a multimodal embedding index over billions of items while keeping indexing and memory cost under control
- How to blend scores from a lexical index and a vector index into one ranked result list
- How to add semantic and visual search to a product when billions of items must be embedded and indexed?
- How to keep the cost of an embedding index low when every user needs their whole team's data indexed?
Tools and methods
- CLIP — multimodal embedding model: text and images land in one vector space.
- OpenSearch kNN — nearest neighbor search plus metadata filters in one index.
- DynamoDB — key-value store for frame metadata and embeddings.
- SageMaker endpoint — batch embedding inference.
- Vector quantization — smaller embeddings in memory at a small accuracy cost.
- Min-max normalization — merges lexical and vector scores.
Google or a one-time email code. No password.