You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: Docs/concepts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ Prompts for summarization and fact extraction live in `azure_functions/prompts/`
119
119
The `reconcile_memories(user_id, n=50)` pipeline step reads up to N most-recent active facts for a user and asks the LLM to identify two orthogonal outcomes in one pass:
120
120
121
121
-**Duplicates** — two or more facts that restate the same claim in different words. Resolution: collapse into one merged fact; the originals are soft-deleted with `supersede_reason="duplicate"` and `superseded_by` set to the merged fact's id.
122
-
-**Contradictions** — two facts that assert opposing claims about the same subject. Resolution: keep the winner (more recent first, higher confidence as tiebreaker), soft-delete the loser with `supersede_reason="contradiction"` and `superseded_by` set to the winner.
122
+
-**Contradictions** — two facts that assert opposing claims about the same subject. Resolution: keep the winner (more recent first, higher confidence as tiebreaker), soft-delete the loser with `supersede_reason="contradict"` and `superseded_by` set to the winner.
`reconcile(user_id, n=50)` (on the public client; underlying pipeline method is `ProcessingPipeline.reconcile_memories`) collapses paraphrased duplicates and resolves semantic contradictions in a single LLM pass over the N most-recent active facts. Both outcomes soft-delete the loser with a `supersede_reason` of `"duplicate"` or `"contradiction"`. See [Docs/concepts.md](Docs/concepts.md#memory-reconciliation) for details.
173
+
`reconcile(user_id, n=50)` (on the public client; underlying pipeline method is `ProcessingPipeline.reconcile_memories`) collapses paraphrased duplicates and resolves semantic contradictions in a single LLM pass over the N most-recent active facts. Both outcomes soft-delete the loser with a `supersede_reason` of `"duplicate"` or `"contradict"`. See [Docs/concepts.md](Docs/concepts.md#memory-reconciliation) for details.
174
174
175
175
> **Cost note.** Each reconciliation makes one LLM call covering up to `n` facts (default 50, hard cap 500). With auto-trigger, this fires every `FACT_EXTRACTION_EVERY_N × DEDUP_EVERY_N` turns per user, with `n` taken from `DEDUP_POOL_SIZE`. The previous cosine-cluster pre-filter was removed deliberately — it could not catch semantic contradictions like "vegetarian" vs "ribeye steak" — so the LLM is now invoked whenever there are ≥ 2 active facts. To bound LLM cost more tightly: raise `DEDUP_EVERY_N` (lower frequency — reconcile fires every Nth extraction, so a *higher* N means *less often*), lower `DEDUP_POOL_SIZE` (smaller per-call pool), or override `n` per call when invoking `reconcile()` directly.
176
176
177
177
| New `MemoryRecord` field | Meaning |
178
178
|---|---|
179
179
|`content_hash`| SHA-256 of normalized content; enables write-time exact-dedup short-circuit |
180
-
|`supersede_reason`|`"duplicate"` or `"contradiction"` (None for live records) |
180
+
|`supersede_reason`|`"duplicate"` or `"contradict"` (None for live records) |
181
181
|`superseded_at`| ISO timestamp when the supersede happened (None for live records) |
182
182
|`superseded_by`| Id of the record that replaced this one (existing field) |
0 commit comments