-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
StoreIssues & PRs about the AI Store componentIssues & PRs about the AI Store component
Description
Hello
I noticed something strange with the PG store.
When I query the store to get the similarity, I got 0 for a perfect match, and 1 for something really far.
Usually it's the opposite (1==match, 0==different).
And the minScore
enforce my feeling. I don't understand why I would like to filter things that are too revalant: If I put 0.3
I will get document with a match of 0.3+ and so I'll discard all documents with a match from 0 to 0.3, so the best document.
ai/src/store/src/Bridge/Postgres/Store.php
Lines 79 to 85 in fb19713
/** | |
* @param array<string, mixed> $options | |
* @param float|null $minScore Minimum score to filter results (optional) | |
* | |
* @return VectorDocument[] | |
*/ | |
public function query(Vector $vector, array $options = [], ?float $minScore = null): array |
Am I wrong? If not, I could submit a PR to return 1 - <current score>
Metadata
Metadata
Assignees
Labels
StoreIssues & PRs about the AI Store componentIssues & PRs about the AI Store component