Reasoning
Enable step-by-step reasoning
Reasoning mode shows the agent’s thought process.
Quick Start
- Create Reasoning Agent
rust use praisonai::Agent; // Build step-by-step reasoning into instructions let agent = Agent::new() .name("Thinker") .instructions("When solving problems: 1. Break down the problem into smaller parts 2. Think through each part step by step 3. Show your reasoning before the final answer 4. Provide a clear conclusion") .build()?; let response = agent.chat("What causes rain?").await?; // Agent shows step-by-step reasoning in response - Use Reasoning-Optimized Models
rust use praisonai::Agent; // Use models designed for reasoning let agent = Agent::new() .name("Analyst") .model("o1-preview") // OpenAI reasoning model .instructions("Analyze this complex problem thoroughly") .build()?;
When to Use
| Task | Use Reasoning? |
|---|---|
| Math problems | ✅ Yes |
| Complex analysis | ✅ Yes |
| Simple questions | ❌ No |
| Quick lookups | ❌ No |