Skip to content

Expose dreaming promotion thresholds (minScore, minRecallCount, minUniqueQueries) as user config #65402

@bobsahur-robot

Description

@bobsahur-robot

Problem

The dreaming deep-phase promotion thresholds (minScore, minRecallCount, minUniqueQueries) are hardcoded internal defaults. The docs say they are "internal implementation details (not user-facing config)" and the config schema rejects additional properties under dreaming.

The default minScore: 0.8 is unreachable with Gemini embeddings (gemini-embedding-001), which produce cosine similarities in the 0.43–0.52 range for real Active Memory recall queries. The highest real retrieval score observed across 3,408 entries over 8 days was 0.52. This means nothing can ever promote with Gemini embeddings.

The CLI memory promote command already exposes these as flags (--min-score, --min-recall-count, --min-unique-queries) with slightly different defaults than the dreaming sweep (CLI: 0.75/3/2 vs dreaming: 0.8/3/3), confirming the values are tunable — just not via config.

Score Distribution Evidence

With gemini-embedding-001 (auto-detected, 3072-dim normalized vectors):

  • 46 entries with real recalls (recallCount > 0)
  • maxScore range: 0.43–0.78 (the 0.78 outlier from one exact-match query)
  • P50: 0.47, P90: 0.51, Mean: 0.48
  • Most recalls come from Active Memory fuzzy contextual queries, not direct matches — so scores are inherently lower

The threshold of 0.8 was likely calibrated for a different embedding model (OpenAI?) where similarity scores run higher.

Proposed Fix

Accept optional threshold overrides in dreaming config:

{
  plugins: {
    entries: {
      "memory-core": {
        config: {
          dreaming: {
            enabled: true,
            minScore: 0.50,
            minRecallCount: 3,
            minUniqueQueries: 3
          }
        }
      }
    }
  }
}

Alternatively, auto-calibrate thresholds based on the observed score distribution of the configured embedding provider.

Environment

  • OpenClaw 2026.4.11 (build 742fc47)
  • Embedding: gemini-embedding-001 (auto-detected)
  • Dreaming: enabled, daily 3 AM sweep
  • Recall store: 3,408 entries, 1 promoted, 46 with real recalls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions