Repository navigation
feat: add vector-backed memory and Azure AI Search - #1297
Conversation
Add the chat-history memory provider, reusable VectorData store facade, Azure AI Search connector, and shared generic vector helpers with regression tests and examples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Shared-handle key inconsistencies can duplicate records, and generated Azure indexes reject accepted key-based ordering.
2 open findings
What changed in this PR
Extends the VectorData foundation from #1293 with vector-backed chat memory, a reusable store facade, and Azure AI Search integration.
Changes:
- Adds typed and dynamic collection factories with Go 1.26 compatibility and Go 1.27 generic methods.
- Adds Azure AI Search authentication, schema management, CRUD, filtering, and vector/hybrid search.
- Adds memory examples, telemetry coverage, and compatibility documentation.
| File | Description |
|---|---|
| vectordata/vectordata.go | Moves store contracts into the facade. |
| vectordata/store.go | Adds provider-independent collection factories. |
| vectordata/store_go127.go | Adds the generic collection method. |
| vectordata/store_go127_test.go | Tests generic collection factories. |
| vectordata/providerservices/filter_test.go | Migrates schema configuration. |
| vectordata/providerservices/embedding.go | Adds shared vector helpers. |
| vectordata/providerservices/embedding_test.go | Tests vector representations and generation. |
| vectordata/providerservices/builder.go | Resolves runtime types and generator defaults. |
| vectordata/inmemory/vector.go | Removes duplicated vector helpers. |
| vectordata/inmemory/store.go | Supports differently typed collections. |
| vectordata/inmemory/snapshot.go | Adapts snapshots to shared stores. |
| vectordata/inmemory/snapshot_test.go | Migrates snapshot regression tests. |
| vectordata/inmemory/search.go | Adapts search to shared storage. |
| vectordata/inmemory/search_test.go | Migrates search configuration tests. |
| vectordata/inmemory/record.go | Adds runtime key and record handling. |
| vectordata/inmemory/embedding_test.go | Tests generator precedence and ownership. |
| vectordata/inmemory/collection.go | Adapts collection operations to runtime types. |
| vectordata/definition.go | Documents generator precedence. |
| vectordata/collection.go | Adds typed collection adapters. |
| README.md | Introduces memory and Azure Search capabilities. |
| provider/azureprovider/search.go | Implements filtered, vector, and hybrid retrieval. |
| provider/azureprovider/search_test.go | Tests search requests and pagination. |
| provider/azureprovider/schema.go | Maps schemas to Azure indexes. |
| provider/azureprovider/schema_test.go | Tests schema mappings and validation. |
| provider/azureprovider/record.go | Encodes and decodes Azure documents. |
| provider/azureprovider/README.md | Documents connector usage and limitations. |
| provider/azureprovider/filter.go | Translates portable filters to OData. |
| provider/azureprovider/filter_test.go | Tests filter translation. |
| provider/azureprovider/embedding_test.go | Tests generation and memory integration. |
| provider/azureprovider/collection.go | Implements collection lifecycle and CRUD. |
| provider/azureprovider/client.go | Adds authenticated REST transport. |
| provider/azureprovider/client_test.go | Tests redirects and cancellation. |
| provider/azureprovider/aisearch.go | Adds the Azure Search store. |
| provider/azureprovider/aisearch_test.go | Tests authentication and lifecycle operations. |
| provider/azureprovider/aisearch_go127_test.go | Tests generic Azure collection access. |
| provider/azureprovider/aisearch_e2e_test.go | Adds opt-in live integration tests. |
| internal/telemetry/featureusage.go | Registers chat-history memory usage. |
| internal/telemetry/featureusage_activation_test.go | Tests memory telemetry activation. |
| examples/internal/demo/foundry.go | Updates the default embedding model. |
| examples/02-agents/rag/step01_basic_text_rag/main.go | Migrates collection configuration. |
| examples/02-agents/rag/README.md | Updates embedding defaults documentation. |
| examples/02-agents/providers/azure/ai_search/README.md | Documents Azure sample setup. |
| examples/02-agents/providers/azure/ai_search/main.go | Demonstrates scoped Azure searches. |
| examples/02-agents/memory/step05_bounded_chat_history/main.go | Demonstrates bounded history with memory. |
| examples/02-agents/memory/step05_bounded_chat_history/history.go | Archives and recalls overflow messages. |
| examples/02-agents/memory/step01_chat_history_memory/main.go | Demonstrates cross-session recall. |
| examples/02-agents/memory/README.md | Documents memory examples. |
| examples/02-agents/agents/step22_foundry_memory/main.go | Updates the default embedding deployment. |
| embedding/options_test.go | Updates embedding option fixtures. |
| embedding/embedding_test.go | Updates embedding metadata fixtures. |
| docs/feature-usage-telemetry.md | Documents memory activation tracking. |
| docs/dotnet-go-sdk-feature-comparison.md | Documents new capabilities and Go differences. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use the declared schema key type for storage and lookup instead of the handle key type. Cover shared typed/dynamic upserts, replacements, deletions, and snapshot merges without changing input records. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mark generated index keys sortable to support accepted GetFiltered ordering. Assert the schema flag and storage-name translation and exercise ascending and descending UUID key ordering in the live CRUD test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assert expected iterator errors and capture the tool-run error channel instead of discarding them. Satisfy golangci-lint 2.15 errcheck diagnostics without weakening the lint configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the upstream errcheck test fixes and FileAccess catalog updates. This clears the conflicting merge base so pull-request test and lint workflows can run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API consistency review
Changed Go contractRe-review of the three commits added since the prior review (
Upstream evidence reviewedNo new upstream comparison was required: these commits are bug fixes to already-reviewed functionality (shared in-memory key handling and Azure AI Search index schema generation) from the prior AssessmentNo parity issues. These are internal correctness fixes (in-memory key normalization, Azure AI Search key-field sortability) with no exported API changes and no divergence from upstream semantics; they complete behavior already covered by the prior
|
|
Addressed both review findings and verified the latest head (
Validation: 26 checks passed, 2 skipped, no failures, including root/catalog lint and the complete Go 1.26/1.27 platform test matrix. Affected local tests and vet also pass. The live Azure native CRUD/key-sorting test passed, and its temporary index was deleted. Both review threads have been answered and resolved. |


Summary
Builds on the already-merged #1293; this branch is rebased on current main.
Validation
--new-from-rev=origin/main: 0 issues.