
Few-Shot Prompting is a prompting technique in which two to ten examples in the prompt prime the model for the desired response format. Instead of merely describing a task, you show the model beforehand what a correct input-output combination looks like. The model then transfers the recognised pattern to the next, similar request.
The technique lies between two extremes. Zero-shot prompting gets by entirely without examples and relies solely on the task description. One-shot prompting shows exactly one example. Few-shot prompting uses multiple examples and in practice often delivers the most reliable results because the model can derive a pattern from several cases instead of just copying a single one. What is important here is quality, not quantity: three carefully chosen, representative examples often deliver better results than ten randomly put-together ones.
In the SAP B1 environment, few-shot prompting is particularly well-suited for recurring extraction tasks. Anyone who shows a language model how the account assignment was derived from three already correctly posted incoming invoices thereby provides it with a template for the fourth, still open one Invoice by the hand. The model does not need to have the booking logic explained to it; it derives it from the example documents demonstrated. The same principle works for classifying support tickets or standardising transaction descriptions.
Demarcation
Few-shot prompting is not a form of training. The model itself does not change, the examples only work within the individual prompt and must be provided again with every new request. Compared to Chain-of-Thought, which structures the solution path, few-shot prompting provides ready-made patterns for the result. Both techniques are not mutually exclusive and are frequently combined in practice.
SAP B1 10.0 FP2608: Service Layer AI as a transactional layer
Process Reward Models: Why a correct result does not yet prove a correct method
Test-Time Compute Scaling: Why a Smaller AI Model Can End Up Winning — and What Supplier Comparison in SAP Business One Has to Do With It
RLHF and reward models: AI hype or what the approval process in SAP Business One has to do with it
AI – Answers from SAP Business One – without SQL, without IT ticket