Skip to content

Configurable similarity thresholds and recall tuning #7

Description

@hd719

Problem

Key thresholds are hardcoded with no way to tune:

  • Duplicate detection: 0.95 (in memory_store)
  • Auto-recall minimum similarity: 0.3 (in before_agent_start)
  • Recall result count: 3 (in before_agent_start)
  • Forget match threshold: 0.7 / 0.9 (in memory_forget)
  • Tool recall minimum: 0.1 (in memory_recall tool) vs 0.5 (in MemoryDB.search default)

The 0.1 vs 0.5 mismatch between the tool call and the DB default is also a subtle bug — the tool passes 0.1 but the DB method signature defaults to 0.5, so behavior depends on which path is taken.

Proposal

Add config options:

{
  "thresholds": {
    "duplicateMin": 0.95,
    "recallMin": 0.3,
    "recallLimit": 3,
    "forgetAutoDeleteMin": 0.9
  }
}

Different use cases need different tuning:

  • High-volume assistants may want stricter recall (0.5+) to reduce noise
  • Personal assistants may want looser recall (0.2) to surface more context
  • Duplicate threshold may need loosening (0.85) if users rephrase often

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions