Skip to content

Adding support for procedural memory, hardens the durable + SDK pipeline, and simplifies the deployment for Release#15

Merged
aayush3011 merged 14 commits into
AzureCosmosDB:mainfrom
aayush3011:users/akataria/improvements
May 29, 2026
Merged

Adding support for procedural memory, hardens the durable + SDK pipeline, and simplifies the deployment for Release#15
aayush3011 merged 14 commits into
AzureCosmosDB:mainfrom
aayush3011:users/akataria/improvements

Conversation

@aayush3011
Copy link
Copy Markdown
Contributor

@aayush3011 aayush3011 commented May 26, 2026

Memory model

  • New synthesize_procedural() flow on pipeline + processors (sync/async)
    and a SynthesizeProceduralOrchestrator chained off reconcile in durable
    mode. Procedural memory is now a per-user reflection over the deduped
    fact + episodic-lesson pool, not a per-turn extraction.
  • Removed procedural type from extract_memories; renamed
    facts_countfact_count end-to-end.
  • Sharpened UPDATE vs CONTRADICT semantics in the extraction prompt
    and reconcile path.

Strict prompty schemas

  • Every prompty now ships a strict response_format JSON schema
    (additionalProperties: false, all properties required).
  • Thread- and user-summary schemas expanded to mirror their rich prompty
    bodies (overview / decisions / action items; behavioral patterns,
    compliance, etc.) so the structured payload is preserved end-to-end.
  • New conformance test asserts each prompty's example JSON matches its
    schema — guards against the drift that caused the earlier "raw JSON
    dump" bug.

Pipeline + SDK hygiene

  • Auto-trigger parity: in-process backend now fires synthesize_procedural
    after reconcile, gated on PROCEDURAL_SYNTHESIS_AUTO, matching the
    durable orchestrator.
  • Procedural queries use SELECT TOP 50 ... ORDER BY salience DESC so
    RU + LLM costs stay bounded on hot users.
  • _mutate_tags falls back to the turns container on 404 (parity with
    update_cosmos / delete_cosmos).
  • close() now releases the owned pipeline + processor on both sync and
    async clients.
  • temperature removed from every prompty; chat clients hardcode 1.0
    so reasoning-model families (gpt-5.x, o-series) work without
    per-prompty overrides.

Infra

  • Bicep deploy modes collapsed to full (resources + function) and
    SDK-only (resources only) — all BYO variants removed.
  • One AI Foundry resource now hosts both the embedding model and the
    chat model.
  • Explicit RBAC: UAMI + deploying user get Cosmos Reader + Contributor,
    AI Foundry user role, and Storage Blob/Queue Data Contributor.
  • azd up provisions cleanly with no manual post-steps.

Tests

  • 687 unit tests passing.
  • Adds dedicated suites for procedural synthesis, reconcile semantics,
    schema/prompty conformance, async hygiene, and tag mutation.

Brings forward the procedural-synthesis feature on top of the post-PR-#13
baseline and applies hygiene cleanup.

- Adds synthesize_procedural() on pipeline + processors (sync/async) and
  the Durable Functions orchestrator. Procedural memory is now produced
  via this dedicated reflection flow over a user's full history (system-
  prompt-style), not as a per-turn extraction.
- Strips procedural emission from extract_memories: removes the procedural
  type from the extraction prompt, drops procedural_count from result
  dicts and docstrings, and trims procedural from _load_existing_memories.
- Renames facts_count -> fact_count across pipeline, processors, FA
  orchestrator docstring, and all tests.
- Cosmetic enum rename: supersede_reason value 'contradiction' ->
  'contradict' for verb-tense consistency with 'update'. README and
  Docs/concepts.md updated accordingly.

Unit suite: 531 passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aayush3011 aayush3011 force-pushed the users/akataria/improvements branch from 40fa728 to e87df99 Compare May 27, 2026 00:40
@aayush3011 aayush3011 changed the title Add procedural synthesis, strip per-turn procedural, fact_count rename Brings procedural memory online, hardens the durable + SDK pipeline, and simplifies the deployment for Release May 28, 2026
@aayush3011 aayush3011 changed the title Brings procedural memory online, hardens the durable + SDK pipeline, and simplifies the deployment for Release Adding support for procedural memory, hardens the durable + SDK pipeline, and simplifies the deployment for Release May 28, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aayush3011 aayush3011 marked this pull request as ready for review May 28, 2026 22:44
Copilot AI review requested due to automatic review settings May 28, 2026 22:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@aayush3011 aayush3011 merged commit e0de0b1 into AzureCosmosDB:main May 29, 2026
3 of 6 checks passed
@aayush3011 aayush3011 deleted the users/akataria/improvements branch May 31, 2026 16:11
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