embeddings turns text into vectors you can compare.
rerank takes a query and a list of candidates and reorders them by relevance.
Embedding text
i of the result matches index i of the input.
Batch rather than looping: one call with fifty strings is far cheaper than fifty calls.
Options
Leave
normalize on unless you have a reason. With it off, similarity scores are not
comparable across texts of different lengths.