14 Sep

Few-Shot Prompting

Versino Financial Suite

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.


 

AI in everyday work: Person starts with their own task instead of the learning pile

AI in everyday work: Here's how to find the right start

Anyone who wants to use AI in their daily work is familiar with this: You read an article about prompts. A new model appears in it ...
AI-SHOP

AI assistant meets SAP Business One: Two paths out of the Versino AI shop

AI assistants like Claude or Copilot write emails, compile documents, and explain technical terms. But when you ask them about the open-source code...
SPRINT & SWIRL

Sprint and Swirl: How an AI agent divides work and learns from trials

This series deals with artificial intelligence in conjunction with SAP Business One. It takes a close look at fundamental AI principles...
LATS

LATS: Considering several paths simultaneously with AI — and the availability check in SAP B1

This series focuses on artificial intelligence in conjunction with SAP Business One. Not as a collection of product announcements, but as...
ReAct and RLEF

ReAct and RLEF: How Artificial Intelligence Learns from Real Mistakes — and What Automated Bank Reconciliation in SAP Business One Has to Do with It

This is the fourth instalment in a series on this blog dealing with AI fundamentals in conjunction with SAP Business One...
Service Layer AI as a transactional layer

SAP B1 10.0 FP2608: Service Layer AI as a transactional layer

The SAP Business One Service Layer has previously served predominantly as a passive data provider: applications requested data via OData, each ...
Wird geladen …