mirror of
https://github.com/myronblair/jarvis
synced 2026-07-28 08:43:00 -05:00
fix(kb-intent): reduce batch size 40→20 intents, raise max_tokens to 5000
Token budget was too low for 40 intents — responses were truncated mid-JSON, causing "No JSON array found" on ~88% of batches. Fixes 880 errors/run. Also adds partial-JSON truncation recovery and raw response debug logging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014p87VFec84hNaf2WpvmLrW
This commit is contained in:
@@ -204,7 +204,7 @@ foreach ($BATCHES as $idx => $batch) {
|
||||
$num = $idx + 1;
|
||||
log_line("Batch {$num}/{$totalBatches}: {$batch['topic']}");
|
||||
|
||||
$user = "Generate 40 KB intents for the topic: {$batch['topic']}.\n"
|
||||
$user = "Generate 20 KB intents for the topic: {$batch['topic']}.\n"
|
||||
. "Subtopics to cover: {$batch['desc']}.\n"
|
||||
. "Prefix every intent_name with \"{$batch['id']}_\".\n"
|
||||
. "Category string to use: \"{$batch['category']}\".";
|
||||
|
||||
Reference in New Issue
Block a user