feat(prompts): expand keyword guidance to long-tail search queries

Tighten the analyze prompts (runtime + recommendation platform) so the
model returns 8-10 question-style search queries (哪家好/有哪些/怎么选/
价格/排名/避坑 …) instead of generic tag words, and lift the keyword cap
in normalizeAnalyzeResult from 5 to 10 to keep them. Add tests covering
the new ten-keyword window and the question-like guidance in the seeded
analyze prompt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 01:28:59 +08:00
parent 814ea52c0e
commit 14a7921445
5 changed files with 92 additions and 15 deletions
@@ -1156,7 +1156,7 @@ func extractBalancedJSONFragment(input string) (string, bool) {
func normalizeAnalyzeResult(result AnalyzeTaskResult) AnalyzeTaskResult {
result.BrandSummary = strings.TrimSpace(result.BrandSummary)
result.Keywords = normalizeStringList(result.Keywords, 5)
result.Keywords = normalizeStringList(result.Keywords, 10)
result.Competitors = normalizeAssistCompetitors(result.Competitors, 6)
return result
}