22 Commits
v1.1.0 ... main

Author SHA1 Message Date
mtayfur
cd2890e395 docs(memory_system): clarify memory operation definitions and update processing guidelines
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.
2025-12-02 21:19:29 +03:00
mtayfur
879ea8a28d refactor(memory_system): remove skip state cache and threshold from retrieval, unify skip logic for inlet and outlet
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.
2025-11-29 12:41:37 +03:00
mtayfur
e97137bb4c feat(memory_system): enhance memory consolidation with multi-message context and semantic deduplication optimizations
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.
2025-11-29 10:30:22 +03:00
mtayfur
5bf5f775f4 feat(memory_system): refine memory limits, prompt guidelines, and skip detection for improved clarity and relevance
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.
2025-11-26 20:58:27 +03:00
mtayfur
308cf1285e refactor(SkipDetector): optimize line structure handling and reduce redundant splits
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.
2025-11-26 16:59:54 +03:00
mtayfur
59ff55d662 docs(memory_system): clarify example outputs and explanations for memory operations
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.
2025-11-26 16:45:07 +03:00
mtayfur
75e460c548 style(memory_system): add emoji to log messages and improve docstrings for clarity
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.
2025-11-26 16:02:25 +03:00
mtayfur
7055eb42f2 refactor(memory_system): unify status level constants, improve log clarity, and adjust thresholds for better maintainability and diagnostics
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.
2025-11-26 15:55:29 +03:00
mtayfur
0c87a815fc refactor(memory_system): streamline memory deduplication, logging, and message extraction logic
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.
2025-11-26 10:47:16 +03:00
mtayfur
cdedeee6ba fix(memory_system): improve content extraction, hash handling, and memory filtering
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.
2025-11-26 01:04:48 +03:00
mtayfur
4502e07fb3 chore(memory_system): bump version to 1.2.0 in metadata header
Update reflects new changes or improvements since the previous 1.0.0
release, ensuring versioning stays accurate and aligned with project
progress.
2025-11-24 16:06:03 +03:00
mtayfur
bc5611a6d0 refactor(memory_system): simplify embedding normalization, memory retrieval, and response decoding logic
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.
2025-11-24 15:59:55 +03:00
mtayfur
3b84f64392 refactor: make skip detection and embedding operations fully async for improved concurrency
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.
2025-11-24 15:45:03 +03:00
mtayfur
960f8ce4a9 feat(memory_system): introduce "Intermediate" status level for more granular status emission control
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.
2025-11-15 21:52:25 +03:00
mtayfur
6ae99d4778 refactor(memory): remove redundant valve options and clarify reranking controls
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.
2025-11-09 16:52:56 +03:00
mtayfur
c77237a651 feat(memory_system): make skip category margin configurable via Filter settings
Allowing skip_category_margin to be set in Filter enables dynamic
adjustment of skip detection sensitivity, improving flexibility for
different deployment scenarios.
2025-11-09 15:43:30 +03:00
mtayfur
aaaf848c1e refactor(memory_system): remove "Intermediate" status level and update status emission logic
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.
2025-11-09 14:31:27 +03:00
mtayfur
cfc4dca6fc feat(memory_system): expand skip and personal category descriptions and improve skip state caching logic
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.
2025-11-07 17:43:58 +03:00
mtayfur
ff6052fd41 feat(memory_system): add configurable status message verbosity levels
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.
2025-11-07 00:19:50 +03:00
mtayfur
eca65fef43 fix: increase SKIP_CATEGORY_MARGIN for skip category classification to 0.15
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.
2025-11-04 01:45:26 +03:00
mtayfur
8997f71f05 refactor(memory_system): remove excessive try/except and input validation, streamline async operations, and add skip state cache
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.
2025-10-28 17:51:09 +03:00
mtayfur
8ced9aace5 feat(skip-detection): expand and reorganize non-personal category descriptions for improved coverage and clarity
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

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12

View File

@@ -67,12 +67,11 @@ Uses OpenWebUI's configured embedding model (supports Ollama, OpenAI, Azure Open
Customize behavior through valves:
- **model**: LLM for consolidation and reranking. Set to "Default" to use the current chat model, or specify a model ID to use that specific model
- **max_message_chars**: Maximum message length before skipping operations (default: 2500)
- **max_memories_returned**: Context injection limit (default: 10)
- **semantic_retrieval_threshold**: Minimum similarity score (default: 0.5)
- **relaxed_semantic_threshold_multiplier**: Adjusts threshold for consolidation (default: 0.9)
- **enable_llm_reranking**: Toggle smart reranking (default: true)
- **llm_reranking_trigger_multiplier**: When to activate LLM reranking (default: 0.5 = 50%)
- **llm_reranking_trigger_multiplier**: When to activate LLM reranking (0.0 = disabled, default: 0.5 = 50%)
- **skip_category_margin**: Margin for skip detection classification (default: 0.20)
- **status_emit_level**: Status message verbosity - Basic or Detailed (default: Detailed)
## Performance Optimizations

File diff suppressed because it is too large Load Diff