Skip to content

docs: long-term search ordering is relevance-based — server_side_recency contract unclear #306

@silversurfer562

Description

@silversurfer562

Summary

search_long_term_memory results appear to be relevance-ordered only — we could not obtain recency ordering even with RecencyConfig(recency_weight=1.0, server_side_recency=True). Timestamped records came back oldest-first and inconsistently across calls.

Repro sketch

  • Server 0.14.0 + agent-memory-client 0.14.0, redis-stack, Ollama nomic-embed-text embeddings.
  • Write N records over time with distinct created_at.
  • search_long_term_memory(text="<query>", recency=RecencyConfig(recency_weight=1.0, server_side_recency=True), limit=10).
  • Observed: ordering does not follow created_at (descending or ascending consistently).

Ask

Document the ordering contract for search results (and what server_side_recency is expected to do in 0.14.x). If recency ordering isn't supported server-side, a doc note saying "sort client-side by created_at" would save consumers a debugging session — that's what we ended up shipping (Smart-AI-Memory/attune-ai#660).

Happy to PR a docs note if you point me at the right page. We run AMS in production for attune-ai's cross-session memory and are glad to contribute findings upstream.

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