|
|
OpenAI Reasoning Models - o1 and o3 for Complex Problem Solving
Author: Venkata Sudhakar
OpenAI reasoning models (o1, o1-mini, o3, o3-mini) are designed for tasks that require multi-step logical thinking, mathematical reasoning, and complex problem decomposition. Unlike standard GPT models that respond immediately, reasoning models spend additional compute time thinking through the problem before producing a final answer. ShopMax India uses o3-mini to run nightly inventory optimisation - calculating reorder quantities across 12 warehouses in Mumbai, Bangalore, Delhi, and Hyderabad based on sales velocity and lead times.
Reasoning models are called using the same client.chat.completions.create() or client.responses.create() interface but with model set to o1, o1-mini, o3, or o3-mini. They do not support system messages in the Chat Completions API (use a user message instead) and do not accept temperature or top_p parameters. The reasoning_effort parameter (low, medium, high) controls the thinking budget - use low for faster responses and high for maximum accuracy on hard problems.
The below example shows ShopMax India using o3-mini to analyse inventory data across multiple warehouses and produce a prioritised reorder plan with justification.
It gives the following output,
REORDER PLAN - PRIORITY ORDER
CRITICAL (Stockout within 2 days):
1. Samsung TV - Hyderabad: 1 unit / 2.9 daily sales = 0.34 days left
Reorder NOW: 2 weeks supply = 41 units (2.9 x 14)
2. Samsung TV - Bangalore: 3 units / 3.8 daily sales = 0.79 days left
Reorder NOW: 2 weeks supply = 54 units (3.8 x 14)
HIGH PRIORITY (Stockout within 5 days):
3. OnePlus 13 - Delhi: 8 units / 9.4 daily sales = 0.85 days left
Reorder: 2 weeks supply = 132 units (9.4 x 14)
MONITOR:
4. Samsung TV - Mumbai: 12 units / 4.2 daily = 2.9 days. Reorder 47 units.
5. OnePlus 13 - Mumbai: 45 units / 8.5 daily = 5.3 days. Reorder 74 units.
ADEQUATE STOCK:
- Samsung TV - Delhi: 28 units = 13.3 days (just below threshold, order 1 unit buffer)
- OnePlus 13 - Bangalore: 67 units = 5.98 days. Reorder 90 units to hit 2-week target.
- OnePlus 13 - Hyderabad: 22 units = 3.6 days. Reorder 64 units.
Tokens used - Input: 412 | Output: 687
Use reasoning_effort=low for quick analysis tasks and high only when maximum accuracy is essential, as higher effort significantly increases response time and cost. Reasoning models excel at tasks with a definite correct answer - inventory optimisation, route planning, financial modelling - but are overkill for simple text generation. Unlike GPT-4o, o-series models do not stream thinking tokens to the client, so set a generous timeout on your HTTP client. Monitor completion_tokens carefully as reasoning models can produce very long internal chains that inflate costs. For batch analytical tasks, use the Batch API with o3-mini to reduce costs by 50 percent compared to synchronous calls.
|
|