Refine CREATE, UPDATE, DELETE, and SKIP operation descriptions to emphasize
lasting relevance, entity resolution, and stricter criteria for updates and skips.
Remove redundant guideline on retroactive enrichment and clarify when to use
each operation, improving precision and selectivity in memory handling.
Skip state caching is eliminated to simplify state management, and skip logic is now handled directly in both inlet and outlet, improving clarity and reducing redundant cache usage; retrieval threshold is no longer returned in API responses, and skip reasons are separated for retrieval and consolidation to provide more precise status messaging.
Add support for using recent conversation context to resolve pronouns and ambiguous references during memory consolidation, improve semantic deduplication by precomputing embeddings, and cache user memories for efficiency; these changes increase accuracy and performance in extracting and managing user memories, especially in multi-turn conversations.
Increase MAX_MESSAGE_CHARS to 3000 and add MAX_MEMORY_SENTENCES to better control memory granularity, update prompt instructions for conciseness and entity resolution, clarify and expand skip detection for personal formatting and instructional requests, and enhance personal category descriptions for more accurate memory classification and filtering. These changes improve memory quality, user guidance, and system selectivity.
Refactors the skip detection logic to precompute and reuse line splits and non-empty line lists, reducing repeated operations and improving efficiency and readability, while also fixing edge cases for empty messages and ensuring more robust pattern detection.
Improves clarity in example 3 by specifying the origin city in the CREATE
operation for more complete context, and updates example 6 to better reflect
the distinction between technical requests and personal statements, ensuring
the documentation accurately guides memory handling logic.
refactor(memory_system): rewrite category descriptions for clarity and conciseness
Category descriptions in NON_PERSONAL_CATEGORY_DESCRIPTIONS and
PERSONAL_CATEGORY_DESCRIPTIONS are rewritten to be more concise,
generalized, and easier to parse, reducing verbosity and removing
example-heavy phrasing. This improves maintainability, readability,
and consistency, making the intent of each category clearer for
future development and review.
docs: expand and clarify examples of personal information categories
Additional examples are added to better illustrate the types of
personal information covered, improving clarity for users and
developers about what constitutes sensitive data in various contexts.
Emojis are added to log messages for better visual distinction and quick scanning in logs, and several docstrings are introduced or improved to clarify method purposes, enhancing code readability and maintainability. Unused parameters are removed for cleaner function signatures.
Status level constants are consolidated into a single STATUS_LEVEL dict for easier access and reduced redundancy, log messages are clarified and made more concise for better diagnostics, and threshold multipliers are adjusted to fine-tune memory retrieval and reranking behavior. These changes improve code maintainability, readability, and operational transparency.
Refactors deduplication to batch embedding generation for efficiency, consolidates user message extraction into a helper for reuse, replaces statistics.median with numpy for consistency, simplifies memory operation execution, and removes redundant logging and unused imports to improve maintainability and performance.
Updates content extraction logic for robustness, ensures all hash operations
handle non-string input safely, filters out empty memory content, and bumps
required Open WebUI version for compatibility. These changes address edge
cases in content processing, prevent potential errors, and ensure only valid
memories are processed and embedded.
Redundant checks and exception handling are removed to streamline code paths, making embedding normalization, user memory retrieval, and LLM response decoding more concise and maintainable while preserving error propagation at higher levels.
Skip detection and embedding-related methods are now asynchronous, allowing
non-blocking execution and better concurrency; embedding function wrappers
and initialization routines are updated to support async/await, and
shared skip detector caching is adapted accordingly. These changes are
necessary to ensure compatibility with async embedding functions, prevent
blocking the event loop, and improve scalability and responsiveness in
high-concurrency environments.
Adds an "Intermediate" status level between "Basic" and "Detailed" to provide
summaries and key details, updates all relevant mappings and usages to support
this new level, and adjusts default verbosity for status messages to improve
clarity and reduce noise for users who do not require full diagnostics.
Eliminate unused or redundant valve options such as max_message_chars,
relaxed_semantic_threshold_multiplier, and enable_llm_reranking to
streamline configuration, clarify that llm_reranking_trigger_multiplier
disables reranking when set to 0.0, and update documentation and code to
reflect these changes for improved maintainability and user clarity.
Allowing skip_category_margin to be set in Filter enables dynamic
adjustment of skip detection sensitivity, improving flexibility for
different deployment scenarios.
Eliminates the "Intermediate" status level for message verbosity, consolidating to "Basic" and "Detailed" for clarity and simplicity; updates all related mappings, enums, and status emission calls to reflect this streamlined approach, reducing confusion and improving maintainability.
Category descriptions are made more comprehensive and precise to improve classification accuracy, the skip margin is adjusted for better thresholding, and skip state caching is now performed before early returns to ensure consistent cache updates regardless of skip conditions. The user message extraction logic is also improved for robustness.
Introduce status_emit_level to control status message verbosity, allowing
users to select Basic, Intermediate, or Detailed output; refactor all
status emission calls to respect this setting, improving clarity and
customizability of system feedback for different user needs.
The SKIP_CATEGORY_MARGIN constant is raised from 0.10 to 0.15 to make skip
category classification more selective, reducing false positives by requiring
a higher margin above personal similarity.
Removes redundant try/except blocks and input validation in several
methods to simplify logic and improve readability. Moves error handling
to higher levels where appropriate. Adds a skip state cache to track
when memory operations should be skipped, improving efficiency by
avoiding repeated skip checks. Cleans up batch operation execution and
cache clearing to include the new skip state. These changes reduce
unnecessary code complexity and improve maintainability, while also
optimizing memory operation flow and cache management.
refactor(skip-detection): condense and generalize personal category descriptions for maintainability and easier updates
fix(constants): lower SKIP_CATEGORY_MARGIN from 0.20 to 0.10 to reduce false positives in skip classification
refactor(skip-detection): clarify logging for skip/allow decisions and threshold calculation for better traceability
refactor: use consistent double-quote style for operator and code-ending character lists
fix(filter): ensure embeddings are normalized before use in skip detector to improve classification accuracy
Non-personal category descriptions are now more comprehensive and organized by topic, improving the classifier's ability to detect impersonal content. Personal category descriptions are condensed into broader, clearer categories, making them easier to maintain and update. The SKIP_CATEGORY_MARGIN is reduced to make the skip detector less aggressive, addressing previous false positives. Logging is improved for easier debugging and understanding of skip decisions. Embedding normalization is enforced to ensure consistent similarity calculations.
2025-10-28 17:23:20 +03:00
3 changed files with 595 additions and 604 deletions
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.