Few-shot prompting — CCA-F Exam Prep
L2.02|Few-shot prompting
1/12
Same model. Same invoices. Same task. One prompt got 61% accuracy. The other got 94%.
A fintech startup was building an invoice extraction pipeline. Thousands of invoices per day from hundreds of vendors. Different formats, different layouts, different languages. They needed to extract vendor name, date, line items, and total.
Their first prompt: "Extract the vendor name, date, line items, and total from this invoice. Return JSON."
61% accuracy. Dates in wrong formats. Vendor names truncated. Line items missing. They spent two weeks rewriting the instructions. Added 400 words of detailed rules.
63% accuracy. Then someone added three examples. 94%.
