Reasoning Models

View as Markdown

NeuraAI’s reasoning models are designed to tackle complex problems by thinking through solutions step-by-step before responding. These models excel at mathematical reasoning, advanced coding challenges, scientific analysis, and multi-stage planning.

How Reasoning Works

Unlike standard language models that generate responses immediately, reasoning models create an internal chain of thought, exploring different approaches and evaluating solutions before providing their final answer.

Available Models

  • o4-mini - Fast reasoning for everyday complex tasks
  • gemini-2.5-pro - Advanced reasoning for challenging problems

Basic Example

1from openai import OpenAI
2
3client = OpenAI(
4 base_url="https://api.neura-ai.app/v1"
5)
6
7prompt = """
8Write a bash script that accepts a matrix in the format
9'[1,2],[3,4],[5,6]' and outputs its transpose in the same format.
10"""
11
12response = client.chat.completions.create(
13 model="o4-mini",
14 reasoning_effort="medium",
15 messages=[
16 {
17 "role": "user",
18 "content": prompt
19 }
20 ]
21)
22
23print(response.choices[0].message.content)

Reasoning Effort Levels

Control how deeply the model thinks with the reasoning_effort parameter:

Low Effort

  • Faster responses
  • Lower token usage
  • Suitable for moderately complex problems
1response = client.chat.completions.create(
2 model="o4-mini",
3 reasoning_effort="low",
4 messages=[{"role": "user", "content": "Solve this algebra problem: 2x + 5 = 13"}]
5)

Medium Effort (Default)

  • Balanced performance
  • Good for most use cases
  • Recommended starting point
1response = client.chat.completions.create(
2 model="o4-mini",
3 reasoning_effort="medium",
4 messages=[{"role": "user", "content": "Design an algorithm to find the shortest path in a weighted graph"}]
5)

High Effort

  • Most thorough reasoning
  • Higher token consumption
  • Best for very complex problems
1response = client.chat.completions.create(
2 model="o4-mini",
3 reasoning_effort="high",
4 messages=[{"role": "user", "content": "Prove the Pythagorean theorem using multiple different approaches"}]
5)

Ideal Use Cases

Mathematical Problem Solving

1response = client.chat.completions.create(
2 model="gemini-2.5-pro",
3 reasoning_effort="high",
4 messages=[{
5 "role": "user",
6 "content": "Solve this optimization problem: Minimize f(x,y) = x² + y² subject to x + 2y = 4"
7 }]
8)

Complex Coding Challenges

1response = client.chat.completions.create(
2 model="o4-mini",
3 reasoning_effort="medium",
4 messages=[{
5 "role": "user",
6 "content": "Implement a balanced binary search tree with insert, delete, and search operations in Python"
7 }]
8)

Scientific Reasoning

1response = client.chat.completions.create(
2 model="gemini-2.5-pro",
3 reasoning_effort="high",
4 messages=[{
5 "role": "user",
6 "content": "Explain the thermodynamic principles behind refrigeration and calculate the efficiency of a Carnot cycle"
7 }]
8)

Multi-Step Planning

1response = client.chat.completions.create(
2 model="o4-mini",
3 reasoning_effort="medium",
4 messages=[{
5 "role": "user",
6 "content": "Design a complete system architecture for a real-time collaborative document editor"
7 }]
8)

Tips for Best Results

  • Clearly state the problem and any constraints
  • Ask for step-by-step explanations when helpful
  • Use higher reasoning effort for truly complex problems
  • Consider token costs when choosing effort levels
  • Break extremely complex problems into smaller sub-problems