|
57 | 57 | "name": "my_custom_evaluator_prompt", |
58 | 58 | "categories": [EvaluatorCategory.QUALITY], |
59 | 59 | "display_name": "my_custom_evaluator_prompt", |
60 | | - "description": "Custom evaluator to for groundedness", |
| 60 | + "description": "Custom evaluator for groundedness", |
61 | 61 | "definition": { |
62 | 62 | "type": EvaluatorDefinitionType.PROMPT, |
63 | 63 | "prompt_text": """ |
64 | 64 | You are a Groundedness Evaluator. |
65 | 65 |
|
66 | | - Your task is to evaluate how well the given response is grounded in the provided ground truth. |
67 | | - Groundedness means the response’s statements are factually supported by the ground truth. |
| 66 | + Your task is to evaluate how well the given response is grounded in the provided ground truth. |
| 67 | + Groundedness means the response’s statements are factually supported by the ground truth. |
68 | 68 | Evaluate factual alignment only — ignore grammar, fluency, or completeness. |
69 | 69 |
|
70 | 70 | --- |
71 | 71 |
|
72 | 72 | ### Input: |
73 | 73 | Query: |
74 | | - {query} |
| 74 | + {{query}} |
75 | 75 |
|
76 | 76 | Response: |
77 | | - {response} |
| 77 | + {{response}} |
78 | 78 |
|
79 | 79 | Ground Truth: |
80 | | - {ground_truth} |
| 80 | + {{ground_truth}} |
81 | 81 |
|
82 | 82 | --- |
83 | 83 |
|
|
90 | 90 |
|
91 | 91 | --- |
92 | 92 |
|
93 | | - ### Output should be Integer: |
94 | | - <integer from 1 to 5> |
| 93 | + ### Output Format (JSON): |
| 94 | + { |
| 95 | + "result": <integer from 1 to 5>, |
| 96 | + "reason": "<brief explanation for the score>" |
| 97 | + } |
95 | 98 | """, |
96 | 99 | "init_parameters": { |
97 | 100 | "type": "object", |
98 | 101 | "properties": {"deployment_name": {"type": "string"}, "threshold": {"type": "number"}}, |
99 | | - "required": ["deployment_name"], |
| 102 | + "required": ["deployment_name", "threshold"], |
100 | 103 | }, |
101 | 104 | "data_schema": { |
102 | 105 | "type": "object", |
|
108 | 111 | "required": ["query", "response", "ground_truth"], |
109 | 112 | }, |
110 | 113 | "metrics": { |
111 | | - "tool_selection": { |
| 114 | + "custom_prompt": { |
112 | 115 | "type": "ordinal", |
113 | 116 | "desirable_direction": "increase", |
114 | 117 | "min_value": 1, |
|
147 | 150 | "response": "{{item.response}}", |
148 | 151 | "ground_truth": "{{item.ground_truth}}", |
149 | 152 | }, |
150 | | - "initialization_parameters": {"deployment_name": f"{model_deployment_name}", "threshold": 3.5}, |
| 153 | + "initialization_parameters": {"deployment_name": f"{model_deployment_name}", "threshold": 3}, |
151 | 154 | } |
152 | 155 | ] |
153 | 156 |
|
|
0 commit comments