
Chain-of-Thought, Few-Shot or Plain Prompt? Pick by Cost and Quality
Each prompting technique changes your token bill differently. A practical way to choose between zero-shot, few-shot and chain-of-thought using a small eval and INR cost per task.
Author
AICredits Team
Published
16 Oct 2026
Reading time
6 min read
"Think step by step" can lift accuracy on multi-step problems. It can also double your output tokens. Choosing a technique is a cost-quality decision, so treat it like one.
What each technique costs
| Technique | What it adds to the bill | Where it tends to help | |---|---|---| | Zero-shot | Nothing extra | Simple, well-specified tasks | | Few-shot | Example tokens on every call | Format consistency, tricky labels | | Chain-of-thought | More output tokens | Multi-step reasoning, maths, logic | | Self-consistency | Multiple full calls | High-stakes answers where votes help |
The lessons on MasterPrompting.net explain each one: few-shot prompting, chain-of-thought and self-consistency.
A small eval you can run today
- Collect 30 to 100 real inputs with known-good answers.
- Write each variant of the prompt (zero-shot, few-shot, chain-of-thought).
- Run them through the same model via one AICredits key and record accuracy and token counts.
- Compute
inr_cost / correct_answersfor each variant.
# Untested sketch: adapt to your task and scoring function.
from openai import OpenAI
client = OpenAI(api_key="sk-your-aicredits-key", base_url="https://api.aicredits.in/v1")
def run(model, prompt, examples, score, in_price, out_price):
correct, tin, tout = 0, 0, 0
for x, expected in examples:
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": prompt.format(input=x)}],
max_tokens=300,
)
tin += r.usage.prompt_tokens
tout += r.usage.completion_tokens
correct += score(r.choices[0].message.content, expected)
inr = tin / 1e6 * in_price + tout / 1e6 * out_price
return {"accuracy": correct / len(examples), "inr": inr, "inr_per_correct": inr / max(correct, 1)}Get in_price and out_price (INR per million tokens) from the models page. Our LLM evaluation guide covers building the scoring function.
Reading the result
If chain-of-thought lifts accuracy enough that inr_per_correct drops, keep it. If it only raises cost, drop it. With reasoning models, remember hidden thinking tokens are billed as completion tokens (docs), so an explicit "think step by step" may add cost without adding quality. Measure rather than assume.
Prompt templates for each technique are in the MasterPrompting prompt library. Set a per-key budget before running large evals so a bug cannot spend more than you planned.
Related Articles
Continue in Docs
Need implementation commands and endpoint details? Go to quickstart or API reference.