Problem
All schemas use the same generic prompt template. Some use cases need custom instructions:
- Medical data: HIPAA compliance reminders
- Legal docs: Exact quote preservation
- Financial: Decimal precision requirements
- Custom domains: Specific terminology or formats
Currently no way to customize prompts per schema.
Proposed Solution
Add optional prompt customization to schema metadata:
{
"fields": { ... },
"metadata": {
"name": "Medical Record Extraction",
"promptInstructions": "Follow HIPAA guidelines. Preserve exact medical terminology.",
"promptExamples": [
{
"input": "...",
"output": { ... }
}
]
}
}
Implementation
Update Schema type:
interface SchemaMetadata {
name?: string;
version?: string;
description?: string;
promptInstructions?: string; // custom instructions
promptExamples?: Array<{ // custom examples
input: string;
output: ExtractionResponse;
}>;
}
Update prompt builder to include custom content:
export function buildSystemPrompt(schema: Schema): string {
let prompt = basePrompt;
// Add custom instructions
if (schema.metadata?.promptInstructions) {
prompt += ;
}
// Add custom examples
if (schema.metadata?.promptExamples) {
prompt += formatExamples(schema.metadata.promptExamples);
}
return prompt;
}
Acceptance Criteria
Related
Priority
Medium - Useful but not blocking core functionality
Problem
All schemas use the same generic prompt template. Some use cases need custom instructions:
Currently no way to customize prompts per schema.
Proposed Solution
Add optional prompt customization to schema metadata:
{ "fields": { ... }, "metadata": { "name": "Medical Record Extraction", "promptInstructions": "Follow HIPAA guidelines. Preserve exact medical terminology.", "promptExamples": [ { "input": "...", "output": { ... } } ] } }Implementation
Update Schema type:
Update prompt builder to include custom content:
Acceptance Criteria
Related
Priority
Medium - Useful but not blocking core functionality