fleet-memory/hindsight-api/hindsight_api/engine
Nicolò Boschi 8781c9fbfe
feat: add real-time timing breakdown logging for consolidation (#235)
- Log timing breakdown after each batch (every 50 memories by default)
- Log timing breakdown in progress logs (every 10 memories)
- Shows recall, llm, embedding, db_write times incrementally
- Includes avg time per memory for quick diagnosis
- Helps diagnose performance issues in production without waiting for job completion

Example output (every 10 memories):
[CONSOLIDATION] bank=xyz progress: 10/39303 memories processed | recall=2.09s, llm=11.03s, embedding=0.48s, db_write=0.02s

Example output (per batch):
[CONSOLIDATION] bank=xyz batch 1/50 memories: recall=7.3s, llm=57.5s, embedding=2.0s, db_write=0.09s | avg=1.3s/memory
2026-01-29 17:50:27 +01:00
..
consolidation feat: add real-time timing breakdown logging for consolidation (#235) 2026-01-29 17:50:27 +01:00
directives feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
mental_models feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
reflect fix: search_mental_models uuid type mismatch after text id migration (#225) 2026-01-28 20:04:19 +01:00
retain feat: add custom extraction prompt (#213) 2026-01-28 13:54:52 +01:00
search fix: graph endpoint not showing links for observations (#214) 2026-01-28 14:51:25 +01:00
__init__.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
cross_encoder.py fix: hindsight-embed on macos crashes (#228) 2026-01-29 16:57:51 +01:00
db_budget.py fix: batch queries on recall (#149) 2026-01-13 13:20:22 +01:00
db_utils.py misc: performance improvements (#140) 2026-01-09 14:47:20 +01:00
embeddings.py fix: hindsight-embed on macos crashes (#228) 2026-01-29 16:57:51 +01:00
entity_resolver.py fix: misc perf improvements (#133) 2026-01-08 22:49:04 +01:00
interface.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
llm_wrapper.py fix: improve mental model consolidation (#197) 2026-01-26 09:54:25 +01:00
memory_engine.py feat: support different default pg schema (#222) 2026-01-28 18:14:44 +01:00
query_analyzer.py fix: improve mpfp retrieval (#146) 2026-01-12 18:58:05 +01:00
response_models.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
task_backend.py fix: multi-tenant schema context for worker task execution (#208) 2026-01-27 12:28:47 +01:00
utils.py chore: drop dead code (#210) 2026-01-27 15:03:25 +01:00