AI-powered applications の設計では、適切な AI approach を選び、AI 特有の性質(non-determinism、cost、latency、errors)を扱い、inherently imperfect な AI の周りに reliable system を設計します。software engineering と AI-specific considerations の組み合わせです。
AI approach の選択
text
→ PROMPTING (LLM APIs) → 多くの LLM task で simplest。good prompts は強力
→ RAG → own/current DATA に answer を ground し hallucination を減らす
→ FINE-TUNING → prompting では達成できない specific behavior/style
→ TRADITIONAL ML → structured prediction/classification with data
→ PRE-BUILT services → vision, speech など。reinvent しない
→ problem に approach を合わせる (LLM apps では often prompting + RAG)
AI の性質を前提に設計する
text
⚠️ AI is IMPERFECT/non-deterministic:
✓ VALIDATE AI output → structured output + validation, guardrails
✓ HANDLE ERRORS/failures → AI が wrong/unavailable/slow な場合の fallback
✓ HALLUCINATION → RAG, verification, citations, important decisions では human review
✓ HUMAN-IN-THE-LOOP → high-stakes decisions は fully automate しない
✓ NON-DETERMINISM → identical outputs を仮定しない
