LoslegenKostenlos loslegen

Analytical problem solving with Claude

After your successful promo, website traffic jumped 40 %, yet paid subscriptions crawled up only 5 %. Activate Claude’s extended thinking to unpack this mismatch: the detailed analysis will guide SkyTrack’s next growth sprint.

The anthropic library and client are preloaded.

Diese Übung ist Teil des Kurses

Introduction to Claude Models

Kurs anzeigen

Anleitung zur Übung

  • Create an analytical thinking prompt.
  • Use the thinking parameter in your API call to turn on extended thinking.
  • Set a high max_tokens, such as 1400, to give Claude enough room for reasoning and the answer.
  • Print the analysis results.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Create an analytical thinking prompt
analysis_prompt = """
Analyze this business scenario and walk me through your reasoning:
Our website traffic increased 40% but sales only grew 5%.
___
Provide multiple possible explanations and rank them by likelihood.
"""

# Request detailed analytical thinking
response = client.messages.create(model="claude-3-7-sonnet-latest", thinking=____, max_tokens=____, messages=[{"role": "user", "content": analysis_prompt}])
# Print the analysis results
print("Analysis results:")
print(response.content[0].thinking)
Code bearbeiten und ausführen