review(회차1): per-citation score 제거 + marker fallback 단순화

회차 1 actionable 2건 반영.

- (information accuracy) 모든 citation 라인이 같은 ans.retrieval.top_score
  반복 출력했던 문제 — AnswerCitation 에 per-citation score 없으므로
  사용자 오해 회피 위해 score 컬럼 제거. 대신 retrieval 메타 한 줄로
  분리: '(retrieval: top_score=X.XX, k=N, used=M/N)'. per-citation
  score 노출은 facade + AnswerCitation 의 미래 확장 후 (별 task).
- (cleanup) marker fallback 의 두 번 변환 (as_deref + unwrap_or +
  to_string) → c.marker.clone().unwrap_or_else(|| format!(...))
  한 단계로 단순화.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 00:40:10 +00:00
parent c1555f3c50
commit f80d5ef542

View File

@@ -469,14 +469,23 @@ fn run(cli: &Cli) -> anyhow::Result<()> {
println!();
println!("근거:");
for (idx, c) in ans.citations.iter().enumerate() {
let marker = c.marker.as_deref().unwrap_or(&format!("{}", idx + 1)).to_string();
println!(
" [{}] {} (score={:.2})",
marker,
c.citation.to_uri(),
ans.retrieval.top_score,
);
let marker = c
.marker
.clone()
.unwrap_or_else(|| format!("{}", idx + 1));
println!(" [{}] {}", marker, c.citation.to_uri());
}
// p9-fb-20: retrieval 메타는 citation 별 점수가
// AnswerCitation 에 없는 (`top_score` 만 retrieval-
// 전체 max) 한계상 한 줄로 분리. per-citation score
// 노출은 facade + AnswerCitation 의 미래 확장 후.
println!(
"(retrieval: top_score={:.2}, k={}, used={}/{})",
ans.retrieval.top_score,
ans.retrieval.k,
ans.retrieval.chunks_used,
ans.retrieval.chunks_returned,
);
}
}
// Refusal → exit 1.