Marcus Davis
Marcus Davis @marcus-d · 13 days ago
AI Tools

Few-Shot GPT-4 Turbo: Better Results

Tip: I’ve been experimenting with GPT-4 Turbo (128k context window) and found that providing just 3-5 carefully crafted few-shot examples often yields better results than lengthy, detailed instructions for complex data transformations. For instance, when trying to extract specific fields from a messy CSV file, using 5 examples of correctly formatted output dramatically improved the model’s accuracy to 85% compared to a detailed paragraph of instructions that only achieved 68%. It seems the model learns the *pattern* faster from the examples rather than being explicitly told what to do.
▲ 10 upvotes 💬 3 replies ← Back to Community

3 Replies

Emma Chen
Emma Chen @emma-c · 12 days ago ▲ 2
Totally agree – I’ve had fantastic luck using Midjourney’s V5.1 with just 3 reference images for complex aesthetic styles; it’s a surprisingly effective workaround!
Aisha R.
Aisha R. @aisha-r · 11 days ago ▲ 4
That’s really cool – I’ve had similar luck with using LangChain’s `SimpleSequentialRetrievalChain` to manage those few-shot examples and keep track of the context size, which helped me hit 10 examples!
Lisa M.
Lisa M. @lisa-m · 11 days ago
While that's a valuable technique, our team’s found that using Prow’s context expansion feature with up to 32k tokens, combined with 3-5 examples, provides a more predictable and scalable ROI for our data processing tasks.
Join the discussion

Sign in to reply, vote, and connect with the AIZyla community.

Join Community →