You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
custom_metadata (object, optional): Custom metadata to log in Codex for the query.
166
165
eval_scores (Dict[str, float], optional): Optional scores to use for the query. When provided, Codex will skip running TrustworthyRAG evaluations on the query and use the provided scores instead.
167
166
eval_thresholds (Dict[str, float], optional): Optional thresholds to use for evaluating the query. We recommend configuring thresholds on the Project instead and using the same thresholds for all queries.
168
-
quality_preset (Literal["best", "high", "medium", "low", "base"], optional): The quality preset to use for the query.
169
167
170
168
Returns:
171
169
ProjectValidateResponse: The response from the validation.
"""Evaluate whether the AI-generated response is bad, and if so, request an alternate expert answer.
65
64
If no expert answer is available, this query is still logged for SMEs to answer.
@@ -72,8 +71,6 @@ def validate(
72
71
form_prompt (Callable[[str, str], str], optional): Optional function to format the prompt based on query and context. Cannot be provided together with prompt, provide one or the other. This function should take query and context as parameters and return a formatted prompt string. If not provided, a default prompt formatter will be used. To include a system prompt or any other special instructions for your LLM, incorporate them directly in your custom form_prompt() function definition.
73
72
metadata (dict, optional): Additional custom metadata to associate with the query logged in the Codex Project.
74
73
eval_scores (dict[str, float], optional): Scores assessing different aspects of the RAG system. If provided, TLM Trustworthy RAG will not be used to generate scores.
75
-
options (ProjectValidateOptions, optional): Typed dict of advanced TLM configuration options. See [TLMOptions](/tlm/api/python/tlm/#class-tlmoptions)
76
-
quality_preset (Literal["best", "high", "medium", "low", "base"], optional): The quality preset to use for the TLM or Trustworthy RAG API.
77
74
78
75
Returns:
79
76
ProjectValidateResponse: A response object containing:
0 commit comments