Evaluates whether relevant documents in the retrieval context are ranked higher than irrelevant ones.
retrieval_context
are ranked higher than irrelevant ones, based on their contribution to answering the user’s query.
High contextual precision means that the retriever is efficiently surfacing the most useful information near the top.
contextual_precision
metric, the following are required:
input
: The user’s query.retrieval_context
: The list of retrieved documents or nodes, in ranked order.retrieval_context
are relevant to the input
.