v1 slice 3: one lesson, one copy: judge duplicates and merge (add, then retire) #6

Open
opened 2026-11-25 18:00:11 +00:00 by uranus · 0 comments
Member

Purpose (feature): a lesson that says what an existing one says is merged into it, so a search returns one copy, not several that drift.

After slice 2. Q7 ruled by the Supervisor (#1, comment 4644).

  • For each generalized lesson, fetch its nearest neighbours with mcl-rag answer_query.
  • With a model: the model judges "same lesson or not". Without one: a fixed similarity threshold (a setting).
  • Merge = add_knowledge of the merged text, then retire_document on the old lesson. mcl-scribe is that realm's mcl-rag operator. Both steps are events in the log, and a failed retire is retried from the log. A failure in between leaves a duplicate for a while, never a lost lesson.
  • The state is merged into the surviving lesson id.

Done when:

  • Two lessons that say the same thing leave one document in mcl-rag. lesson_status of the second reads merged into the first's id.
  • A retire that fails is retried after a restart, and the duplicate goes. The add is never undone.
  • A lesson below the threshold (or judged different) is stored new.
  • Tests use a stand-in mcl-rag.

Refs #1

Purpose (feature): a lesson that says what an existing one says is merged into it, so a search returns one copy, not several that drift. After slice 2. Q7 ruled by the Supervisor (#1, comment 4644). - For each generalized lesson, fetch its nearest neighbours with mcl-rag `answer_query`. - With a model: the model judges "same lesson or not". Without one: a fixed similarity threshold (a setting). - Merge = `add_knowledge` of the merged text, **then** `retire_document` on the old lesson. mcl-scribe is that realm's mcl-rag operator. Both steps are events in the log, and a failed retire is retried from the log. A failure in between leaves a duplicate for a while, never a lost lesson. - The state is `merged` into the surviving lesson id. Done when: - [ ] Two lessons that say the same thing leave one document in mcl-rag. `lesson_status` of the second reads `merged` into the first's id. - [ ] A retire that fails is retried after a restart, and the duplicate goes. The add is never undone. - [ ] A lesson below the threshold (or judged different) is stored new. - [ ] Tests use a stand-in mcl-rag. Refs #1
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-scribe#6
No description provided.