PulseAugur
EN
LIVE 16:47:59

Few-shot examples in LLM prompts can double costs, author finds

Adding few-shot examples to LLM prompts, while seemingly helpful for improving accuracy, can significantly increase costs. The author found that five examples in a short prompt for expense note processing nearly doubled the cost per call. This is because API providers bill per token, and these examples are sent with every request, effectively being repeated thousands of times per month. While cheaper models or larger context windows can mitigate the cost increase, the core issue remains that examples become disproportionately expensive for short, task-specific prompts. AI

IMPACT Highlights a significant cost-saving opportunity for developers using LLM APIs by optimizing prompt design.

RANK_REASON Author shares personal experience and analysis of LLM prompt engineering costs.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Few-shot examples in LLM prompts can double costs, author finds

How we ranked this

Signal score
2 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Commentary
Author shares personal experience and analysis of LLM prompt engineering costs.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Andrey Altrouter ·

    Five few-shot examples nearly doubled the cost of my short LLM prompt

    <p>You write a prompt that turns messy expense notes into JSON. The model gets the format slightly wrong once, so you add an example of a note and the JSON you expect. Then a second one for euros, a third for dates, and two more for luck. The output looks great and the prompt shi…