Cosine Similarity
# Test indicating low similarity (expected to fail)
evaluator.add_test(
test_names=["cosine_similarity_test"],
data={
"prompt": "What is the capital of France?",
"response": "Artificial intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems."
},
arguments={"threshold": 0.6},
).run()
evaluator.print_results()Last updated
Was this helpful?

