AIKernel.NET
version: 0.0.2 / status: Refactor / edition: Draft / published: 2026-05-16 / updated: 2026-05-16

Phase 1 Query Processing

Phase 1 Query Processing defines how AIKernel shapes query intent before context build, material quarantine, and reasoning execution.

It is not a knowledge-retrieval engine. It is a contract layer for transforming, decomposing, semantically projecting, and routing query intent under KernelContext.

1. Responsibility Boundary

  • IQueryAugmentor normalizes, augments, and rewrites query intent without committing material.
  • IQueryDecomposer splits complex input into ordered QueryPart units.
  • IEmbeddingProvider projects text into semantic vector space when a provider capability supports it.
  • IQueryRouter assigns QueryPart units to capable providers using declared capabilities.
  • QueryPart is the immutable DTO passed from query planning to material/context build.

RAG remains a provider or pipeline strategy that can supply material. Core query abstractions must not own retrieval, indexing, or knowledge-store mutation.

2. Phase 1 Flow

Input Query\n  -> IQueryAugmentor\n  -> IQueryDecomposer\n  -> QueryPart[]\n  -> optional IEmbeddingProvider semantic projection\n  -> IQueryRouter provider selection\n  -> ROM / CacheDB material resolution\n  -> Material Quarantine\n  -> Structure Phase

3. Alignment With Existing Concepts

  • Phase 1: Query augmentation, decomposition, embedding projection, and routing happen before Structure.
  • Phase 2: Generation and Polish must not mutate QueryPart state.
  • ROM: Query processing can target ROM material, but ROM identity and canonical hashes remain authoritative.
  • CacheDB: Cache hits are material-resolution outcomes, not query-processing state.
  • Governance: PDP/Guard decisions can deny or abort query processing before partial state is committed.

4. Provider Capability Extension

Providers declare query support through capability metadata:

  • SupportsQueryAugmentation
  • SupportsQueryDecomposition
  • SupportsQueryRouting
  • MaxQueryParts
  • SupportedQueryProcessingOperations
  • SupportsEmbedding
  • EmbeddingDimensions
  • SupportedEmbeddingModels

The Kernel uses these declarations for routing and audit; it does not infer hidden provider abilities.


Changelog

  • v0.0.1 (2026-05-09): Initial Phase 1 Query Processing architecture
Source: architecture/17.QUERY_PROCESSING_PHASE1.md