Repository navigation
fix: 기업 코멘트 시간 초과와 근거 ID 표기 오류 복구 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # 기업 관점 코멘트 생성 안정화 | ||
|
|
||
| 기업 코멘트는 기본 점수와 독립된 부가 결과다. 생성 실패 시 기본 채점 성공은 유지하지만 companyFit은 null로 남는다. 기존 성공 피드백은 서버 업데이트나 새로고침으로 자동 재생성되지 않는다. | ||
|
|
||
| ## 실제 재현과 변경 | ||
|
|
||
| - 기존 Sonnet 4.6 / 1,500토큰 / 20초 설정으로 누락 사례를 재실행하면 20.02초에 company_fit.timeout으로 종료됐다. | ||
| - 추가 원인: 프롬프트의 `[f:72]`를 모델이 `fact_id: "f:72"`로 복사했다. 기존 검증은 "72"만 받아 모든 근거를 버렸다. 충분한 시간으로 재실행해도 no_valid_evidence로 실패할 수 있었다. | ||
| - 기본 출력 예산을 4,096토큰, 전체 호출 예산을 60초로 조정한다. 설정값으로 덮어쓸 수 있다. | ||
| - fact_id는 ID 본문만 제출하도록 설명한다. 서버는 등록된 prompt_id 또는 정확히 `f:` 하나를 붙인 표기만 인식하며, 결과에는 원본 fact_id를 사용한다. 알 수 없는 ID·문항·과도한 길이는 계속 거부한다. | ||
| - 출력 잘림은 형식 오류와 마찬가지로 같은 전체 제한 시간 안에서 1회만 재시도한다. 두 번째 요청은 총평 150자, 목록별 1개, 상세 80자의 간결한 형식을 요구한다. API 오류에 대한 애플리케이션 재시도는 추가하지 않는다. | ||
|
|
||
| ## 데이터 복구 | ||
|
|
||
| 기존 기록을 복구할 때는 최신 SUCCEEDED 피드백이며 COMPLETED 면접, 기업 스냅샷 존재, companyFit 미저장인 행만 대상으로 한다. 기업 스냅샷과 기존 답변만 사용해 코멘트를 다시 생성한다. 원문 답변과 모델 출력은 비공개 백업에만 보관한다. | ||
|
|
||
| 수정 결과를 저장하기 전에 백업과 검증을 완료한다. company_fit 컬럼만 조건부 갱신하며 이미 존재하는 코멘트는 덮어쓰지 않는다. 기본 점수·산출 근거·문항별 평가·답변·질문·면접 상태는 변경하지 않는다. 운영 복구는 원격 코드의 자동 DB 수정 동작이 아니며 별도 관리 작업으로 수행한다. | ||
|
|
||
| 실제 모델 재실행으로 누락 사례 4건의 유효 코멘트를 확인했다. 설명 기회가 없는 답변은 빈 근거 목록과 관찰 한계 코멘트를 허용하며, 근거 없는 긍정·부정 평가를 만들지 않는다. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -175,8 +175,8 @@ class CompanyFitSettings(BaseSettings): | |
|
|
||
| # None이면 기존 피드백과 같은 ANTHROPIC_TEXT_MODEL 사용. | ||
| MODEL: str | None = None | ||
| MAX_TOKENS: int = Field(1500, gt=0) | ||
| TIMEOUT_SECONDS: float = Field(20, gt=0, allow_inf_nan=False) | ||
| MAX_TOKENS: int = Field(4096, gt=0) | ||
| TIMEOUT_SECONDS: float = Field(60, gt=0, allow_inf_nan=False) | ||
|
Comment on lines
+178
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When operators rely on the API reference identified by Useful? React with 👍 / 👎. |
||
| TEMPERATURE: float = Field(0.2, ge=0, le=1) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For responses ending with
stop_reason=max_tokens, this now falls through to a second model call, butdocs/api.md:1017-1018still says that only invalid submissions are regenerated and token truncation is never retried. Consumers using that reference to estimate call volume, cost, or timeout behavior will observe different semantics, so document the new single compact retry.Useful? React with 👍 / 👎.