Skip to content

Commit

Permalink
Merge pull request #3334 from vespa-engine/kkraune/faq
Browse files Browse the repository at this point in the history
Add to FAQ, farthest neighbor
  • Loading branch information
kkraune committed Aug 26, 2024
2 parents 76fb729 + 575a3e2 commit 0cc1051
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,14 @@ $ vespa query 'select * from music where true' \
#### Some of the query results have too many hits from the same source, how to create a diverse result set?
See [result diversity](/en/result-diversity.html) for strategies on how to create result sets from different sources.

#### How to find most distant neighbor in a embedding field called clip_query_embedding?
If you want to search for the most dissimilar items,
you can with angular distance multiply your `clip_query_embedding` by the scalar -1.
Then you are searching for the points that are closest to the point
which is the farthest away from your `clip_query_embedding`.

Also see a [pyvespa example](https://pyvespa.readthedocs.io/en/latest/examples/pyvespa-examples.html#Neighbors).


{:.faq-section}
### Feeding
Expand Down

0 comments on commit 0cc1051

Please sign in to comment.