Skip to content

feat(ai): Phase 5 — VectorData RAG with governed embeddings - #235

Draft
IanFrelinger wants to merge 6 commits into
masterfrom
cursor/meai-phase5-vectordata-5a04
Draft

feat(ai): Phase 5 — VectorData RAG with governed embeddings#235
IanFrelinger wants to merge 6 commits into
masterfrom
cursor/meai-phase5-vectordata-5a04

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Phase 5 of the MEAI migration: add Microsoft.Extensions.VectorData RAG alongside the governed chat pipeline, without flipping the feature flag or removing the legacy RAG path.

  • In-process VectorStore / ChunkRecord collection (InProcessVectorStore)
  • Governed embeddings: TokenHashEmbeddingGenerator with Sanitizing → Auditing → provider order (matches chat AsyncLocal audit visibility)
  • VectorDataRagService for index / tier-filtered search / batch reindex
  • Hosting Phase 13b always registers VectorData RAG + governance defaults; chat remains behind Nexo:UseMeaiPipeline
  • CLI: nexo background-agent rag reindex-meai (legacy store left read-only)
  • Align AWS CPM to v4 (Core / DynamoDBv2 / S3 / Lambda) so Bedrock MEAI and DynamoDB co-restore

Stacking

Includes Phases 0–4. Prefer merge order #230#231#232#233#234 → this PR (or take the latest tip alone).

Test plan

  • dotnet test src/Nexo.Tests.AI.Pipeline — 33 passed (net8 + net9)
  • dotnet build application/src/Nexo.CLI — succeeds with AWS v4 CPM
  • dotnet build src/Nexo.Ingress.DynamoDb — succeeds on DynamoDBv2 4.0.101.1
  • Manual: NEXO_USE_MEAI_PIPELINE=1 nexo background-agent rag reindex-meai <path> when a host is wired
Open in Web Open in Cursor 

cursoragent and others added 6 commits July 14, 2026 17:59
Map current model invocation, sanitization, audit, policy packs, RAG,
and host DI seams to proposed Microsoft.Extensions.AI concepts for the
governed pipeline migration.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Add Nexo.AI.Pipeline with keyed local:ollama and local:onnx chat clients,
wire optional registration through hosting Phase 13b when
Nexo:UseMeaiPipeline is enabled (default off), and cover registration
with FakeChatClient tests. Legacy IProviderFactory path remains default.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Introduce UseNexoGovernance with fixed PolicyGate → Sanitizing → Auditing
order on every keyed IChatClient, plus unit tests for deny short-circuit,
PII redaction, audit outcomes, and composition/architecture guarantees.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Introduce policy × availability routing outside per-target governance
stacks, with audited route decisions and a table-driven matrix of
local/cloud fallback scenarios.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Register cloud:bedrock:{fast,balanced,heavy} with configurable model ids,
reuse the default AWS credential chain, keep Bedrock SDK clients out of DI,
and cover routing/sanitization/audit with fake-transport tests.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Introduce an in-process Microsoft.Extensions.VectorData store, sanitizing/
auditing embedding generators, VectorDataRagService, and a CLI reindex
command while leaving the legacy RAG path read-only. Align AWS SDK CPM
to v4 so Bedrock MEAI and DynamoDB co-restore cleanly.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants