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

Verifier-driven reasoning

~18 min · reasoning, verification

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

Reasoning은 generation; verification은 checking

모델 reasoning chain 자체가 LLM output — 자신만만하게 들리는데 항상 맞는 건 아니야. Verifier는 외부 진실 (calculator, unit test, schema validator, grounded search)에 reasoning을 체크하는 second pass.

유용한 verifier

  • Code execution — math에 모델이 코드 작성, 실행. output 체크.
  • Schema validation — JSON output이 pydantic / zod에 validate.
  • Search verification — 모델이 fact claim; search tool이 체크.
  • Self-critique pass — 두 번째 LLM call이 첫 번째 response의 error 찾으라 요청.

패턴

Generate → verify → verifier reject하면 verifier feedback으로 regenerate. agent loop, code-execution tool, structured-output retry의 기반. verifier랑 interlock하는 프롬프트 익숙해지면 high-stakes task에서 raw LLM output trust 그만둬.

Code

Generate → verify → regenerate·python
for attempt in range(3):
    out = generate(prompt)
    error = verify(out)        # returns None on success
    if error is None:
        return out
    prompt = f"{prompt}\n\nPrior attempt failed verification:\n{out}\nError: {error}\nFix and retry."
raise RuntimeError("verification failed after 3 attempts")

External links

Exercise

Structured output return하는 프롬프트 하나에 verifier 추가. 실패 시 generate → verify → regenerate를 3번까지 loop. 두 번째 시도 성공 빈도 측정.

Progress

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

댓글 0

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

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