AI 를 활용한 MDX ↔ Figma 매칭을 네 가지 방법으로 비교하고, 그 결과로부터 Figma DB 를 어떤 구조로 쌓아야 하는지 도출한다.
| Phase | 방법 | 공식 | 데이터 |
|---|---|---|---|
| 22 | 정제 anchor keywords only (baseline) | 1.0 × 키워드 |
keyword_base.yaml + anchor_sets mirror |
| 23 | anchor + content summary | 0.5 × 키워드 + 0.5 × 내용 |
+ ko-sroberta cosine (MDX summary ↔ frame.content) |
| 24 | anchor + content + legacy structure | 0.5 × 키워드 + 0.3 × 내용 + 0.2 × 구조 |
+ legacy structure ontology (family/semantic_role) |
| 25 | Template-fit-v1 (최종 운영) | 0.25 anchor + 0.20 card + 0.20 rel + 0.15 slot + 0.20 content − penalties |
templates_v1 (32개: slots + anchor_sets + fit_notes + adaptation_allowed) |
| Phase | 1. (MDX 1) 팝업 — DX와 BIM의 구분 | 2. (MDX 2) 2.2 DX 시행 주체별 기대효과 | 3. (MDX 03) 1. DX 시행을 위한 필수요건 | 4. (MDX 03) 2. Process 혁신과 Product 변화 | 합계 |
|---|---|---|---|---|---|
| 22 | ✓ | ✓ | ✓ | ✓ | 4/4 |
| 23 | ✓ | ✓ | ✓ | ✓ | 4/4 |
| 24 | ✓ | ✓ | ✓ | ✓ | 4/4 |
| 25 | ✓ | ✓ | ✓ | ✓ | 4/4 |
→ 네 방법 모두 4 TARGET 에서는 4/4. 정답률만으로는 차이 없음.
| Phase | MDX01-2 | MDX02 | MDX03-1 | MDX03-2 | 평균 |
|---|---|---|---|---|---|
| 22 | 0.095 | 0.049 | 0.207 | 0.158 | 0.127 |
| 23 | 0.071 | 0.051 | 0.105 | 0.107 | 0.083 |
| 24 | 0.121 | 0.045 | 0.213 | 0.200 | 0.145 |
| 25 | 0.076 | 0.180 | 0.079 | 0.098 | 0.108 |
| Phase | 1위 Frame | 1위 점수 | 2위 Frame | 2위 점수 | margin | 라우팅 |
|---|---|---|---|---|---|---|
| 22 | 🎯 18 | 0.208 | 24 | 0.113 | 0.095 | - |
| 23 | 🎯 18 | 0.410 | 04 | 0.339 | 0.071 | - |
| 24 | 🎯 18 | 0.463 | 24 | 0.342 | 0.121 | - |
| 25 | 🎯 18 | 0.922 | 29 | 0.847 | 0.076 | use_as_is |
| Phase | 1위 Frame | 1위 점수 | 2위 Frame | 2위 점수 | margin | 라우팅 |
|---|---|---|---|---|---|---|
| 22 | 🎯 14 | 0.164 | 09 | 0.115 | 0.049 | - |
| 23 | 🎯 14 | 0.402 | 27 | 0.351 | 0.051 | - |
| 24 | 🎯 14 | 0.404 | 20 | 0.359 | 0.045 | - |
| 25 | 🎯 14 | 0.928 | 20 | 0.748 | 0.180 | use_as_is |
| Phase | 1위 Frame | 1위 점수 | 2위 Frame | 2위 점수 | margin | 라우팅 |
|---|---|---|---|---|---|---|
| 22 | 🎯 13 | 0.303 | 20 | 0.096 | 0.207 | - |
| 23 | 🎯 13 | 0.465 | 15 | 0.360 | 0.105 | - |
| 24 | 🎯 13 | 0.539 | 20 | 0.326 | 0.213 | - |
| 25 | 🎯 13 | 0.925 | 20 | 0.846 | 0.079 | use_as_is |
| Phase | 1위 Frame | 1위 점수 | 2위 Frame | 2위 점수 | margin | 라우팅 |
|---|---|---|---|---|---|---|
| 22 | 🎯 29 | 0.259 | 09 | 0.101 | 0.158 | - |
| 23 | 🎯 29 | 0.428 | 01 | 0.321 | 0.107 | - |
| 24 | 🎯 29 | 0.508 | 27 | 0.309 | 0.200 | - |
| 25 | 🎯 29 | 0.919 | 18 | 0.821 | 0.098 | use_as_is |
Phase 22~25 네 방법 모두 4 TARGET 에서 4/4 — 이 4개 유닛만 보면 어느 방법이 더 나은지 결정 불가.
기존 구조축은 family=list, semantic_role=prerequisites 같은 디자인이 어떻게 생겼나만 기록한다. 실제 운영에서는 '이 콘텐츠가 이 디자인에 들어갈 수 있나'를 알아야 하는데, 기존 구조축은 slot 개수·재구성 비용·금지 사항을 다루지 못한다.
use_as_is / light_edit / restructure / reject 4단계 운영 판단 제공.[BIM, DX] 2-term) 가 우연히 매칭되어 점수를 부풀리는 편향 방어. MDX01-2 (진짜 BIM/DX 비교) 는 방증 세트(comparison_dimensions 0.71)로 cap 면제, MDX03-2 (BIM/DX 배경 언급) 는 방증 0.29 로 cap 적용 — 의도대로 작동.주체별 나열, 필수요건 나열, BIM vs DX 직접 대조 등 잘못된 매칭을 구조 신호로 감점.네 방법 모두 4 TARGET 정답률은 같지만, 제공하는 정보량이 다르다:
| 제공 정보 | Phase 22 | Phase 23 | Phase 24 | Phase 25 |
|---|---|---|---|---|
| 1위 Frame | ✓ | ✓ | ✓ | ✓ |
| 단일 점수 | ✓ | ✓ | ✓ | ✓ |
| 축별 분해 | ✗ | 2축 | 3축 | 5축 + 2감점 |
| 원본 그대로 쓸 수 있나 (use_as_is) | ✗ | ✗ | ✗ | ✓ |
| 편집이 필요한가 (light_edit) | ✗ | ✗ | ✗ | ✓ |
| 재구성이 필요한가 (restructure) | ✗ | ✗ | ✗ | ✓ |
| 아예 쓰면 안 되는가 (reject) | ✗ | ✗ | ✗ | ✓ |
| 짧은 anchor 편향 방어 (조건부 cap) | ✗ | ✗ | ✗ | ✓ |
| 구조 신호로 감점 (not_suits) | ✗ | ✗ | ✗ | ✓ |
| 재구성 비용 산정 (adaptation_cost) | ✗ | ✗ | ✗ | ✓ |
따라서 Figma DB 는 Phase 25 의 templates_v1 스키마로 쌓아야 한다:
yaml
templates_v1:
<frame_id>:
template_id: <snake_case_name>
source: {title, original_layout}
description: |
<embedding-friendly 자연어 설명 (suits 맥락 포함)>
visual_pattern:
family: list | cards | table | compare | diagram | map | composite
layout: <구체 layout>
axis: horizontal | vertical
relation_type: parallel | sequence | compare | hierarchy
cardinality: {ideal, min, max}
slots:
- {id, type, required, max_chars}
anchor_sets:
- id: <set_name>
terms: [...]
min_hits: <int, optional>
confidence_cap: <float, 짧은 generic 세트에만>
cap_exempt_if_corroborated_by: <방증 임계>
fit_notes:
suits: [검수용 bullet, description 에 반영]
not_suits: [점수 감점 발화 조건]
adaptation_allowed:
split, merge, infer_missing_slot, rewrite_label, rewrite_body
legacy: {family, surface, semantic_role} # Phase 24 호환용 보존
32개 전체 템플릿이 이 스키마로 structure_ontology.yaml 에 정의됨. 스펙: TEMPLATE_FIT_V1.md. 엔진: template_fit.py.
template_fit.py (Phase 25)structure_ontology.yaml → templates_v1 블록 (legacy frames: 는 Phase 24 호환용으로 보존)detect_mdx.py — 매칭 단계 LLM 호출 0회embeddings.py — ko-sroberta + numpy (32 프레임 규모는 벡터 DB 불필요)intent_source == 'tagged' + intent_compat < 0.4 → rejectintent_source == 'tagged' + intent_compat < 0.7 → use_as_is/light_edit 금지, restructure 이하만use_as_is: confidence ≥ 0.90 AND anchor ≥ 0.70 AND content ≥ 0.55 AND not_suits = 0light_edit: confidence ≥ 0.75 AND anchor ≥ 0.50 AND content ≥ 0.45 AND adapt_pen < 0.10restructure: confidence ≥ 0.60 AND (anchor ≥ 0.35 OR (content ≥ 0.55 AND adapt_pen < 0.20)) AND not_suits ≤ 1rejectuse_as_is: 코드로 slot fill, AI 0회light_edit: max_chars 초과 시만 AI 1회restructure: adaptation_allowed 조작 AI 1회reject: 다음 후보 또는 '적합 디자인 없음' 반환추가 검증 필요: 현재 4 TARGET 으로는 엔진 프로토타입 검증까지 완료. 실제 확장 MDX 세트 (17~30개 추정) 회귀 테스트는 별도 진행.