For Japanese version, see IEmbeddingProvider-jp.md.
IEmbeddingProvider (Interface Specification)
1. Responsibility Boundary
IEmbeddingProvider converts text into semantic vectors and supplies numeric foundations for semantic-space operations in Phase 1.
- Role:
- Non-role:
Provide single/batch embedding generation and vector-dimension metadata.
Vector persistence, indexing, nearest-neighbor search, and Core knowledge retrieval are out of scope.
2. Contract Signature
namespace AIKernel.Abstractions.Providers;\n\npublic interface ITextEmbeddingProvider\n{\n Task<float[]> EmbedAsync(string text, CancellationToken cancellationToken = default);\n}\n\npublic interface IBatchEmbeddingProvider\n{\n Task<IReadOnlyList<float[]>> EmbedBatchAsync(IReadOnlyList<string> texts, CancellationToken cancellationToken = default);\n}\n\npublic interface IEmbeddingDimensionProvider\n{\n int GetDimension();\n}\n\npublic interface IEmbeddingProvider :\n IProvider,\n ITextEmbeddingProvider,\n IBatchEmbeddingProvider,\n IEmbeddingDimensionProvider\n{\n}
3. Related Use Cases
UC-05Material relevance evaluation:UC-11RAG:- Phase 1 Query Processing:
Uses embeddings for similarity-based material filtering.
Projects queries and material chunks into a common vector space when a provider or pipeline strategy performs material retrieval.
Supports optional semantic projection after IQueryDecomposer has produced QueryPart units.
4. Governance & Determinism
- Model stability:
- Fail-Closed:
- RAG boundary:
For the same ProviderId and configuration, embedding dimensionality/space behavior should not drift silently.
Input-limit violations or dimension mismatches should fail explicitly instead of returning partial semantics.
Embedding support does not make Core a retrieval engine; it only exposes semantic projection capability.
5. Implementation Notes
- Dimension consistency:
- Batch throttling:
Ensure GetDimension() always matches produced vector lengths.
EmbedBatchAsync should consider provider rate limits and apply chunking when required.
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
- v0.0.1 (2026-05-09): Aligned embedding docs with split capabilities and Phase 1 Query Processing
architecture/interfaces/provider/IEmbeddingProvider.md