passage_encoder = SentenceTransformer('facebook-dpr-ctx_encoder-single-nq-base')
passages = [
    "London [SEP] London is the capital and largest city of England and the United Kingdom.",
    "Paris [SEP] Paris is the capital and most populous city of France.",
    "Berlin [SEP] Berlin is the capital and largest city of Germany by both area and population."
]
passage_embeddings = passage_encoder.encode(passages)
query_encoder = SentenceTransformer('facebook-dpr-question_encoder-single-nq-base')
query = "What is the capital of England?"
query_embedding = query_encoder.encode(query)
Important: You must use dot-product, not cosine_similarity
scores = util.dot_score(query_embedding, passage_embeddings)
print("Scores:", scores)
```
Important note: When you use these models, you have to use them with dot-product (e.g. as implemented in util.dot_score) and not with cosine similarity.
