Skip to content

Is there a way to do stable random search? #463

Answered by jn2clark
lanyusan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @lanyusan, there are a couple of ways. If you know the _id list ahead of time you could randomly sample a document and then use that to search with. Alternatively, we have a context_vector that can be used for a random search. In this case, you would create a random vector and then search directly with that. Here is an example;

res = client.search({query:0.0}, context={"tensor":[{"vector": context_vector, "weight": 1.0}]})

where context_vector is a random vector.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aryanverma22
Comment options

Answer selected by lanyusan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants