@@ -488,17 +488,18 @@ def validate(
488
488
project_id : str ,
489
489
* ,
490
490
context : str ,
491
- prompt : str ,
492
491
query : str ,
493
- response : str ,
492
+ response : project_validate_params . Response ,
494
493
use_llm_matching : bool | NotGiven = NOT_GIVEN ,
495
494
constrain_outputs : Optional [List [str ]] | NotGiven = NOT_GIVEN ,
496
495
custom_eval_thresholds : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
497
496
custom_metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
498
497
eval_scores : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
499
- messages : Optional [ Iterable [project_validate_params .Message ] ] | NotGiven = NOT_GIVEN ,
498
+ messages : Iterable [project_validate_params .Message ] | NotGiven = NOT_GIVEN ,
500
499
options : Optional [project_validate_params .Options ] | NotGiven = NOT_GIVEN ,
500
+ prompt : Optional [str ] | NotGiven = NOT_GIVEN ,
501
501
quality_preset : Literal ["best" , "high" , "medium" , "low" , "base" ] | NotGiven = NOT_GIVEN ,
502
+ rewritten_question : Optional [str ] | NotGiven = NOT_GIVEN ,
502
503
task : Optional [str ] | NotGiven = NOT_GIVEN ,
503
504
x_client_library_version : str | NotGiven = NOT_GIVEN ,
504
505
x_integration_type : str | NotGiven = NOT_GIVEN ,
@@ -526,9 +527,8 @@ def validate(
526
527
eval_scores: Scores assessing different aspects of the RAG system. If not provided, TLM will
527
528
be used to generate scores.
528
529
529
- messages: Optional message history to provide conversation context for the query. Used to
530
- rewrite query into a self-contained version of itself. If not provided, the
531
- query will be treated as self-contained.
530
+ messages: Message history to provide conversation context for the query. Messages contain
531
+ up to and including the latest user prompt to the LLM.
532
532
533
533
options: Typed dict of advanced configuration options for the Trustworthy Language Model.
534
534
Many of these configurations are determined by the quality preset selected
@@ -615,8 +615,14 @@ def validate(
615
615
- name: Name of the evaluation criteria.
616
616
- criteria: Instructions specifying the evaluation criteria.
617
617
618
+ prompt: The prompt to use for the TLM call. If not provided, the prompt will be
619
+ generated from the messages.
620
+
618
621
quality_preset: The quality preset to use for the TLM or Trustworthy RAG API.
619
622
623
+ rewritten_question: The re-written query if it was provided by the client to Codex from a user to be
624
+ used instead of the original query.
625
+
620
626
extra_headers: Send extra headers
621
627
622
628
extra_query: Add additional query parameters to the request
@@ -643,7 +649,6 @@ def validate(
643
649
body = maybe_transform (
644
650
{
645
651
"context" : context ,
646
- "prompt" : prompt ,
647
652
"query" : query ,
648
653
"response" : response ,
649
654
"constrain_outputs" : constrain_outputs ,
@@ -652,7 +657,9 @@ def validate(
652
657
"eval_scores" : eval_scores ,
653
658
"messages" : messages ,
654
659
"options" : options ,
660
+ "prompt" : prompt ,
655
661
"quality_preset" : quality_preset ,
662
+ "rewritten_question" : rewritten_question ,
656
663
"task" : task ,
657
664
},
658
665
project_validate_params .ProjectValidateParams ,
@@ -1090,17 +1097,18 @@ async def validate(
1090
1097
project_id : str ,
1091
1098
* ,
1092
1099
context : str ,
1093
- prompt : str ,
1094
1100
query : str ,
1095
- response : str ,
1101
+ response : project_validate_params . Response ,
1096
1102
use_llm_matching : bool | NotGiven = NOT_GIVEN ,
1097
1103
constrain_outputs : Optional [List [str ]] | NotGiven = NOT_GIVEN ,
1098
1104
custom_eval_thresholds : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
1099
1105
custom_metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
1100
1106
eval_scores : Optional [Dict [str , float ]] | NotGiven = NOT_GIVEN ,
1101
- messages : Optional [ Iterable [project_validate_params .Message ] ] | NotGiven = NOT_GIVEN ,
1107
+ messages : Iterable [project_validate_params .Message ] | NotGiven = NOT_GIVEN ,
1102
1108
options : Optional [project_validate_params .Options ] | NotGiven = NOT_GIVEN ,
1109
+ prompt : Optional [str ] | NotGiven = NOT_GIVEN ,
1103
1110
quality_preset : Literal ["best" , "high" , "medium" , "low" , "base" ] | NotGiven = NOT_GIVEN ,
1111
+ rewritten_question : Optional [str ] | NotGiven = NOT_GIVEN ,
1104
1112
task : Optional [str ] | NotGiven = NOT_GIVEN ,
1105
1113
x_client_library_version : str | NotGiven = NOT_GIVEN ,
1106
1114
x_integration_type : str | NotGiven = NOT_GIVEN ,
@@ -1128,9 +1136,8 @@ async def validate(
1128
1136
eval_scores: Scores assessing different aspects of the RAG system. If not provided, TLM will
1129
1137
be used to generate scores.
1130
1138
1131
- messages: Optional message history to provide conversation context for the query. Used to
1132
- rewrite query into a self-contained version of itself. If not provided, the
1133
- query will be treated as self-contained.
1139
+ messages: Message history to provide conversation context for the query. Messages contain
1140
+ up to and including the latest user prompt to the LLM.
1134
1141
1135
1142
options: Typed dict of advanced configuration options for the Trustworthy Language Model.
1136
1143
Many of these configurations are determined by the quality preset selected
@@ -1217,8 +1224,14 @@ async def validate(
1217
1224
- name: Name of the evaluation criteria.
1218
1225
- criteria: Instructions specifying the evaluation criteria.
1219
1226
1227
+ prompt: The prompt to use for the TLM call. If not provided, the prompt will be
1228
+ generated from the messages.
1229
+
1220
1230
quality_preset: The quality preset to use for the TLM or Trustworthy RAG API.
1221
1231
1232
+ rewritten_question: The re-written query if it was provided by the client to Codex from a user to be
1233
+ used instead of the original query.
1234
+
1222
1235
extra_headers: Send extra headers
1223
1236
1224
1237
extra_query: Add additional query parameters to the request
@@ -1245,7 +1258,6 @@ async def validate(
1245
1258
body = await async_maybe_transform (
1246
1259
{
1247
1260
"context" : context ,
1248
- "prompt" : prompt ,
1249
1261
"query" : query ,
1250
1262
"response" : response ,
1251
1263
"constrain_outputs" : constrain_outputs ,
@@ -1254,7 +1266,9 @@ async def validate(
1254
1266
"eval_scores" : eval_scores ,
1255
1267
"messages" : messages ,
1256
1268
"options" : options ,
1269
+ "prompt" : prompt ,
1257
1270
"quality_preset" : quality_preset ,
1271
+ "rewritten_question" : rewritten_question ,
1258
1272
"task" : task ,
1259
1273
},
1260
1274
project_validate_params .ProjectValidateParams ,
0 commit comments