IniziaInizia gratis

Using Claude's thinking mode

SkyTrack, a fitness-tracking startup, must pick one big push: invest in social-media ads or double down on influencer partnerships. Your job is to prompt Claude to think about budget, audience, competition, and help the founders defend the chosen strategy to investors.

The anthropic library and client are preloaded.

Questo esercizio fa parte del corso

Introduction to Claude Models

Visualizza il corso

Istruzioni dell'esercizio

  • Create a thinking prompt for strategic decision-making.
  • Include the thinking parameter in the API call to activate Claude's thinking mode.
  • Set max_tokens to allow for detailed reasoning.
  • Pass the thinking_prompt variable.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Create a thinking prompt for strategic decision-making
thinking_prompt = """
Think through this marketing decision:
Should a new fitness app focus on social media marketing or influencer partnerships?
Consider: ____
"""

# Make API call requesting systematic thinking
response = client.messages.create(model="claude-3-7-sonnet-latest", thinking=____, max_tokens=____, messages=[{"role": "user", "content": ____}])

print("Claude's reasoning:")
print(response.content[0].thinking)
Modifica ed esegui il codice