Skip to content

fix(vector_stores/redis): make search score metric-aware - #7251

Closed
ktz03 wants to merge 1 commit into
mem0ai:mainfrom
ktz03:fix/redis-metric-aware-score
Closed

ktz03 wants to merge 1 commit into
mem0ai:mainfrom
ktz03:fix/redis-metric-aware-score

Conversation

@ktz03

@ktz03 ktz03 commented Sep 8, 2026

Copy link
Copy Markdown

Linked Issue

Closes #7249

Description

Sibling of #6546/#6547/#7229 for Redis.

  • Add distance to RedisDBConfig / RedisDB
  • Persist create_col(..., distance=...) onto self.distance
  • Metric-aware _distance_to_score (cosine/ip: 1-d, l2: 1/(1+d))
  • Regression tests for conversion

Type of Change

  • Bug fix

Sibling of mem0ai#6547/mem0ai#7229. Hardcoded 1-distance collapses L2 hits.
Closes mem0ai#7249.
@github-actions github-actions Bot added sdk-python Python SDK specific vector-store Vector store backends (Qdrant, PGVector, Redis, etc.) labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Thanks for taking the time to open this.

We only review pull requests that fix an issue we have already agreed to take on, so this one is closed for now.
Closed does not mean rejected. It means it is not in the queue yet, and reopening takes about a minute.

To get it reviewed:

  1. Make sure an issue describes the problem, with the version you are on, a runnable reproduction, and the real output or traceback you saw.
  2. Link it from this pull request description with Closes #<number>.
  3. Ask a maintainer to label that issue accepted. This pull request reopens by itself when they do.

Issue already labeled accepted? Just add Closes #<number> to the description. That reopens this too.

Documentation-only changes skip this gate entirely.

See CONTRIBUTING.md for the full policy.

@github-actions github-actions Bot closed this Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Hi @ktz03, thanks for opening this pull request.

This is just a soft check: you are not yet in this repo's vouched contributor list (.github/VOUCHED.td). Nothing is blocked and there is nothing you need to do.

A maintainer can vouch for you by commenting !vouch @ktz03 on any issue.

@ktz03
ktz03 deleted the fix/redis-metric-aware-score branch September 8, 2026 02:37
@ktz03

ktz03 commented Sep 8, 2026

Copy link
Copy Markdown
Author

Superseded by #7253 (same branch tip). Keeping #7253 as the canonical PR for #7249 — please ignore this duplicate.

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

Labels

sdk-python Python SDK specific vector-store Vector store backends (Qdrant, PGVector, Redis, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(vector_stores/redis): search score hardcoded for cosine, breaks L2 ranking

1 participant