C.W.K.
Stream
Lesson 04 of 05 · published

합성 데이터 & 데이터 Flywheel

~24 min · synthetic, distillation, flywheel, ab-testing

Level 0관찰자
0 XP0/43 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Distillation 파이프라인 (실서비스 관점)

가장 흔한 실세계 패턴: 큰 teacher가 학습 데이터 생성, 작은 student가 그걸로 파인튜닝. 이게 팀이 무거운 GPT-4o 파이프라인 추론 비용을 10배 줄이면서 품질 ~95% 유지하는 방법.

데이터 flywheel

  1. 파인튜닝 모델을 A/B 테스트 뒤에 실서비스 배포.
  2. 실 사용자 인터랙션 수집(동의 + 프라이버시 리뷰 포함).
  3. 품질 필터 — 긍정 평가 또는 사용자가 응답 수락한 인터랙션 보존.
  4. 원본 + 신규 데이터 결합으로 다시 파인튜닝.
  5. 반복 — 각 사이클이 더 나은 데이터셋이랑 더 나은 모델 생성.

Code

Diverse synthetic generation across an axis grid·python
import json, itertools
from openai import OpenAI

client = OpenAI()

def generate_pair(topic: str, difficulty: str) -> dict:
    r = client.chat.completions.create(
        model="gpt-4o",
        messages=[{
            "role": "system",
            "content": (
                "Generate a training example for a Python coding assistant. "
                "Output JSON: {\"question\": \"...\", \"answer\": \"...\"}. "
                "Answer should include code AND a one-paragraph explanation. "
                f"Difficulty: {difficulty}."
            ),
        }, {
            "role": "user",
            "content": f"Topic: {topic}",
        }],
        response_format={"type": "json_object"},
        temperature=0.8,
    )
    return json.loads(r.choices[0].message.content)

TOPICS = ["list comprehensions", "decorators", "async/await",
          "file handling", "error handling", "classes", "generators"]
DIFFICULTIES = ["beginner", "intermediate", "advanced"]

examples = []
for topic, diff in itertools.product(TOPICS, DIFFICULTIES):
    for _ in range(10):  # 10 per cell
        pair = generate_pair(topic, diff)
        examples.append({"messages": [
            {"role": "system", "content": "You are a Python expert."},
            {"role": "user",   "content": pair["question"]},
            {"role": "assistant", "content": pair["answer"]},
        ]})

print(f"Generated {len(examples)} examples")
# 7 topics × 3 difficulties × 10 = 210 examples

External links

Exercise

AI 기능 하나에 대한 6개월 데이터 flywheel 계획 스케치. 문서화: 뭘 로그할지, 어떤 동의 플로우 추가, 어떤 품질 필터, 어떤 재학습 cadence(월간?), 어떤 eval이 회귀 방지. 이게 지속적 모델 개선 풀어줄 문서.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.