Principles of Information Category Separation
Do not mix information passed to an LLM into a single context. This is AIKernel's most important architectural principle.
As the uploaded documents state:
Mixing information causes attention to be drawn to surface structures, halting abstract inference and causing surface-mode failure. AIKernel structurally prevents this by enforcing category separation at the OS level.
1. Information Categories
Information passed to an LLM must be classified into the following categories and must not be mixed:
- purpose
- constraints
- structure
- history
- context
- rag_material
- expression
- metadata
These categories are based on the uploaded documents.
2. Theoretical Background (Attention Pollution)
AIKernel's philosophy is based on Attention Pollution Theory.
From the uploaded documents:
An LLM's attention is finite and must be focused on abstract structure, purpose, and constraints needed for inference.
Mixing the following pollutes attention:
- examples
- stylistic instructions
- RAG fragments
- history
- noise
These are surface structures that steal attention and break inference.
3. Failure Modes
Mixing categories leads to:
3.1 Surface-mode
- style-only mimicry
- no inference
- no structural understanding
- loss of purpose
3.2 Inference halt
- structure fails to get attention
- reasoning depth collapses
- chain-of-thought breaks
3.3 Increased hallucination
- Mixing context and rag_material makes it hard to determine factuality
3.4 Broken deterministic replay
- Mixing history and question destroys reproducibility
4. Principles (AIKernel official rules)
From the uploaded documents, AIKernel's OS-level rules:
4.1 Do not include examples in the inference category
Examples attract attention and halt inference.
4.2 Treat RAG results as material; do not mix into inference
Place RAG in MaterialContext and do not pass it directly into OrchestrationContext.
4.3 Do not mix history and question
Summarize history and separate it as a category when necessary.
4.4 Prioritize structure in attention
Abstract structure is the primary target for attention.
4.5 Use expression only in the output layer
Style, examples, and metaphors belong in ExpressionContext.
5. Implementation (Context Isolation)
AIKernel enforces category separation at the specification level.
Three-layer structure:
5.1 OrchestrationContext (inference)
- purpose
- constraints
- abstract structure
- reasoning patterns
5.2 ExpressionContext (expression)
- style
- examples
- explanations
- metaphors
5.3 MaterialContext (material)
- RAG fragments
- external information
This separation makes category mixing structurally impossible.
6. Purpose (Why)
Category separation aims to:
- maximize inference purity
- prevent attention pollution
- avoid surface-mode
- maximize LLM abstract inference capability
- guarantee deterministic replay
- maintain OS-level consistency
7. Related Documents
- Context Isolation Specification
- Attention Pollution Theory
- Risks of Surface-Mode Failure
- Preprocessing vs Prompting
- AIKernel vs LangChain — Structural Comparison
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
architecture/1.CATEGORY_SEPARATION_PRINCIPLES.md