Correctness
Evaluation modules.
CorrectnessEvaluator #
Bases: BaseEvaluator
Correctness evaluator.
Evaluates the correctness of a question answering system.
This evaluator depends on reference
answer to be provided, in addition to the
query string and response string.
It outputs a score between 1 and 5, where 1 is the worst and 5 is the best, along with a reasoning for the score. Passing is defined as a score greater than or equal to the given threshold.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eval_template |
Optional[Union[BasePromptTemplate, str]]
|
Template for the evaluation prompt. |
None
|
score_threshold |
float
|
Numerical threshold for passing the evaluation, defaults to 4.0. |
4.0
|
Source code in llama-index-core/llama_index/core/evaluation/correctness.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|