Preprocessing vs Prompting
— 本質はプロンプト設計ではなく preprocessing
歴史的に prompt 記述が重視されてきました。AIKernel の立場は明確です。
Prompt は最終整形工程に過ぎず、推論品質は preprocessing で決まる。
1. なぜ prompt 設計は誤解されてきたか
多くの実務者は次を前提にします:
- Prompt wording が鍵である → ❌
- Few-shot examples が精度を上げる → ❌
- RAG をそのまま渡してよい → ❌
Attention Pollution 理論は、これらの前提を否定します。
Few-shot の誤謬
Few-shot は精度向上の魔法ではなく、attention を表層構造へ引き寄せ、推論を汚染する要因です。
AIKernel は Few-shot を推論破壊要因として扱います。
生 RAG の投入は構造を破壊する
生データは noise を含み、抽象構造を attention から押し出します。
2. 本当の問い: attention に何を入れるか
AIKernel は prompt の文体ではなく、attention の制御に集中します。
attention に入れるもの:
- purpose
- constraints
- abstract structure
- reasoning patterns
attention から隔離するもの:
- examples
- stylistic instructions
- RAG fragments
- history
- noise
AIKernel が扱うのは単なる text ではなく、情報構造です。
3. Preprocessing の役割
— OS レベル安定性のための決定論的制御
Preprocessing は OS レベルで 3 つの性質を保証します。
3.1 Category separation
(参照: Principles of Information Category Separation)
3.2 Context isolation
(参照: Context Isolation Specification)
3.3 RAG structuring(Quarantine)
生 RAG を潜在的に有害な素材として扱う:
- Retrieve(RAG / Provider)
- Normalize(不要データ除去)
- Structure(分解・抽象化・単位化)
- 必要部分のみを OrchestrationContext へ転送
これは「RAG をそのまま LLM に投げる」方式と本質的に異なります。
4. Prompting の限界
— 非決定的処理に依存しない
Prompt は非決定的な LLM 入力です:
- style
- examples
- explanations
- metaphors
これらは ExpressionContext に属し、推論へ影響させてはなりません。
Prompt 微調整で推論品質は安定改善できない
推論品質は preprocessing で決まり、prompt は見た目を整えるだけです。
5. Preprocessing は craft ではなく design
— AI 開発をスケールさせる必須要件
Prompt engineering はしばしば勘に依存します。Preprocessing はデータ構造設計であり、再現性・拡張性・自動化を支えます。
AIKernel が重視するもの:
- intuition より structure
- craft より design
- prose より categories
- feel より determinism
これにより AI 開発を職人的作業から工学へ移行させます。
6. 結論
— Prompt は最終整形、推論品質は preprocessing で決まる
AIKernel の立場:
- Prompt は ExpressionContext に属する
- 推論品質は Preprocessing で決まる
- Preprocessing = category separation, structuring, isolation, quarantine
- AIKernel の本質は Preprocessing over Prompting
7. AIKernel における位置づけ
この原則は次を支えます:
- category separation
- context isolation
- attention pollution theory
- surface-mode prevention
- preprocessing-first design
- deterministic replay
AIKernel は情報構造設計を通じて inference purity を最大化します。
8. 関連文書
- Principles of Information Category Separation
- Context Isolation Specification
- Attention Pollution Theory
- Risks of Surface-Mode Failure
- AIKernel vs LangChain — Structural Comparison
変更履歴
- v0.0.0 / v0.0.0.0: 初期ドラフト
- v0.0.1 (2026-05-06): ドキュメント規約に基づくバージョン更新
architecture/5.PREPROCESSING_VS_PROMPTING-jp.md