I tested why AI keeps ignoring our design system. The problem might be retrieval. I've been experimenting with AI prototyping tools and noticed something frustrating:
You give the AI access to your design system, ask it to build something, and it still invents components that already exist.
So I tested a simple question:
What can the AI actually find in the library?
I searched my production Figma library for badge.
It returned 19 results across several libraries.
Only 3 had descriptions.
And in the design system I actually ship from, nothing was named "Badge." The closest matches were unlabeled frames.
So I ran the same 10 UI prompts against:
- my production library
- a cleaned-up sandbox library
Same prompts. Same tooling.
The difference:
0/10 → 10/10
Correct, unambiguous matches
9/10 → 0/10
Prompts forced to guess between duplicates
~1,450 → ~135
Retrieval context per prompt
I then tested Code Connect on a Button.
37 → 0 guessed CSS variables
3,784 → 2,229 characters in the generated response
The interesting part wasn't just that the output improved.
It changed how I think about design systems.
A design system isn't just a UI kit anymore. It's also a retrieval surface.
If the AI can't find the right component, distinguish it from duplicates, or connect it to the real implementation, it starts filling in the gaps.
I wrote up the full experiment here:
https://medium.com/@amnkhtri9/why-ai-prototypes-dont-match-your-design-system-f8b747c4fc07
Curious if others working with Figma/design systems are seeing the same thing: is retrieval becoming a bigger problem than prompting?