feat: 검증식 평가로 비-equation kind 결정론 검증 (기호 검증 불가 해소)#21
Merged
Conversation
비-equation kind(경우의 수 등)는 SymPy 게이트가 구조적으로 전부
unverified("기호 검증 불가")였다. 검증식 평가 경로를 추가해 결정론
검증을 확장한다.
- math-engine: /evaluate 엔드포인트 — factorial/binomial 등 조합론
식을 SymPy로 평가해 정확값 반환
- 스키마: GeneratedProblem/SolveAttempt에 verification_expression
(정답에 도달하는 SymPy 평가식) optional 필드 추가, 생성기·재풀이
프롬프트가 식을 내도록 지시
- sympy_verify: 검증식이 있으면 /evaluate 값을 선언 정답(객관식이면
정답 보기 본문)과 대조해 passed/failed 판정. equation kind의 식
추출 실패 시에도 검증식으로 폴백
- 핫픽스: 엔진 장애/타임아웃을 failed가 아닌 unverified로 강등 —
인프라 장애가 acceptance에서 "틀린 문제"로 reject되지 않게 함
- wire-adapter: 검증식 경로 통과 시 "검증식 평가 일치 (값: N)" 서사
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
topic=10공수05-02(순열과 조합) 등 비-equation kind 토픽에서 생성된 모든 문제가 "기호 검증 불가"(주의) 배지를 받는다. 원인은 SymPy 게이트가generation_kind === "equation"만 검증하도록 구현되어 있어서로, 토픽 맵 43개 중 38개가 구조적으로unverified였다. 해당 토픽들의 실질 검증은 LLM 재풀이 하나에만 의존하고 있었다.해결 — 검증식(verification_expression) 평가 경로
경우의 수류 문제의 정답은 방정식 풀이가 아니라 닫힌 계산식 평가(예:
3!·3!·4! = 864)로 결정된다는 점을 이용한다.verification_expression)을 함께 출력.GeneratedProblem/SolveAttempt에 optional 필드 추가/evaluate:factorial,binomial등 조합론 식을 평가해 정확값 반환 (5초 타임아웃 워커 재사용)/evaluate값을 선언 정답과 대조해 passed/failed 실판정 — acceptance가verified까지 도달 가능. 객관식이면① 864에서 정답 보기 본문을 해석. equation kind도 식 추출 실패(서술형) 시 검증식으로 폴백핫픽스
failed→ acceptance가 인프라 장애를 "틀린 문제"로 reject하던 결함을unverified(→warning)로 강등검증
/evaluate, 생성기 전파)/evaluate) + ruff/evaluate라이브 스모크:factorial(3)*factorial(3)*factorial(4)→864한계 / 후속
verification_expression은 스키마·프롬프트 준비 완료,independent-resolve에서의 3자 대조는 후속 PRSOLVER_MODELenv 분리, 객관식 재풀이 보기 가리기 등은 별도 과제🤖 Generated with Claude Code
Summary by cubic
비-equation(kind) 문제에 검증식(
verification_expression) 평가 기반의 결정론 검증을 추가해 경우의 수 등에서의 "기호 검증 불가"를 해소했습니다. 엔진 장애는unverified로 처리해 잘못된 reject를 막습니다.New Features
GeneratedProblem/SolveAttempt에verification_expression(옵션) 추가, 생성기·재풀이 프롬프트 갱신.math-engine에POST /evaluate추가: SymPy로 계산해 정확값(value)과 근사값(numeric) 반환.sympy_verify가 검증식을 평가해 선언 정답과 대조하며 passed/failed 판정. 객관식은 정답 보기 본문으로 비교, equation kind는 식 추출 실패 시 검증식으로 폴백.wire-adapter에 "검증식 평가 일치 (값: N)" 메시지 추가.Bug Fixes
math-engine오류/타임아웃을failed가 아닌unverified로 강등해, 인프라 장애가 수락 정책에서 reject로 이어지지 않도록 수정.Written for commit 86ef209. Summary will update on new commits.