Confidence scores
When importing design tokens, preset AI shows confidence scores to help you understand how reliable each extraction is. Higher confidence means more trustworthy results.
What confidence means
Confidence indicates how certain preset AI is about an extracted token's accuracy. It's displayed as a percentage or visual indicator:
| Level | Score | Visual | Meaning |
|---|---|---|---|
| Very high | 85%+ | Five filled dots | Highly reliable, parsed from standard format |
| High | 70-84% | Four dots | Likely accurate, minor uncertainty |
| Medium | 50-69% | Three dots | Review recommended |
| Low | 30-49% | Two dots | Manual verification needed |
| Very low | <30% | One dot | May be incorrect |
Why confidence varies
Token extraction involves multiple stages, each adding potential uncertainty.
1. File detection
Did preset AI find the right files?
| Scenario | Confidence |
|---|---|
Standard file names (tokens.json, tailwind.config.js) | High |
| Non-standard locations or names | Lower |
| Files guessed from directory structure | Low |
2. Format parsing
Did preset AI understand the file format?
| Scenario | Confidence |
|---|---|
Tokens Studio with $metadata | Very high |
| Standard Tailwind config | High |
CSS with clear :root custom properties | High |
| Unknown JSON structure | Lower |
3. Value extraction
Did preset AI extract the actual values correctly?
| Scenario | Confidence |
|---|---|
Direct value (e.g., #3b82f6) | High |
| One level of reference resolved | Slightly lower |
| Multiple reference levels resolved | Lower |
| AI-extracted from unstructured content | Low |
4. Semantic mapping
Did preset AI map tokens to the right semantic meaning?
| Scenario | Confidence |
|---|---|
Exact name match (e.g., primary → --primary) | High |
Pattern-based match (e.g., button-bg → --primary) | Medium |
| AI-inferred semantic meaning | Lower |
How confidence is calculated
Confidence compounds across stages. If each stage is 90% confident:
0.90 × 0.90 × 0.90 × 0.90 = 0.66 (66%)
This is why even reliable-seeming extractions may show medium confidence: uncertainty accumulates.
Example breakdown
Token: design.color.brand.primary
| Stage | Confidence | Reason |
|---|---|---|
| Detection | 98% | Found tokens.json with $metadata |
| Parsing | 95% | Standard Tokens Studio format |
| Extraction | 90% | Resolved two token references |
| Mapping | 85% | Name contains "primary" |
| Compound | 71% | 0.98 × 0.95 × 0.90 × 0.85 |
Confidence by source
Different import sources produce different typical confidence levels:
| Source format | Typical confidence |
|---|---|
| Tokens Studio | 85-95% |
| CSS Variables | 80-90% |
| Tailwind Config | 70-85% |
| Style Dictionary | 75-85% |
| AI Analysis | 25-50% |
Tokens Studio files have the highest confidence because they use a well-defined schema with explicit metadata.
What to do with low confidence
For individual tokens
| Confidence | Action |
|---|---|
| High (70%+) | Trust the extraction |
| Medium (50-69%) | Quick visual check |
Low (<50%) | Verify value manually |
For the overall import
If many tokens have low confidence:
- Check your source format: consider exporting to Tokens Studio or Style Dictionary
- Review flagged tokens: focus on low-confidence items first
- Verify critical tokens: especially primary colors, typography, spacing
Import summary
At the end of scanning, preset AI shows aggregate statistics:
Import Summary
--------------
Total tokens: 24
Average confidence: 78%
High confidence: 20 tokens (83%)
Low confidence: 2 tokens (8%)
Weakest stage: Mapping (avg 72%)
This helps you understand overall extraction quality before importing.
Improving confidence
Use standard formats
The most reliable extraction comes from:
- Tokens Studio: export from Figma plugin or create manually
- Style Dictionary: industry-standard token format
- CSS custom properties: in
:rootblock with clear naming
Clear naming conventions
Tokens with semantic names are easier to map:
| Naming | Confidence impact |
|---|---|
primary, background, destructive | Higher |
blue-500, gray-100 | Medium |
color1, c1, main | Lower |
Avoid deep references
Each level of token reference ({color.blue.500} → {primitives.blue} → #3b82f6) reduces confidence.
FAQ
Why does the same token have different confidence in light vs. dark mode?
Each mode is evaluated independently. If dark mode required more reference resolution, it may have lower confidence.
Can I import tokens even with low confidence?
Yes. Confidence is advisory: it helps you prioritize which tokens to verify, but doesn't block import.
Does confidence affect anything after import?
No. Once imported, all tokens are treated equally. Confidence is only shown during the import preview.
Why is AI extraction confidence so low?
AI analysis is probabilistic. While often accurate, there's inherent uncertainty in inferring structure from unstructured content. We're transparent about this uncertainty.
Can I see the confidence breakdown for each token?
During import preview, click on a token to see its detailed confidence breakdown by stage.