Semantic Search doubt

It’s more accurate to say that the score indicates whether the documents are semantically related to the input query, rather than how likely they are as a completion if the input query were passes as prompt. Depending on your use case, it may still work, but you’d probably need to do some testing to see how well it works.

Alternatively you could pass your query + potential completion pairs to the /completions endpoints with max_tokens=0, echo=True, logprobs=1 set – and aggregate the log probabilities of the tokens corresponding to your categories in the prompt text to figure out which one seems to be the most likely overall (you may need to do some normalization between categories across a set of queries).

And sorry for the delayed response, was on vacation for the past week :slight_smile:

2 Likes