fix(extraction): improve JSON extraction prompts and model options for invoice and bank statement tests

This commit is contained in:
2026-01-19 21:19:37 +00:00
parent 235aa1352b
commit 09770d3177
4 changed files with 58 additions and 38 deletions

View File

@@ -197,6 +197,10 @@ async function extractInvoiceFromMarkdown(markdown: string, queryId: string): Pr
{ role: 'user', content: JSON_EXTRACTION_PROMPT },
],
stream: true,
options: {
num_ctx: 32768, // Larger context for long invoices + thinking
temperature: 0, // Deterministic for JSON extraction
},
}),
signal: AbortSignal.timeout(120000), // 2 min timeout
});