santifer/career-ops · error · Error
Missing SCORE_SUMMARY block from model output
Error message
Missing SCORE_SUMMARY block from model output
What it means
Output-contract check in processOffer: the Gemini evaluation text did not contain a parseable ---SCORE_SUMMARY---...---END_SUMMARY--- block, so no machine-readable score could be extracted. The model either truncated its answer, ignored the prompt's format instructions, or returned an apology/refusal instead of the Blocks A-G evaluation.
Solutions
- Re-run the evaluation — transient format drift often disappears on retry (evaluateWithRetry wraps this path)
- If it persists, lower the input size (very long JDs cause truncation) or switch to a higher-capacity model tier
- Inspect the raw evaluationText log to see what the model returned instead of the summary block
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at batch-evaluate-gemini.mjs:276 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/e1c079252c4e1e14.
Report an issue: GitHub.
Appendix: source
Thrown at batch-evaluate-gemini.mjs:276
console.log(`\n========================================`);
console.log(`🔄 Processing [${idx}]: ${companyHint} - ${titleHint}`);
console.log(`🔗 URL: ${url}`);
try {
const jdText = await scrapeUrl(browser, url);
if (!jdText || jdText.length < 100) {
throw new Error('Extracted text too short (likely blocked or empty)');
}
console.log(`🧠 Calling Gemini (${modelName})...`);
const evaluationText = await _evaluate(`URL: ${url}\n\n${jdText}`);
// Parse output
const summaryMatch = evaluationText.match(/---SCORE_SUMMARY---\s*([\s\S]*?)---END_SUMMARY---/);
if (!summaryMatch) {
console.error('Missing SCORE_SUMMARY block from model output:\n' + evaluationText.slice(0, 500));
throw new Error('Missing SCORE_SUMMARY block from model output');
}
const block = summaryMatch[1];
const extract = (key) => {
const m = block.match(new RegExp(`^\\s*${key}:\\s*(.+)$`, 'mi'));
return m ? m[1].trim() : 'unknown';
};
const company = extract('COMPANY');
const role = extract('ROLE');
const score = extract('SCORE');
const archetype = extract('ARCHETYPE');
const legitimacy = extract('LEGITIMACY');
// Save
mkdirSync(PATHS.reports, { recursive: true });
mkdirSync(PATHS.trackerAdditions, { recursive: true });
View on GitHub (pinned to aac998c7ed)