1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Claude / ChatGPT API で作る実用的な業務自動化レシピ5選

1
Posted at

社内で実際に運用している LLM API を使った業務自動化の構成を5つ紹介する。いずれも数十行で書けて、ROI が分かりやすいものに絞った。

1. 議事録要約(Whisper + Claude)

録音ファイルを Whisper で文字起こしし、Claude に要約させる構成。会議の「決定事項」と「アクション」を分けて出力させるのがコツ。

from anthropic import Anthropic
client = Anthropic()

msg = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=2000,
    messages=[{"role": "user", "content": f'''
以下の議事録を要約せよ。形式は JSON。
- decisions: 決定事項の配列
- actions: {{owner, task, due}} の配列
- risks: 懸念点の配列

議事録:
{transcript}
'''}]
)

2. メール下書き生成

Gmail API で未返信スレッドを取得し、過去のやり取りを文脈として渡して返信案を生成する。送信は必ず人間が確認 する運用で事故を防ぐ。

3. コードレビュー補助

GitHub Actions で PR の差分を取得し、Claude に一次レビューを書かせてコメントする。規約違反と明らかなバグだけに絞ると精度が高い。

- name: AI Review
  run: |
    git diff origin/main...HEAD > diff.txt
    python review.py diff.txt

指示プロンプトには「明確なバグ以外は指摘しない」と書くのが重要。雑な指摘を潰せる。

4. CS 問い合わせの一次分類

問い合わせ本文を渡し、カテゴリ・緊急度・担当チームを JSON で返させる。後段のルーティングに接続する。temperature=0 にして出力を安定させる。

categories = ["請求", "不具合", "機能要望", "その他"]
prompt = f"問い合わせを {categories} から選び JSON で返せ:\n{inquiry}"

5. 定例レポートの下書き

Notion や BigQuery から数値を取得し、Claude に週次レポートのドラフトを書かせる。数値は必ずコード側で取得し、LLM に計算させない のが鉄則。計算は決定論的処理で行い、LLM は文章生成だけに使う。

運用で効いた設計原則

  • 出力は JSON 固定にして後続処理を楽にする
  • LLM に事実を作らせない(計算・取得は通常コードで)
  • 人間の承認ステップを1箇所残す
  • コストと遅延は Sonnet / GPT-4o mini クラスで十分なケースが多い

地味だが、この5つで月あたりの手作業時間はかなり削れる。派手な AI 活用より、こういう継ぎ目のない自動化のほうが実益が大きい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?