Repository navigation
feat(core): segment-level consolidation planner, measure-only (#1088) - #1092
Merged
Merged
Conversation
Adds room_consolidation_plan(): builds per-segment LLM batching plans from the semantic segmentation (LycheeMemory V2) with call/token cost estimates — zero LLM calls. Validated on clone prod DB: large rooms show 67-91% call reduction vs naive per-memory consolidation.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Aug 25, 2026
ajianaz
added a commit
that referenced
this pull request
Sep 6, 2026
What
Adds a consolidation planner (
room_consolidation_plan) that turns semantic room segments (from #1090/#1091) into LLM batching plans with cost estimates — without making any LLM calls.consolidation_plan(uteke-core):ConsolidationPlan,PlannedBatch,CostEstimate\n---\n), estimated tokens (~4 chars/token)consolidation_plan_from()variant accepts caller-supplied memories (no double query)Why
Phase 3 of adopting LycheeMemory V2 segment-level consolidation (arXiv:2608.12990, issue #1088). Before wiring real LLM execution into consolidation, we need an evaluation artifact: how many calls/tokens would batching actually save per room. This PR delivers that measurement layer — the executor follows once numbers are reviewed.
Validated on read-only clone of prod DB: rooms with n≥5 memories show 67–91% call reduction (e.g. wa-group n=122 → 14 batches, content-research n=36 → 5 batches).
Testing