Repository navigation
LAPAIv1.5
·
119 commits
to main
since this release
MODULAR SYSTEM UPDATE v1.5
linux support, so can windows and linux now.
Changelog
[1.5] — Modular
Added
- Added persistent memory state management through SQLite.
- Added time-based memory compaction with summary checkpoints.
- Added
memory_statetracking using timestamps and messagerowid. - Added dynamic memory prompt construction through
build_memory_prompt(). - Added persona loading through
load_persona(). - Added context budget calculation through
calculate_context_budget(). - Added embedding normalization for consistent vector retrieval.
- Added embedding dimension and FAISS index validation.
- Added backward-compatible handling for older memory databases.
- Added more detailed memory metadata including timestamps, importance, session IDs, and retrieval scores.
Changed
- Changed the embedding model from
all-mpnet-base-v2tomultilingual-e5-small. - Changed embedding dimension from
768to384. - Changed ONNX execution provider from
DmlExecutionProvidertoCPUExecutionProvider. - Changed embedding generation to support
queryandpassageprefixes for E5-style retrieval. - Changed token estimation from word-based counting to tokenizer-based token counting.
- Changed FAISS retrieval from
IndexFlatL2distance-based retrieval to normalizedIndexFlatIPsimilarity retrieval. - Changed FAISS similarity handling to use normalized cosine-style similarity.
- Changed FTS5 score normalization to properly handle negative BM25 values.
- Changed recent-memory retrieval from a global hour-based lookup to session-specific minute-based memory retrieval.
- Increased relevant-memory retrieval from a default of 5 results to 10 results.
- Changed memory ranking to combine FTS relevance, semantic similarity, importance, recency, and role weighting.
- Changed summarization from message-count-based summarization to time-based memory compaction.
- Changed the main pipelines to build memory context through a dedicated memory prompt builder.
- Changed persona injection to use a dedicated loader instead of reading the persona file directly inside the main functions.
- Changed model configuration paths and runtime API endpoint handling.
- Changed error handling so model/runtime failures can return an explicit error result.
Improved
- Improved FAISS initialization by detecting embedding dimension mismatches.
- Improved FAISS consistency checks between the index and memory map.
- Improved embedding quality handling through attention-mask-aware mean pooling.
- Improved memory retrieval by combining lexical and semantic search into a single scoring pipeline.
- Improved prompt trimming so it can act as an emergency fallback instead of being the primary memory-management mechanism.
- Improved compatibility with existing databases through memory-state migration support.
- Improved separation between active memory, persistent summaries, recalled memory, and learned knowledge.
Removed / Replaced
- Replaced the old
load_history()andget_recent_history()flow. - Replaced the old count-based
summarize_session()implementation withcompact_old_memory(). - Replaced direct JSON history compaction with persistent memory-state tracking in SQLite.
- Removed the previous Ollama fallback logic from the fast-response pipeline.
- Replaced the previous L2-to-similarity conversion inside FAISS retrieval with normalized inner-product retrieval.