Prompt Engineering
AIPrompt engineering is the practice of designing prompts and instructions so that an LLM produces consistent, accurate, and well-formatted output. In DocLD, it applies to extraction (via schema instructions and field descriptions) and to RAG (via system prompts and citation instructions).
Techniques
- Clear instructions — State the task and format explicitly.
- Examples — Few-shot examples in instructions.
- Constraints — "Only use the provided excerpts"; "Output JSON with these keys."
- Role — System prompt sets tone and behavior (e.g., "You are a precise assistant that cites sources.").
DocLD schemas and knowledge-base settings let you tune instructions without editing model weights.
Related Concepts
Prompt engineering shapes prompting and system prompt design. It improves extraction and RAG without fine-tuning. Few-shot is one technique.