Skip to content

feat(#304,#305): semantic room recall + LLM-free room summary - #309

Merged
ajianaz merged 1 commit into
developfrom
feat/304-305-room-semantic-recall-summary
Jun 13, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/304-305-room-semantic-recall-summary

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #304, Closes #305

#304 — Semantic Room Recall

  • recall_room_semantic() uses hybrid RRF search scoped to room memories
  • uteke room recall <room> --query "deployment strategy" ranks by relevance
  • uteke room recall <room> --query "..." --min 0.5 --author kai with filters
  • POST /room/recall server endpoint
  • Backward compatible: without --query, chronological dump unchanged

#305 — Room Summary (LLM-free topic clustering)

  • room_summary() clusters memories by tag co-occurrence
  • Extracts: topic clusters with previews, top tags, recent decisions, pinned highlights
  • uteke room summary <room> — human-readable + JSON output
  • POST /room/summary server endpoint
  • Algorithm: tag frequency → cluster by shared tags → sort by importance → merge small clusters

Files changed (9 files, +627 lines)

  • crates/uteke-core/src/memory/rooms.rs — get_room_memory_ids(), room_summary(), new types
  • crates/uteke-core/src/rooms.rs — recall_room_semantic(), room_summary() on Uteke
  • crates/uteke-cli/src/cli.rs — --query, --min on Recall, Summary command
  • crates/uteke-cli/src/commands/room.rs — semantic + summary handlers
  • crates/uteke-cli/src/output.rs — print_room_semantic_human()
  • crates/uteke-server/src/main.rs — /room/recall, /room/summary endpoints

Tests

  • cargo test --workspace ✅ (129 passed)
  • cargo clippy --workspace -- -D warnings ✅
  • cargo fmt --all -- --check ✅

#304 — Semantic room recall:
- recall_room_semantic() uses hybrid RRF search scoped to room memories
- `uteke room recall <room> --query "..." --min 0.5` ranks by relevance
- POST /room/recall server endpoint
- Backward compatible: without --query, chronological dump unchanged

#305 — Room summary (LLM-free topic clustering):
- room_summary() clusters memories by tag co-occurrence
- Extracts: topic clusters, top tags, recent decisions, pinned highlights
- `uteke room summary <room>` — human + JSON output
- POST /room/summary server endpoint

9 files changed, +627 lines
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 66b907f into develop Jun 13, 2026
8 checks passed
@ajianaz
ajianaz deleted the feat/304-305-room-semantic-recall-summary branch June 13, 2026 04:18
ajianaz added a commit that referenced this pull request Jun 13, 2026
* feat(#304,#305): semantic room recall + LLM-free room summary (#309)

#304 — Semantic room recall:
- recall_room_semantic() uses hybrid RRF search scoped to room memories
- `uteke room recall <room> --query "..." --min 0.5` ranks by relevance
- POST /room/recall server endpoint
- Backward compatible: without --query, chronological dump unchanged

#305 — Room summary (LLM-free topic clustering):
- room_summary() clusters memories by tag co-occurrence
- Extracts: topic clusters, top tags, recent decisions, pinned highlights
- `uteke room summary <room>` — human + JSON output
- POST /room/summary server endpoint

9 files changed, +627 lines

* feat: v0.1.0 remaining — tag junction, room document, pluggable embedding, time-travel (#314)

* feat(#184): normalize tags with junction table (schema v5)

- New memory_tags table with COLLATE NOCASE for O(log n) lookups
- Migration v4→v5: creates table, populates from existing JSON tags
- Dual-write: insert/update writes to both JSON column and junction table
- All tag queries use junction table instead of json_each()
- Backward compat: JSON tags column preserved

5 files changed in uteke-core.

* feat(#306): room document view — structured output from room memories

- RoomDocument with sections grouped by memory_type
- DocumentSection: heading + icon (📋 Decisions, 🔍 Facts, ⚙️ Procedures, etc)
- Pinned memories get 📌 section first
- CLI: `uteke room document <room>` — markdown-style human output + JSON
- Server: POST /room/document endpoint
- Types exported from uteke-core

Closes #306

* fix(#306): bound room document query to 10K, fix non-ASCII truncation panic

* feat(#249): pluggable embedding models via Embedder trait

- New Embedder trait (Send + Sync) in embed_trait.rs
- EmbeddingEngine renamed to OnnxEmbedder
- Tokenizer + Session wrapped in Mutex for &self embed()
- Uteke struct uses Box<dyn Embedder>
- Config: [embedding] backend field (default: "onnx")
- Uteke::open_with_backend() selects backend via lazy init
- Backward compat: EmbeddingEngine type alias = OnnxEmbedder
- Future: OpenAI/Ollama backends implement Embedder trait

* feat(#249): pluggable embedding models via Embedder trait

- New Embedder trait (Send + Sync) in embed_trait.rs
- EmbeddingEngine renamed to OnnxEmbedder
- Tokenizer + Session wrapped in Mutex for &self embed()
- Uteke struct uses Box<dyn Embedder>
- Config: [embedding] backend field (default: "onnx"), validated at startup
- Uteke::open_with_backend() + open_with_tier_and_backend()
- Lazy init selects backend by name, error on unknown
- Backward compat: EmbeddingEngine type alias = OnnxEmbedder
- Future: OpenAI/Ollama implement Embedder trait

Closes #249

* feat(#292): time-travel queries — recall/list memories at a point in time

- Store::list_at_time(): SQL temporal filter on created_at, valid_from,
  valid_until, deprecated
- Uteke::recall_at_time(): over-fetch + post-filter by temporal validity
- Uteke::list_at_time(): thin wrapper to store
- CLI: --at flag on recall and list commands (RFC3339 parsing)
- Server: /recall and /list endpoints accept 'at' field
- Server proxy: passes --at through to server
- 4 unit tests covering all temporal edge cases

Closes #292

* fix(#292): retry loop for temporal recall to fill requested limit

Over-fetch with increasing multipliers (3x, 9x, 27x) when temporal
post-filtering yields fewer results than requested. Detects index
exhaustion to avoid pointless retries.

Addresses Cora review: temporal recall can return too few results.

* fix(#292): stop retry on index exhaustion regardless of result count

Index exhaustion = candidates_len < fetch_limit. When this happens,
expanding the search scope cannot yield more results. Previously
only stopped when results.is_empty(), which missed the case where
partial results exist but the index has no more candidates.

* feat(#292): time-travel queries — recall and list at specific point in time

- recall_at_time(): semantic recall with temporal validity filter
- list_at_time(): list memories that existed at timestamp
- Temporal logic: created_at <= pit, valid_from/valid_until, not deprecated
- CLI: --at flag on recall and list commands (RFC3339 format)
- Server: /recall and /list accept "at" field
- 4 new store tests for temporal filtering
- Retry loop expands fetch limit when temporal filter removes too many

Closes #292

* docs: update for v0.1.0 — rooms, time-travel, pluggable embeddings, tag junction (#315)

* docs: update branch protection rules for main and develop branches (#308)

Co-authored-by: ajianaz <[email protected]>

* feat: benchmark suite — uteke bench + LongMemEval harness (#49, #316) (#320)

* feat(#49): uteke bench command — synthetic performance benchmarking

- CLI: `uteke bench` with --counts and --json flags
- Benchmarks: insert throughput, recall latency (avg+p95), storage footprint
- Deterministic xorshift64* PRNG (no rand dep)
- Synthetic content generator with word banks
- Human-readable table + JSON output
- Temp stores auto-cleaned up

Closes #49

* feat(#316): LongMemEval benchmark harness for retrieval accuracy

- benchmarks/longmemeval/ harness: run_eval.py + print_metrics.py
- Downloads dataset from HuggingFace (download_data.sh)
- Measures session-level Recall@5/10/50, NDCG@5/10/50
- Per-question-type breakdown (single-session, multi-session, knowledge-update, etc.)
- benchmarks/RESULTS.md: comparison table vs Mem0/Hindsight
- README.md with quick-start guide

Closes #316

* docs: add bench command + LongMemEval harness to changelog, CLI ref, README

* docs: complete v0.1.0 documentation — index, getting-started, README.id, sidebar (#321)

- docs/index.md: 6 new feature cards (Rooms, Time-Travel, Relationship Graph,
  Smart Decay, MCP Server, Benchmarks) + 7 new comparison table rows
- docs/getting-started.md: 6 new sections (Rooms, Time-Travel Queries,
  Memory Importance & Pinning, Relationship Graph, Recall Cache,
  Benchmarking) + fixed model path to embeddinggemma-q4/onnx/
- README.id.md: synced with English README — v0.1.0 badge, 15 features,
  expanded comparison table with Rooms/Time-travel/MCP/Graph/Decay/Cache/Bench
- docs/.vitepress/config.ts: restructured sidebar into 3 groups
  (Getting Started, Features, Reference) with anchors to new sections

* release: v0.1.0 — version bump, JSON output fix, changelog (#322)

- Version: 0.0.15 → 0.1.0 (workspace + inter-crate deps)
- Fix: recall --json now always outputs [] on empty results (was {"results":[]})
  This ensures cora-cli and other JSON consumers can parse output reliably.
- CHANGELOG: [Unreleased] → [0.1.0] — 2026-06-13

* ci: add CodeCorraDev Roadmap project board auto-sync (#319)

* ci: add project board auto-sync workflow

* fix(ci): harden project-sync workflow for CodeCora findings

- Guard against empty issue fields on workflow_dispatch (use || '')
- Early exit when no issue context (manual dispatch)
- Separate stdout/stderr for GraphQL calls
- Check for 'errors' field in response instead of naive grep 'item'
- Add fallback case for unhandled events

Fixes CodeCora alerts on PR #319.

---------

Co-authored-by: ajianaz <[email protected]>
ajianaz added a commit that referenced this pull request Aug 13, 2026
#304 — Semantic room recall:
- recall_room_semantic() uses hybrid RRF search scoped to room memories
- `uteke room recall <room> --query "..." --min 0.5` ranks by relevance
- POST /room/recall server endpoint
- Backward compatible: without --query, chronological dump unchanged

#305 — Room summary (LLM-free topic clustering):
- room_summary() clusters memories by tag co-occurrence
- Extracts: topic clusters, top tags, recent decisions, pinned highlights
- `uteke room summary <room>` — human + JSON output
- POST /room/summary server endpoint

9 files changed, +627 lines
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.

1 participant