scores = model.similarity(query_embedding, document_embeddings)[0] best_index = int(scores.argmax()) prompt_delta = float(abs(query_embedding - named_query_embedding).max()) assert query_embedding.shape[1] == document_embeddings.shape[1] assert best_index == 1 assert prompt_delta < 1e-6 print(f"prompt keys: {', '.join(sorted(model.prompts))}") print(f"query shape: {query_embedding.shape}") print(f"document shape: {document_embeddings.shape}") print(f"named prompt delta: {prompt_delta:.6f}") print(f"top match: doc-{best_index + 1}") print(f"score: {scores[best_index]:.3f}") print(f"text: {documents[best_index]}")