Foundation Models · Engineering guide
Enterprise Prompting Techniques: Chain-of-Thought to Tree-of-Thoughts, Reasoning Models, and Token Efficiency
Prompting research handed enterprises a ladder — chain-of-thought, self-consistency, tree-of-thoughts, graph-of-thoughts — and then reasoning models pulled most of it inside the model, billed as hidden tokens. The decision now is which rung a task actually needs, what each rung costs at production volume, and when the honest answer is retrieval, fine-tuning, or tools instead of a cleverer prompt.
In this guide · 8 steps
- 01By the numbers
- 02The framing: deliberation moved from your prompt into the model
- 03The technique ladder, in its own words
- 04Reasoning models moved the ladder into the model
- 05Prompting agents is a different discipline
- 06Token efficiency: the unglamorous lever that pays for everything else
- 07Honest objections: when sophisticated prompting is a smell
- 08The read: an escalation policy, not a style guide
Four papers between 2022 and 2023 defined a ladder of prompting techniques — chain-of-thought, self-consistency, tree-of-thoughts, graph-of-thoughts — and then the model vendors absorbed most of that ladder into the models themselves. The enterprise question is no longer which clever pattern to adopt. It is which rung a given workload actually needs, what each rung costs at production volume, and when to stop climbing and change the architecture instead.
This guide walks the ladder with its actual research lineage, then covers what built-in reasoning changes about prompting, how prompting an agent differs from prompting a completion, and the token-efficiency levers — few-shot pruning, structured outputs, prompt caching — that determine whether any of it is affordable at scale. It closes with an escalation policy a platform team can adopt and defend.
1. By the numbers
Game of 24 puzzle tasks solved by GPT-4 with Tree of Thoughts search, versus 4% with chain-of-thought prompting, per the paper's abstract[^arxiv-2305-10601]
Yao et al., arXiv
Accuracy gain on the GSM8K math benchmark that the self-consistency paper's abstract reports over standard chain-of-thought prompting[^arxiv-2203-11171]
Wang et al., arXiv
Improvement in sorting quality over Tree of Thoughts reported in the Graph of Thoughts abstract, "while simultaneously reducing costs by >31%"[^arxiv-2308-09687]
Besta et al., arXiv
2. The framing: deliberation moved from your prompt into the model
The prompting playbook most enterprises wrote down in 2023 assumed deliberation had to be elicited: you showed the model worked examples, told it to think step by step, and sampled it repeatedly. Current frontier models from Anthropic, OpenAI, and Google ship with deliberation built in — and each vendor's own documentation now tells you to prompt them differently. Before spending on prompt sophistication, be clear about which era's problem you are solving.
| Dimension | 2022–2023 prompting playbook | Reasoning-model era |
|---|---|---|
| Where deliberation lives | In your prompt: chain-of-thought exemplars elicit intermediate reasoning steps[^arxiv-2201-11903] | In the model: vendors train deliberation in and bill the hidden reasoning as output tokens[^openai-reasoning-guide] |
| Your control surface | Prompt wording, exemplar count, sampling temperature | Effort levels and thinking budgets exposed as API parameters[^anthropic-extended-thinking][^google-gemini-thinking] |
| Dominant cost driver | Prompt length and the number of sampled completions | Reasoning/thinking tokens you never see, billed as output[^openai-reasoning-guide][^google-gemini-thinking] |
| Typical failure mode | Model skips steps and answers shallowly | Model overthinks easy inputs, inflating latency and token spend[^anthropic-prompting-best-practices] |
3. The technique ladder, in its own words
Chain-of-thought: the prompt that beat fine-tuning
Chain-of-thought (CoT) prompting was formalized by Wei et al. in January 2022 (arXiv 2201.11903). The abstract states the core claim plainly: "generating a chain of thought — a series of intermediate reasoning steps — significantly improves the ability of large language models to perform complex reasoning," with those abilities emerging "naturally in sufficiently large language models" when "a few chain of thought demonstrations are provided as exemplars in prompting."[4]
The result that made the paper famous is stated in the abstract without a numeric score: "prompting a 540B-parameter language model with just eight chain of thought exemplars achieves state of the art accuracy on the GSM8K benchmark of math word problems, surpassing even finetuned GPT-3 with a verifier."[4] For an enterprise buyer, the historically important part is the last clause. A prompt beat a fine-tuned model. That single finding redirected years of enterprise investment from training pipelines toward prompt engineering — which is worth remembering now that the pendulum is swinging partway back.
Self-consistency: buying accuracy with samples
Self-consistency, from Wang et al. in March 2022 (arXiv 2203.11171), is a decoding strategy layered on CoT: sample "a diverse set of reasoning paths instead of only taking the greedy one," then select "the most consistent answer by marginalizing out the sampled reasoning paths."[2] In practice: run the same CoT prompt many times at nonzero temperature and take the majority answer. The abstract reports gains over chain-of-thought of "GSM8K (+17.9%), SVAMP (+11.0%), AQuA (+12.2%), StrategyQA (+6.4%) and ARC-challenge (+3.9%)".[2]
Self-consistency: accuracy gains over chain-of-thought reported in the paper's abstract (percentage points)
The catch is arithmetic, not statistical: sampling N reasoning paths costs roughly N times the inference of a single answer, plus latency if you cannot parallelize. Self-consistency is therefore not a default — it is an insurance product. It belongs on tasks where the answer is discrete and checkable (a classification, an extraction, a numeric result), where being wrong is expensive, and where the marginal accuracy is worth a multiple of your per-call cost. It also generalizes beyond prompting: majority-vote ensembling remains one of the simplest reliability upgrades in any LLM pipeline, including ones built on reasoning models.
Tree-of-thoughts: search over reasoning, at orchestration cost
Tree of Thoughts (ToT), from Yao et al. in May 2023 (arXiv 2305.10601), reframed the limitation of both techniques: models "are still confined to token-level, left-to-right decision-making processes during inference," which fails on "tasks that require exploration, strategic lookahead, or where initial decisions play a pivotal role."[1] ToT "enables exploration over coherent units of text (thoughts)" — the model proposes candidate intermediate steps, evaluates them, and a search procedure decides where to go next, "looking ahead or backtracking when necessary to make global choices."[1]
The headline result is dramatic and narrow: "in Game of 24, while GPT-4 with chain-of-thought prompting only solved 4% of tasks, our method achieved a success rate of 74%."[1] Read the engineering reality behind that number. ToT is not a prompt; it is an orchestration layer — a generator, an evaluator, and a search controller, each of which is itself one or more model calls per node explored. You are writing a small planning system whose unit economics are 'many calls per answer.' That is justified when the problem genuinely is combinatorial search with scorable intermediate states — constraint scheduling, test-case synthesis, multi-step planning with verifiable subgoals — and rarely otherwise.
Game of 24 success rate with GPT-4, as stated in the Tree of Thoughts abstract (%)
Graph-of-thoughts: reuse and refinement, not just branching
Graph of Thoughts (GoT), from Besta et al. in August 2023 (arXiv 2308.09687), generalizes the tree to "a framework that advances prompting capabilities in large language models (LLMs) beyond those offered by paradigms such as Chain-of-Thought or Tree of Thoughts,"[3] with thoughts as graph vertices and dependencies as edges. That structure permits merging partial results, feeding conclusions back into earlier steps, and reusing solved subproblems. The abstract's evidence: "increasing the quality of sorting by 62% over ToT, while simultaneously reducing costs by >31%."[3]
The cost-reduction clause matters more than the quality clause for enterprise readers: it shows that once you are in orchestrated-reasoning territory, the topology of the workflow is itself a cost lever — decomposing, merging, and reusing thoughts can beat naive branching on both quality and spend. But note the task: sorting. GoT's demonstrated wins are on decomposable, verifiable problems. Neither ToT nor GoT has a comparable public evidence base on the fuzzy judgment tasks that dominate enterprise backlogs.
| Technique | Lineage | Structure | Calls per answer | Where it earns its cost |
|---|---|---|---|---|
| Chain-of-thought | Wei et al., 2022[^arxiv-2201-11903] | One linear reasoning trace | 1 | Multi-step tasks on non-reasoning model tiers; audit-friendly rationales |
| Self-consistency | Wang et al., 2022[^arxiv-2203-11171] | N independent traces, majority vote | N (your choice) | Checkable answers where error cost justifies an N× spend |
| Tree-of-thoughts | Yao et al., 2023[^arxiv-2305-10601] | Branching search with evaluation and backtracking | Many (nodes × generate + evaluate) | Genuinely combinatorial problems with scorable intermediate states |
| Graph-of-thoughts | Besta et al., 2023[^arxiv-2308-09687] | Arbitrary graph: merge, refine, reuse thoughts | Many, but can undercut ToT[^arxiv-2308-09687] | Decomposable pipelines where subresults merge or recur |
Benchmarks are existence proofs, not forecasts
Every figure above comes from puzzle-like benchmarks with verifiable answers — math word problems, Game of 24, sorting. Your contract-review or claims-triage workflow is none of these. Treat published gains as proof a technique can work, then require the gain to reproduce on your own evaluation set before it enters production.
4. Reasoning models moved the ladder into the model
Every major vendor now ships models that deliberate before answering, with the deliberation hidden, metered, and billed. OpenAI's reasoning guide is explicit about the economics: reasoning tokens "are not visible via the API, they still occupy space in the model's context window and are billed as output tokens," with depth controlled by a reasoning-effort parameter — "lower effort favors speed and lower token usage, while at higher effort the model thinks more completely to provide higher quality responses."[5]
Anthropic's extended thinking works the same way with a different control: a per-request thinking budget with a "Minimum of 1,024 tokens," where "the budget is a target rather than a strict cap," thinking tokens count toward the output limit, and the API reports how many billed output tokens were internal reasoning.[6] Notably, the control surface itself is churning: Anthropic's docs describe fixed budgets as the legacy mode and steer new work toward adaptive thinking, where the model decides how much to think under an effort setting.[6] Google's Gemini documentation says its models "engage in dynamic thinking by default, automatically adjusting the amount of reasoning effort based on the complexity of the request," tunable through a thinking-level parameter — and is blunt about billing: "response pricing is the sum of output tokens and thinking tokens," and "pricing is based on the full thought tokens the model needs to generate, despite only the summary being output from the API."[7]
The prompting consequence is the part most enterprise prompt libraries have not caught up with. OpenAI's guidance is that reasoning models "usually work best when you give them a clear goal, strong constraints, and an explicit output contract without prescribing every intermediate step."[5] Anthropic's prompting guidance points the same direction from the opposite failure mode: current models can overthink, and the fix is explicit instructions that constrain reasoning — telling the model when thinking is worth it and when to answer directly — or a lower effort setting, rather than more elaborate step-by-step scaffolding.[8] The 2022 move (show worked reasoning, demand steps) has become an anti-pattern on the model tiers that already deliberate: you pay for your scaffold tokens, then pay again for the model's own hidden reasoning.
| Vendor | Depth control | How hidden reasoning is billed | Their prompting advice |
|---|---|---|---|
| Anthropic (Claude) | Thinking budget (min 1,024 tokens) on earlier models; adaptive thinking plus an effort setting on newer generations[^anthropic-extended-thinking] | Thinking tokens are billed as output tokens and count toward the output limit[^anthropic-extended-thinking] | Guide when to think and constrain overthinking; prefer effort settings over scripted steps[^anthropic-prompting-best-practices] |
| OpenAI | Reasoning-effort parameter, from minimal to maximal settings[^openai-reasoning-guide] | Reasoning tokens are invisible via the API but occupy context and "are billed as output tokens"[^openai-reasoning-guide] | "A clear goal, strong constraints, and an explicit output contract without prescribing every intermediate step"[^openai-reasoning-guide] |
| Google (Gemini) | Thinking level (minimal/low/medium/high); dynamic thinking on by default[^google-gemini-thinking] | "Response pricing is the sum of output tokens and thinking tokens," charged on full thoughts even when only a summary is returned[^google-gemini-thinking] | Match thinking level to task complexity — minimal for retrieval-style tasks, high for hard coding and math[^google-gemini-thinking] |
Don't pay twice
Auditing legacy prompts against reasoning-tier models regularly finds 'think step by step' scaffolds and long worked exemplars stacked on top of models that already reason internally. Strip the scaffold, state the goal, constraints, and output contract, and tune the effort or budget parameter — then compare accuracy and total tokens against the legacy prompt. The scaffold usually loses on cost and often on quality.
What survives from the ladder? Chain-of-thought prompting still earns its keep on cheap, fast, non-reasoning tiers — often the right TCO answer for high-volume workloads. Self-consistency survives as model-agnostic ensembling for high-stakes checkable outputs. And tree/graph-style search survives not as prompting but as orchestration: when you need auditable exploration, external verification of intermediate states, or tool calls inside the search loop, an explicit workflow around the model still beats hoping the hidden reasoning does it for you.
5. Prompting agents is a different discipline
A single completion is a transcript you optimize. An agent is a policy you deploy: the model runs a loop, chooses tools, reacts to their results, and your prompt has to hold up across trajectories you never scripted. Anthropic's engineering guidance draws the line cleanly — workflows are "LLMs and tools orchestrated through predefined code paths," while in agents "LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks" — and urges adding that autonomy "only when it demonstrably improves outcomes."[9]
The prompting effort redistributes accordingly. The system prompt becomes an operating constitution: role, hard constraints, escalation and stop conditions, output contract. And tool descriptions become the interface that actually determines behavior. Anthropic's guidance is unambiguous: "tool definitions and specifications should be given just as much prompt engineering attention as your overall prompts," a good definition includes "example usage, edge cases, input format requirements, and clear boundaries," written to the standard of a great docstring for a junior developer — and in their own SWE-bench work, "we actually spent more time optimizing our tools than the overall prompt."[9]
Tool definitions and specifications should be given just as much prompt engineering attention as your overall prompts.
System prompt
The agent's constitution: role, non-negotiable constraints, escalation rules, stop conditions, and the output contract downstream systems parse. Stable by design — which also makes it cacheable.
Tool descriptions
The real interface. Each tool needs usage examples, edge cases, input formats, and boundaries; argument design should make mistakes hard to express, not just discouraged.[^anthropic-building-agents]
Context strategy
What persists across turns and in what order. Structure for a stable prefix (system prompt and tools first, volatile content last) so caching and debugging both work.
Evaluation harness
Agents fail across trajectories, not sentences. Regression suites replay representative tasks end to end, because a one-word tool-description change can shift behavior ten turns later.
Govern accordingly: an agent's system prompt and tool schemas are production code with a blast radius, not copy. They belong in a repository, behind review, with regression evaluations pinned to specific model versions — the same controls you would demand for a service that could email a customer or move a record.
6. Token efficiency: the unglamorous lever that pays for everything else
Every technique above multiplies tokens; token efficiency is what makes the multiplication survivable at enterprise volume. Three levers do most of the work. First, few-shot pruning: exemplar-heavy prompts were the load-bearing wall of the 2022 playbook, but on models that deliberate internally, vendor guidance to state the goal and contract rather than prescribe steps[5] implies leaner prompts — so test two exemplars against eight, and zero against two, before assuming the library's example blocks still earn their tokens. Second, structured outputs: a schema-constrained response caps completion length, eliminates re-ask-and-parse retries, and is itself a quality control. Third — and largest at scale — prompt caching.
Price of cached input relative to uncached input on both major APIs: Anthropic bills cache reads at "0.1 times the base input tokens price" and OpenAI bills cached input at "0.1× the uncached input token rate"[^anthropic-prompt-caching][^openai-prompt-caching]
Anthropic & OpenAI docs
The mechanics differ enough to matter. On Anthropic's API, caching is explicit and priced asymmetrically: 5-minute cache writes cost "1.25 times the base input tokens price," 1-hour cache writes cost "2 times the base input tokens price," reads cost 0.1×, and "the cache is refreshed for no additional cost each time the cached content is used"; prompts below a per-model minimum (from 512 up to a few thousand tokens depending on model) simply are not cached.[10] On OpenAI's API, "Prompt Caching works automatically for eligible requests, with no code changes required," enabled "for prompts that are 1,024 tokens or longer," with routing keyed on the prompt's prefix.[11]
Both designs reward the same architecture: put the stable content — system prompt, tool definitions, reference material — at the front of the prompt, and the volatile content last, so the expensive prefix is written once and read at a 90% discount thereafter. And keep the configuration stable: on Anthropic's API, changing the thinking budget between requests invalidates cache breakpoints, because the setting is rendered into the prompt.[6] A team that tunes thinking depth per request inside a cached conversation is silently re-buying its own prefix.
7. Honest objections: when sophisticated prompting is a smell
The strongest case against this whole toolbox deserves a fair hearing, because it is right more often than prompt enthusiasts admit. If a workload only reaches acceptable accuracy under multi-branch search or 20-sample voting, the task is telling you something. When failures are missing or stale knowledge, retrieval fixes the input; no reasoning topology conjures facts the context does not contain. When failures are format, tone, or domain-convention consistency at high volume, fine-tuning amortizes what prompting re-pays on every single call. When failures are arithmetic or data manipulation, a code-execution tool is categorically more reliable than any reasoning trace. Prompt jenga — stacking techniques until the demo works — is how teams spend inference dollars to avoid an architecture conversation.
The second objection is maintenance, and the evidence is in this article's own citations. The vendors' guidance inverted in roughly three years: 2022's papers showed that exemplars of stepwise reasoning unlock accuracy[4], while today's vendor docs advise stating goals and contracts without prescribing intermediate steps[5] and warn about models overthinking[8]. Even the control surfaces churn — Anthropic's fixed thinking budgets are already deprecated in favor of adaptive thinking on newer models.[6] A prompt library is therefore a depreciating asset with an unusually fast decay curve: every model migration is a breaking change you cannot diff, and an organization with hundreds of artisanal prompts and no evaluation harness owns technical debt it cannot even measure. The realistic maintenance posture is a small number of heavily-tested prompt patterns, each with regression evaluations pinned per model version — not a wiki of clever incantations.
The steelman for prompting still stands, narrowed: it remains the cheapest lever to try first. No data pipeline, no training run, instant rollback, zero marginal infrastructure. The failure mode is not trying prompting first — it is refusing to conclude, from mounting prompt complexity, that prompting was the wrong layer for the fix.
8. The read: an escalation policy, not a style guide
Treat the ladder as an escalation policy tied to measured error cost, and it becomes portable across vendors and model generations. Default rung: a plain, well-specified prompt — goal, constraints, output contract — on a reasoning-capable model, with effort or thinking budget tuned to the task and total tokens (including hidden reasoning) instrumented per call. Escalate to self-consistency sampling only where answers are discrete and checkable and the error cost justifies an explicit N× spend. Escalate to tree- or graph-style orchestration only for genuinely combinatorial problems with scorable intermediate states, budgeted as the multi-call planning systems they are. And step off the ladder — to retrieval, fine-tuning, or tools — the moment the failure analysis says knowledge, format, or computation rather than reasoning. Whatever models ship next quarter, that decision procedure survives; the prompts themselves are the disposable part.
How to apply this
- Inventory production prompts: for each, record the model tier, techniques in use (CoT scaffolds, exemplar counts, sampling), and the full token profile per call, including reasoning/thinking tokens.
- Classify each workload's dominant failure mode — reasoning, knowledge, format, or computation — and send only the first up the prompting ladder; route the others to retrieval, fine-tuning, or tools.
- Re-baseline every legacy chain-of-thought prompt against a reasoning-tier model with a plain goal-constraints-contract prompt and a tuned effort or budget setting before adding any scaffolding back.
- Gate self-consistency behind an explicit error-cost threshold; fix the sample count, log consensus rates, and route low-consensus outputs to human review instead of silently accepting the vote.
- Reserve tree/graph search for tasks with verifiable intermediate states, and budget it as an orchestration service (calls per node × nodes), not as a prompt.
- Rewrite agent tool descriptions to docstring standard — usage examples, edge cases, input formats, boundaries — and give them the same review attention as the system prompt.
- Restructure prompts cache-first: stable system-plus-tools prefix, volatile content last; hold thinking configuration stable within cached conversations, and monitor cache-read versus cache-write tokens to confirm the bet pays.
- Version prompts like code: repository, review, regression evaluations pinned per model version, and a mandatory migration test on every model upgrade.
Sources
Every quantitative or attributed claim above is linked to a primary source. Last verified at publication.
- [1]Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsarXiv (Yao et al.) · · accessed
- [2]Self-Consistency Improves Chain of Thought Reasoning in Language ModelsarXiv (Wang et al.) · · accessed
- [3]Graph of Thoughts: Solving Elaborate Problems with Large Language ModelsarXiv (Besta et al.) · · accessed
- [4]Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsarXiv (Wei et al.) · · accessed
- [5]Reasoning models — OpenAI API documentationOpenAI · accessed
- [6]Extended thinking — Claude Developer Platform documentationAnthropic · accessed
- [7]Gemini thinking — Gemini API documentationGoogle AI for Developers · accessed
- [8]Prompting best practicesAnthropic · accessed
- [9]Building Effective AgentsAnthropic · accessed
- [10]Prompt caching — Claude Developer Platform documentationAnthropic · accessed
- [11]Prompt caching — OpenAI API documentationOpenAI · accessed