Claude를 활용한 분석적 문제 해결
성공적인 프로모션 이후 웹사이트 트래픽이 40% 급증했지만, 유료 구독자 수는 5%밖에 늘지 않았습니다. Claude의 확장 사고 기능을 활성화하여 이 불일치를 분석해 보세요. 심층 분석 결과는 SkyTrack의 다음 성장 전략에 도움이 될 것입니다.
anthropic 라이브러리와 client는 미리 로드되어 있습니다.
이 연습은 강의의 일부입니다
Claude 모델 입문
연습 안내
- 분석적 사고를 위한 프롬프트를 작성하세요.
- API 호출에
thinking매개변수를 추가하여 확장 사고를 활성화하세요. - Claude가 추론과 답변을 충분히 생성할 수 있도록
max_tokens를 1400과 같이 높게 설정하세요. - 분석 결과를 출력하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# 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-sonnet-4-6", thinking=____, max_tokens=____, messages=[{"role": "user", "content": analysis_prompt}])
# Print the analysis results
print("Analysis results:")
print(response.content[0].thinking)