Few-Shot
AIFew-shot (or "few-shot learning" in prompts) means including a small number of input–output examples in the prompt so the LLM can mimic the desired format or behavior. For example, "Extract the date. Example: 'Invoice dated 2024-01-15' → 2024-01-15." This improves extraction or completion without fine-tuning.
In DocLD
Extraction schemas can include instructions that act like few-shot guidance (e.g., "If the date appears as DD/MM/YYYY, normalize to ISO"). DocLD emphasizes zero-shot extraction with strong schema and instructions; few-shot examples can be added in instructions for edge cases.
Related Concepts
Few-shot complements zero-shot extraction and prompt engineering. Fine-tuning is a heavier alternative; temperature and top-p affect how the model follows examples.