12 lines
437 B
JavaScript
12 lines
437 B
JavaScript
import { EXTRACTION_RULES } from '#import-recipes/extraction/EXTRACTION_RULES.js'
|
|
|
|
// Assembles the single user message: the hard rules, then the document text
|
|
// between markers so the model can tell instructions from content.
|
|
export function buildExtractionPrompt({ fileName, paragraphs }) {
|
|
const body = paragraphs.join('\n')
|
|
return `${EXTRACTION_RULES}
|
|
|
|
--- BEGIN DOCUMENT (file: ${fileName}) ---
|
|
${body}
|
|
--- END DOCUMENT ---`
|
|
}
|