---
title: "The infrastructure behind AI search in Figma"
description: "Figma's AI search embeds frames and published components with a CLIP-based multimodal model, so screenshots, layer selections and text all query one vector space."
url: "https://swe.quest/articles/the-infrastructure-behind-ai-search-in-figma-b7fada64ae683a10"
canonical: "https://www.figma.com/blog/the-infrastructure-behind-ai-search-in-figma/"
source: "Figma"
published: "2024-10-15"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["vector-search","search","cost-optimization","inference","scalability"]
---

# The infrastructure behind AI search in Figma

A post on [Figma](https://swe.quest/sources/figma.md), published 2024-10-15, 10 min read, Case study. Original: [https://www.figma.com/blog/the-infrastructure-behind-ai-search-in-figma/](https://www.figma.com/blog/the-infrastructure-behind-ai-search-in-figma/)

## Summary

Figma's AI search embeds frames and published components with a CLIP-based multimodal model, so screenshots, layer selections and text all query one vector space. Text queries are embedded directly, while selections are rendered to images first, which worked better than embedding JSON. Indexing runs as chained async jobs: a headless C++ editor enumerates frames, metadata goes to DynamoDB, thumbnails go to S3, SageMaker produces embeddings in batches, and OpenSearch kNN serves faceted vector search. Component search runs lexical and vector queries in parallel and merges them with min-max score normalization. Costs were cut by porting Ruby to C++, CPU rendering with llvmpipe, a four-hour indexing debounce (only 12% of data processed), dropping duplicates and drafts (index halved) and vector quantization; the post also covers an OpenSearch replica bug and a pitfall where excluding embeddings from \_source wiped them on document updates.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- vector embeddings ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- nearest neighbor search ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- OpenSearch/Elasticsearch basics ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))

## Keywords

Figma, CLIP, OpenSearch, AWS SageMaker, DynamoDB, llvmpipe, vector quantization

## Related posts

- [How we built AI search in Figma](https://swe.quest/articles/how-we-built-ai-search-in-figma-a7e536f5730f5136.md): Figma · 2024-10-25 · Easy · 10 min read · Search, Evaluation, Product engineering, RAG & retrieval
  Figma pivoted from an AI design-autocomplete prototype to shipping visual and semantic search after research showed 75% of objects added to the canvas come from other files and designers struggle to find mid-level frames.
- [Image Similarity with Hugging Face Datasets and Transformers](https://swe.quest/articles/image-similarity-with-hugging-face-datasets-and-transformers-cfa579cfca74f44c.md): Hugging Face · 2023-01-16 · Medium · 7 min read · Computer vision, Vector search, Search, Python
  An image similarity system can be built by embedding images with a fine-tuned Vision Transformer (CLS token from the last hidden state) and ranking candidates by cosine similarity against a query embedding.
- [Image search with 🤗 datasets](https://swe.quest/articles/image-search-with-datasets-7a6fd7ae6c6c63ce.md): Hugging Face · 2022-03-16 · Medium · 12 min read · Vector search, Computer vision, Python, Search
  A text-to-image search over 10,000 British Library book embellishments can be built by loading the images with the 🤗 datasets ImageFolder loader and embedding them with the CLIP ViT-B/32 model via sentence\_transformers.
- [Implementing semantic image search with Amazon Titan and Supabase Vector](https://swe.quest/articles/implementing-semantic-image-search-with-amazon-titan-and-supabase-vector-07c13eba94b53a82.md): Supabase · 2024-03-26 · Medium · 5 min read · Vector search, PostgreSQL, Python, Computer vision, Cloud platforms
  Semantic image search can be built in Python by generating 1024-dimensional embeddings for images with the Amazon Titan multimodal embedding model (amazon.titan-embed-image-v1) via Amazon Bedrock, then storing and querying them in Supabase Vector (Postgres with pgvector) using the vecs client.
- [Getting Started With Embeddings](https://swe.quest/articles/getting-started-with-embeddings-f83c278b13779a68.md): Hugging Face · 2022-06-23 · Medium · 11 min read · Search, Machine learning, Python, Vector search
  Embeddings turn text or images into fixed-length vectors that capture meaning, so semantic similarity becomes a distance calculation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
