Skip to content

Commit

Permalink
strategy arg (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanPleshkov authored Oct 9, 2023
1 parent 4456f25 commit 2c8dd87
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/js-client-rest/src/qdrant-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,10 @@ export class QdrantClient {
}

/**
* Recommend points: search for similar points based on already stored in Qdrant examples.
* Provide IDs of the stored points, and Qdrant will perform search based on already existing vectors.
* This functionality is especially useful for recommendation over existing collection of points.
* Recommendation request. Provides positive and negative examples of the vectors,
* which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.
* Service should look for the points which are closer to positive examples and at the same time further to negative examples.
* The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.
* @param collection_name Collection to search in
* @param {object} args
* - positive:
Expand All @@ -272,6 +273,8 @@ export class QdrantClient {
* - negative:
* List of stored point IDs, which should be dissimilar to the search result.
* Negative examples is an experimental functionality. Its behaviour may change in the future.
* - strategy:
* How to use positive and negative examples to find the results.
* - query_filter:
* - Exclude vectors which doesn't fit given conditions.
* - If `None` - search among all vectors
Expand Down Expand Up @@ -321,6 +324,7 @@ export class QdrantClient {
{
positive,
negative,
strategy,
filter,
params,
limit = 10,
Expand All @@ -339,6 +343,7 @@ export class QdrantClient {
limit,
positive,
negative,
strategy,
filter,
params,
offset,
Expand Down Expand Up @@ -574,6 +579,7 @@ export class QdrantClient {
* 'all' - query all replicas, and return values present in all replicas
* - positive: Look for vectors closest to those
* - negative: Try to avoid vectors like this
* - strategy: How to use positive and negative examples to find the results
* - filter: Look only for points which satisfies this conditions
* - params: Additional search params
* - with_payload: Select which payload to return with the response
Expand All @@ -591,6 +597,7 @@ export class QdrantClient {
{
consistency,
positive,
strategy,
negative = [],
filter,
params,
Expand All @@ -609,6 +616,7 @@ export class QdrantClient {
consistency,
positive,
negative,
strategy,
filter,
params,
with_payload,
Expand Down

0 comments on commit 2c8dd87

Please sign in to comment.