You provide a query and list of search results
Pinecone prompts an LLM to evaluate the the results
Pinecone returns an evaluation for each result
eval
API endpoint with the following request parameters:
Parameter | Description |
---|---|
query.inputs.text | The query text. |
eval.fields | The field in each search result to evaluate. |
eval.mode | The mode of the prompt sent to the LLM. Accepted values: "search" or "rag" .This determines how the LLM evaluates and scores the relevance of results. For more details, see Relevance scores. |
hits | The search results to evaluate. |
eval.debug
to true
:
score
and justification
for each result. For details on how the LLM evaluates relevance, see Relevance scores.
eval.relevance_threshold
parameter. For example, to set a threshold of 3 (e.g., highly relevant), use the following request:
"relevant": true
in the response:
mode
parameter in the request.
mode
parameter is set to "search"
, the LLM is prompted to evaluate each result as a direct response to the query and give each result a score
between 0 and 3 based on the following criteria:Score | Description |
---|---|
3 | Highly relevant: Passage precisely addresses the core query, provides comprehensive and directly applicable information, contains minimal irrelevant content, and delivers factually accurate insights. |
2 | Moderately relevant: Passage addresses a substantial portion of the query but may miss some elements, provides useful information that lacks some depth or comprehensiveness, and contains only minor irrelevant details. |
1 | Partially relevant: Passage touches on query-related aspects but lacks depth or covers only a small part, contains notable irrelevant content, or requires additional context to be useful. |
0 | Not relevant: Passage fails to address the query, contains primarily irrelevant or off-topic content, or provides no meaningful insight for the query. |