chore(knowledge): drop verbose snippet payloads from resolve log
Logging the full candidate and selected snippet bodies per resolve was inflating log volume without adding signal we use. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -854,12 +854,11 @@ func (s *KnowledgeService) logKnowledgeResolve(
|
||||
zap.Int("candidate_count", len(candidates)),
|
||||
zap.Int("selected_count", len(selected)),
|
||||
zap.Int("precise_fact_count", len(knowledgeCtx.PreciseFacts)),
|
||||
zap.Any("candidates", summarizeKnowledgeSnippetsForLog(candidates)),
|
||||
zap.Any("selected_snippets", summarizeKnowledgeSnippetsForLog(selected)),
|
||||
zap.Strings("precise_facts", summarizeKnowledgeFactsForLog(knowledgeCtx.PreciseFacts)),
|
||||
)
|
||||
}
|
||||
|
||||
// for debug
|
||||
func summarizeKnowledgeSnippetsForLog(snippets []KnowledgeSnippet) []map[string]any {
|
||||
if len(snippets) == 0 {
|
||||
return []map[string]any{}
|
||||
|
||||
Reference in New Issue
Block a user