Skip to content

Commit 0cc1051

Browse files
authored
Merge pull request #3334 from vespa-engine/kkraune/faq
Add to FAQ, farthest neighbor
2 parents 76fb729 + 575a3e2 commit 0cc1051

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

en/faq.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,14 @@ $ vespa query 'select * from music where true' \
406406
#### Some of the query results have too many hits from the same source, how to create a diverse result set?
407407
See [result diversity](/en/result-diversity.html) for strategies on how to create result sets from different sources.
408408

409+
#### How to find most distant neighbor in a embedding field called clip_query_embedding?
410+
If you want to search for the most dissimilar items,
411+
you can with angular distance multiply your `clip_query_embedding` by the scalar -1.
412+
Then you are searching for the points that are closest to the point
413+
which is the farthest away from your `clip_query_embedding`.
414+
415+
Also see a [pyvespa example](https://pyvespa.readthedocs.io/en/latest/examples/pyvespa-examples.html#Neighbors).
416+
409417

410418
{:.faq-section}
411419
### Feeding

0 commit comments

Comments
 (0)