From f80d5ef542ce33fe3e90817e3b9f56aae6679a91 Mon Sep 17 00:00:00 2001 From: altair823 Date: Sun, 3 May 2026 00:40:10 +0000 Subject: [PATCH] =?UTF-8?q?review(=ED=9A=8C=EC=B0=A81):=20per-citation=20s?= =?UTF-8?q?core=20=EC=A0=9C=EA=B1=B0=20+=20marker=20fallback=20=EB=8B=A8?= =?UTF-8?q?=EC=88=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 회차 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) --- crates/kebab-cli/src/main.rs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/crates/kebab-cli/src/main.rs b/crates/kebab-cli/src/main.rs index 838c6be..a8ca2b1 100644 --- a/crates/kebab-cli/src/main.rs +++ b/crates/kebab-cli/src/main.rs @@ -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.