本番環境のトレースをIDEに取り込み、不正なLLMレスポンスをデバッグする
使うタイミング: ユーザーから誤った回答の報告があり、トレースがOpikに記録されている場合。Cursorを離れずに調査したいとき。
前提条件
- Opik APIキー — comet.com/site > API Keys(またはセルフホストの管理画面)
フロー
-
トレースを検索するSearch traces in project 'prod-chatbot' where output contains 'I cannot help with that'. Last 24h.✓ コピーしました→ 該当するトレースIDとタイムスタンプ
-
詳細を確認するOpen trace ID abc123. Show me the full message chain, tools called, and intermediate reasoning.✓ コピーしました→ 完全なトレースオブジェクト
-
仮説を立てるWhy might the model have refused? Compare this trace to a successful one on the same prompt template.✓ コピーしました→ 差分と仮説
結果: アプリを切り替えずに、トレースベースの高速デバッグが可能になります。
注意点
- トレース内の個人情報(PII) — MCPアクセスを広く有効化する前に、Opikのリダクション設定を行ってください