PromptingStep-by-step reasoning

Ask for step-by-step reasoning

A model writes its answer one token at a time. When the answer depends on several intermediate results (a calculation, a comparison of options, a check against several rules), asking it to work through those steps in writing before giving the answer tends to make the answer more accurate. The written steps also show you where it went wrong when it does.

When it helps

HelpsRarely helps
Arithmetic and unit conversionsShort factual lookups
Applying several rules to one case (eligibility, pricing, policy)Rewriting or translating text
Comparing options against criteriaSimple classification with clear labels
Debugging: tracing what code doesCreative writing
Planning a sequence of actionsExtraction of fields that are plainly written

Reasoning in writing costs output tokens and time. Use it where a test shows a gain.

Three levels of guidance

1. A plain request

Work through the problem step by step before giving the final answer.

Simple, and often enough for arithmetic.

2. Named steps

Tell the model which steps to take. This is more reliable when you know how an expert would approach the task:

To decide whether the order qualifies for free returns:
1. Find the delivery date and today's date; compute the number of days since delivery.
2. Check the item category against the excluded categories list.
3. Check whether the item was marked as a final-sale item.
4. Decide, citing which of the above settled it.

3. Separate the reasoning from the answer

When code reads the answer, or the reasoning should not be shown to the end user, ask for the two parts in separate tags and only use the second:

Think it through inside <reasoning> tags. Then give only the decision inside <answer> tags,
as one of: eligible, not_eligible, needs_review.
import os
import re
 
from openai import OpenAI
 
client = OpenAI(base_url="https://app.syntic.ai/v1", api_key=os.environ["SYNTIC_API_KEY"])
 
SYSTEM = """
You decide whether an order qualifies for a free return.
Policy: returns are free within 30 days of delivery. Excluded categories: underwear, gift cards.
Final-sale items cannot be returned.
Think it through inside <reasoning> tags, then give only the decision inside <answer> tags:
eligible, not_eligible or needs_review.
""".strip()
 
case = "Delivered 2026-09-14. Today is 2026-10-12. Item: wool jumper, category knitwear, not final sale."
r = client.chat.completions.create(
    model="Amara S1.2", stream=False, max_tokens=600,
    messages=[{"role": "system", "content": SYSTEM}, {"role": "user", "content": case}],
)
text = r.choices[0].message.content or ""
m = re.search(r"<answer>\s*(\w+)\s*</answer>", text)
decision = m.group(1) if m else "needs_review"
print(decision)   # eligible (28 days since delivery)

Note the fallback: a missing <answer> tag means “needs_review”, never a guess.

Give the model room

Reasoning needs output tokens. If max_tokens is tight, the reply can stop inside the reasoning and never reach the answer; you will see finish_reason: "length". Allow several hundred tokens more than the answer itself needs, and treat length as a failure to retry or escalate.

Do the arithmetic in code when you can

Models are good at setting up a calculation and less dependable at long exact arithmetic. When numbers matter (invoices, dosages, finances), give the model a calculator tool or let it produce the formula and compute it yourself. See Tool calling.

Pick a model built for it

Amara Deep is aimed at problems that take several steps of reasoning to get right. If explicit step-by-step prompting on Amara S1.2 still fails your tests, try the same prompt on Amara Deep before rewriting it further. Compare on your own test set; see Choosing a model.

Built-in reasoning control

⚠️
Preview — this feature is being built; the design below is the spec. A reasoning request field will let you set how much the model thinks before answering (an effort level or a token budget), and return that thinking separately from the answer. The design is on Reasoning. Until it ships, use the tag pattern on this page.

Reading the reasoning

The written steps are a debugging aid. When an answer is wrong, read the reasoning to find the step that failed, then fix the prompt at that step: a missing rule, an ambiguous date format, an unclear definition. Do not show raw reasoning to end users unless you have checked it is suitable; it can be long, tentative and include discarded ideas.

Was this page helpful?