Evals
Create an evaluation run
Creates a run of the specified evaluation against the provided data source.
Evaluation runs are processed asynchronously. Use the returned run identifier to retrieve the run and monitor its status.
路徑參數
eval_id
string
必要
The identifier of the evaluation to run.
要求本文
name
string
The name of the run.
metadata
OpenAI.Metadata | null
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
data_source
OpenAI.CreateEvalJsonlRunDataSource | OpenAI.CreateEvalCompletionsRunDataSource | OpenAI.CreateEvalResponsesRunDataSource | EvalRunDataSource
必要
Defines how the service obtains the data to evaluate. Choose the variant that matches one of these workflows: - Evaluate existing data: Provide a dataset or inline items containing query, response, and optional ground-truth fields for single-turn evaluation, or complete conversations for multi-turn evaluation. The service evaluates the supplied responses without invoking a target. - Evaluate collected interactions: Select traces or stored responses from previous model or agent interactions. The service retrieves the interactions and evaluates them. - Invoke a target with supplied inputs: Provide queries for single-turn evaluation or scenarios for multi-turn conversation simulation, and specify a model or agent target. The service invokes the target, captures its responses, and evaluates them. - Generate inputs and invoke a target: Provide generation instructions instead of individual queries or scenarios. The service generates the inputs, invokes the specified target, captures its responses, and evaluates them. The selected source must conform to the evaluation's data_source_config.
type
enum
必要
The type of data source. Always jsonl.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
Determines what populates the item namespace in the data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of run data source. Always completions.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate | OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.
type
enum
必要
type
enum
必要
sampling_params
OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams
reasoning_effort
string | enum | null
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.
enum
response_format
OpenAI.ResponseFormatText | OpenAI.ResponseFormatJsonSchema | OpenAI.ResponseFormatJsonObject
type
enum
必要
The type of response format being defined. Always text.
type
enum
必要
The type of response format being defined. Always json_schema.
json_schema
OpenAI.ResponseFormatJsonSchemaJsonSchema
必要
schema
OpenAI.ResponseFormatJsonSchemaSchema
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
type
enum
必要
The type of response format being defined. Always json_object.
model
string
The name of the model to use for generating completions (e.g. "o3-mini").
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | OpenAI.EvalStoredCompletionsSource
必要
Determines what populates the item namespace in this run's data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of source. Always stored_completions.
metadata
OpenAI.Metadata | null
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
type
enum
必要
The type of run data source. Always responses.
input_messages
OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate | OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference
Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.
type
enum
必要
type
enum
必要
sampling_params
OpenAI.CreateEvalResponsesRunDataSourceSamplingParams
reasoning_effort
string | enum | null
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.
enum
text
OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText
format
json_schema | text | json_object
An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
必要
The type of response format being defined. Always json_schema.
description
string
A description of what the response format is for, used by the model to determine how to respond in the format.
name
string
必要
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
schema
OpenAI.ResponseFormatJsonSchemaSchema
必要
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
必要
The type of response format being defined. Always text.
json_object
OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject
JSON object response format. An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
type
enum
必要
The type of response format being defined. Always json_object.
model
string
The name of the model to use for generating completions (e.g. "o3-mini").
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | OpenAI.EvalResponsesSource
必要
Determines what populates the item namespace in this run's data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of run data source. Always responses.
reasoning_effort
string | enum | null
Optional reasoning effort parameter. This is a query parameter used to select responses.
enum
azure_ai_traces
TracesEvalRunDataSource
A data source for evaluation runs over agent traces stored in Application Insights. See create an evaluation dataset from traces.
type
enum
必要
The type of data source, always azure_ai_traces.
trace_ids
string[]
Collection of Agent trace identifiers that should be evaluated.
conversation_ids
string[]
Collection of conversation identifiers to filter traces by conversation.
agent_id
string
The agent ID used to filter traces for evaluation.
agent_name
string
The agent name used to filter traces for evaluation.
lookback_hours
integer
Lookback window (in hours) applied when retrieving traces from Application Insights. For scheduled evaluations this is inferred from the recurrence interval.
max_traces
integer
Sampling limit applied to traces retrieved for evaluation.
ingestion_delay_seconds
integer
The delay to apply for ingestion when querying traces.
azure_ai_synthetic_data_gen
SyntheticDataGenerationEvalRunDataSource
A data source that generates synthetic data for an evaluation run. See generate synthetic data for cloud evaluation and generate a synthetic evaluation dataset.
type
enum
必要
The type of data source, always azure_ai_synthetic_data_gen.
item_generation_params
SyntheticDataGenerationItemGenerationParams
必要
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
input_messages
OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate
type
enum
必要
azure_ai_synthetic_data_generation_with_simulation
SyntheticDataGenerationWithSimulationEvalRunDataSource
Generates seed test-case scenarios via the data generation endpoint and then evaluates a target by simulating multi-turn user conversations over those scenarios. The generation_sources in synthetic_data_generation_configuration are forwarded to the data generation backend to produce seed test cases. Each generated scenario is then simulated against target: the model in model_configuration plays the simulated user and drives the conversation according to default_simulation_configuration until it reaches the desired length or maximum turn limit. The evaluation's testing criteria are then applied to the generated conversations.
type
enum
必要
The type of data source, always azure_ai_synthetic_data_generation_with_simulation.
synthetic_data_generation_configuration
SyntheticDataGenerationConfiguration
必要
Seed data-generation configuration for SyntheticDataGenerationWithSimulationEvalRunDataSource. The generation_sources are forwarded directly to the data generation endpoint to produce the seed test cases that are subsequently simulated.
test_case_count
integer
Number of seed test cases to generate.
output_test_case_dataset_name
string
Name of the dataset where the generated seed test cases are stored. When omitted, the service generates a name automatically.
generation_sources
DataGenerationJobSource[]
必要
Seed generation sources (prompt, agent, or file) forwarded to the data generation endpoint. Multiple sources may be provided.
model_configuration
EvaluationModelConfiguration
必要
Configures the model that plays the simulated user. This model is separate from the evaluated target.
model
string
必要
Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
voice_model
azure-standard
Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.
azure-standard
EvaluationAzureStandardVoiceModelConfiguration
Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.
type
enum
必要
The voice kind. Always azure-standard.
name
string
必要
The Azure neural voice name.
temperature
number
The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.
default_simulation_configuration
UserConversationSimulationDefaultConfiguration
Configures default conversation behavior and optional run-wide persistence of generated conversations.
max_num_turns
integer
Hard limit on turns in each conversation. When omitted, the service defaults to 20.
conversation_repetitions
integer
Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.
desired_num_turns
integer
Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.
audio_effects
UserConversationSimulationAudioEffectsConfiguration
Configures effects applied to simulated conversation audio.
effects
UserConversationSimulationAudioEffect[]
Effects to apply to simulated audio.
volume_percentage
integer
Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.
user_behavior
UserConversationSimulationUserBehaviorConfiguration
Configures conversation behavior for the simulated user.
interruption
default
Configuration for simulated user interruption behavior.
default
UserConversationSimulationDefaultInterruptionConfiguration
Configures the default interruption behavior for the simulated user.
type
enum
必要
The interruption type, always default.
enable_conversation_dataset_generation
boolean
Whether to write all generated conversations to a versioned Foundry dataset. When enabled, the completed run includes a simulated_user_conversations entry in output_datasets. When omitted, the service defaults to false.
output_conversation_dataset_name
string
Name of the dataset to which generated conversations are written. This property is used only when enable_conversation_dataset_generation is true. When omitted, the service generates a dataset name.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_responses
AzureAIResponsesEvalRunDataSource
A data source that retrieves deployed interactions for continuous evaluation. See evaluate deployed interactions.
type
enum
必要
The type of data source, always azure_ai_responses.
item_generation_params
ResponseRetrievalItemGenerationParams
必要
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
max_runs_hourly
integer
必要
Maximum number of evaluation runs allowed per hour.
event_configuration_id
string
必要
The event configuration name associated with this evaluation run.
azure_ai_target_completions
TargetCompletionEvalRunDataSource
A data source for evaluating model or agent target completions. See evaluate conversations.
type
enum
必要
The type of data source, always azure_ai_target_completions.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
type
enum
必要
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The source configuration for inline or file data.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
item_generation_params
red_team | red_team_seed_prompts | red_team_taxonomy | response_retrieval | target_completion | synthetic_data_gen
Configures how the service prepares input items for an evaluation run before applying testing criteria. Depending on type, preparation can generate new inputs, retrieve existing responses, transform source data, or simulate conversations. Each type selects a workflow-specific model with the parameters required by that preparation workflow. These parameters do not define the evaluated target or the testing criteria.
red_team
RedTeamItemGenerationParams
Represents the parameters for red team item generation.
type
enum
必要
The type of item generation parameters.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
red_team_seed_prompts
RedTeamSeedPromptsItemGenerationParams
Represents the parameters for red team seed prompts item generation.
type
enum
必要
The type of item generation parameters, always red_team_seed_prompts.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
red_team_taxonomy
RedTeamTaxonomyItemGenerationParams
Represents the parameters for red team taxonomy item generation.
type
enum
必要
The type of item generation parameters, always red_team_taxonomy.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
response_retrieval
ResponseRetrievalItemGenerationParams
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target_completion
TargetCompletionItemGenerationParams
Parameters for generating target completions for simulated conversations. See simulate conversations.
type
enum
必要
The type of item generation parameters, always target_completion.
max_concurrency
integer
The maximum number of target completions to execute concurrently. The services defaults to 1 if a value is not specified by the caller, which invokes the target sequentially.
synthetic_data_gen
SyntheticDataGenerationItemGenerationParams
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
csv
EvalCsvRunDataSource
A CSV data source for evaluation runs. See evaluation datasets.
type
enum
必要
The type of data source, always csv.
source
EvalCsvFileIdSource
必要
Represents a reference to an uploaded CSV file used as a source for evaluation data.
type
enum
必要
The type of source, always file_id.
id
string
必要
The identifier of the uploaded CSV file.
azure_ai_red_team
RedTeamEvalRunDataSource
Represents a data source for red team evaluation runs.
type
enum
必要
The type of data source. Always azure_ai_red_team.
item_generation_params
red_team | red_team_seed_prompts | red_team_taxonomy | response_retrieval | target_completion | synthetic_data_gen
必要
Configures how the service prepares input items for an evaluation run before applying testing criteria. Depending on type, preparation can generate new inputs, retrieve existing responses, transform source data, or simulate conversations. Each type selects a workflow-specific model with the parameters required by that preparation workflow. These parameters do not define the evaluated target or the testing criteria.
red_team
RedTeamItemGenerationParams
Represents the parameters for red team item generation.
type
enum
必要
The type of item generation parameters.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
red_team_seed_prompts
RedTeamSeedPromptsItemGenerationParams
Represents the parameters for red team seed prompts item generation.
type
enum
必要
The type of item generation parameters, always red_team_seed_prompts.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
red_team_taxonomy
RedTeamTaxonomyItemGenerationParams
Represents the parameters for red team taxonomy item generation.
type
enum
必要
The type of item generation parameters, always red_team_taxonomy.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
response_retrieval
ResponseRetrievalItemGenerationParams
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target_completion
TargetCompletionItemGenerationParams
Parameters for generating target completions for simulated conversations. See simulate conversations.
type
enum
必要
The type of item generation parameters, always target_completion.
max_concurrency
integer
The maximum number of target completions to execute concurrently. The services defaults to 1 if a value is not specified by the caller, which invokes the target sequentially.
synthetic_data_gen
SyntheticDataGenerationItemGenerationParams
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_trace_data_source
AzureAITraceDataSourceEvalRunDataSource
A data source that selects traces for evaluation. See create an evaluation dataset from traces.
type
enum
必要
The type of data source, always azure_ai_trace_data_source.
trace_source
trace_id_source | conversation_id_source | agent_filter
Base class for polymorphic trace sources nested within an AzureAITraceDataSourceEvalRunDataSource.
trace_id_source
TraceIdTraceSource
A trace source that selects traces by explicit trace IDs.
type
enum
必要
The type of trace source, always trace_id_source.
trace_ids
string[]
必要
Collection of trace identifiers to evaluate.
conversation_id_source
ConversationIdTraceSource
A trace source that selects traces by conversation IDs.
type
enum
必要
The type of trace source, always conversation_id_source.
conversation_ids
string[]
必要
Collection of conversation identifiers to filter traces by.
agent_filter
AgentFilterTraceSource
A trace source that selects traces by agent reference with time-based filtering.
type
enum
必要
The type of trace source, always agent_filter.
agent_id
string
The identifier of the agent to filter traces by.
agent_name
string
The name of the agent to filter traces by.
agent_version
string
The version of the agent to filter traces by.
max_traces
integer
Maximum number of traces to sample. Must be greater than 0.
filter_strategy
string | enum
Specifies the type of filter strategy used to select traces for evaluation.
enum
azure_ai_benchmark_preview
AzureAIBenchmarkPreviewEvalRunDataSource
Represents a data source for benchmark evaluation runs.
type
enum
必要
The type of data source, always azure_ai_benchmark_preview.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
type
enum
必要
target
AzureAIModelTarget | AzureAIAgentTarget
必要
The target model or agent to evaluate against the benchmark. When using azure_ai_model target, sampling_params must not be provided; inference parameters are auto-filled from the benchmark specification stored in eval group properties.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_user_conversation_simulation
UserConversationSimulationEvalRunDataSource
Evaluates a model or agent by simulating user conversations against it. Each source item defines a test scenario. Use a JSONL source or an inline_user_conversation_simulation source with strongly typed test cases. JSONL attributes use the inline test-case property names by default; specify data_mapping only when the dataset uses different names. The model specified by model_configuration generates the simulated user's turns and drives the conversation with target until it reaches the desired length or maximum turn limit. The evaluation's testing criteria are then applied to the conversation.
type
enum
必要
The type of data source, always azure_ai_user_conversation_simulation.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | UserConversationSimulationInlineTestCasesSource
必要
Sources supported by user conversation simulation.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The source type. Always inline_user_conversation_simulation.
test_cases
UserConversationSimulationTestCase[]
必要
Test scenarios from which user conversations are simulated. At least one test case is required.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
model_configuration
EvaluationModelConfiguration
必要
Configures the model that plays the simulated user. This model is separate from the evaluated target.
model
string
必要
Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
voice_model
azure-standard
Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.
azure-standard
EvaluationAzureStandardVoiceModelConfiguration
Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.
type
enum
必要
The voice kind. Always azure-standard.
name
string
必要
The Azure neural voice name.
temperature
number
The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.
default_simulation_configuration
UserConversationSimulationDefaultConfiguration
Configures default conversation behavior and optional run-wide persistence of generated conversations.
max_num_turns
integer
Hard limit on turns in each conversation. When omitted, the service defaults to 20.
conversation_repetitions
integer
Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.
desired_num_turns
integer
Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.
audio_effects
UserConversationSimulationAudioEffectsConfiguration
Configures effects applied to simulated conversation audio.
effects
UserConversationSimulationAudioEffect[]
Effects to apply to simulated audio.
volume_percentage
integer
Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.
user_behavior
UserConversationSimulationUserBehaviorConfiguration
Configures conversation behavior for the simulated user.
interruption
default
Configuration for simulated user interruption behavior.
default
UserConversationSimulationDefaultInterruptionConfiguration
Configures the default interruption behavior for the simulated user.
type
enum
必要
The interruption type, always default.
enable_conversation_dataset_generation
boolean
Whether to write all generated conversations to a versioned Foundry dataset. When enabled, the completed run includes a simulated_user_conversations entry in output_datasets. When omitted, the service defaults to false.
output_conversation_dataset_name
string
Name of the dataset to which generated conversations are written. This property is used only when enable_conversation_dataset_generation is true. When omitted, the service generates a dataset name.
data_mapping
object
Maps JSONL dataset attributes to user conversation simulation inputs when their names differ from the defaults. The default attribute names are test_case_id, test_case_category, test_case_description, and simulation_configuration, matching UserConversationSimulationTestCase. Omit when the dataset uses these names or when using inline_user_conversation_simulation.
properties
object
Set of immutable 16 key-value pairs that can be attached to an object for storing additional information. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
evaluation_level
enum | string
The level at which evaluation is performed.
enum
回覆
The request has succeeded.
主體
object
enum
必要
The type of the object. Always "eval.run".
id
string
必要
Unique identifier for the evaluation run.
eval_id
string
必要
The identifier of the associated evaluation.
status
string
必要
The status of the evaluation run.
model
string | null
必要
The model that is evaluated, if applicable.
name
string | null
必要
The name of the evaluation run.
created_at
integer
必要
Unix timestamp (in seconds) when the evaluation run was created.
report_url
string
必要
The URL to the rendered evaluation run report on the UI dashboard.
result_counts
OpenAI.EvalRunResultCounts
必要
per_model_usage
OpenAI.EvalRunPerModelUsage[] | null
必要
Usage statistics for each model during the evaluation run.
per_testing_criteria_results
OpenAI.EvalRunPerTestingCriteriaResults[] | null
必要
Results per testing criteria applied during the evaluation run.
data_source
OpenAI.CreateEvalJsonlRunDataSource | OpenAI.CreateEvalCompletionsRunDataSource | OpenAI.CreateEvalResponsesRunDataSource | EvalRunDataSource
必要
Information about the run's data source.
type
enum
必要
The type of data source. Always jsonl.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
Determines what populates the item namespace in the data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of run data source. Always completions.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate | OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.
type
enum
必要
type
enum
必要
sampling_params
OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams
reasoning_effort
string | enum | null
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.
enum
response_format
OpenAI.ResponseFormatText | OpenAI.ResponseFormatJsonSchema | OpenAI.ResponseFormatJsonObject
type
enum
必要
The type of response format being defined. Always text.
type
enum
必要
The type of response format being defined. Always json_schema.
json_schema
OpenAI.ResponseFormatJsonSchemaJsonSchema
必要
schema
OpenAI.ResponseFormatJsonSchemaSchema
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
type
enum
必要
The type of response format being defined. Always json_object.
model
string
The name of the model to use for generating completions (e.g. "o3-mini").
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | OpenAI.EvalStoredCompletionsSource
必要
Determines what populates the item namespace in this run's data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of source. Always stored_completions.
metadata
OpenAI.Metadata | null
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
type
enum
必要
The type of run data source. Always responses.
input_messages
OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate | OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference
Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.
type
enum
必要
type
enum
必要
sampling_params
OpenAI.CreateEvalResponsesRunDataSourceSamplingParams
reasoning_effort
string | enum | null
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.
enum
text
OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText
format
json_schema | text | json_object
An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
必要
The type of response format being defined. Always json_schema.
description
string
A description of what the response format is for, used by the model to determine how to respond in the format.
name
string
必要
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
schema
OpenAI.ResponseFormatJsonSchemaSchema
必要
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
必要
The type of response format being defined. Always text.
json_object
OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject
JSON object response format. An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
type
enum
必要
The type of response format being defined. Always json_object.
model
string
The name of the model to use for generating completions (e.g. "o3-mini").
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | OpenAI.EvalResponsesSource
必要
Determines what populates the item namespace in this run's data source.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The type of run data source. Always responses.
reasoning_effort
string | enum | null
Optional reasoning effort parameter. This is a query parameter used to select responses.
enum
azure_ai_traces
TracesEvalRunDataSource
A data source for evaluation runs over agent traces stored in Application Insights. See create an evaluation dataset from traces.
type
enum
必要
The type of data source, always azure_ai_traces.
trace_ids
string[]
Collection of Agent trace identifiers that should be evaluated.
conversation_ids
string[]
Collection of conversation identifiers to filter traces by conversation.
agent_id
string
The agent ID used to filter traces for evaluation.
agent_name
string
The agent name used to filter traces for evaluation.
lookback_hours
integer
Lookback window (in hours) applied when retrieving traces from Application Insights. For scheduled evaluations this is inferred from the recurrence interval.
max_traces
integer
Sampling limit applied to traces retrieved for evaluation.
ingestion_delay_seconds
integer
The delay to apply for ingestion when querying traces.
azure_ai_synthetic_data_gen
SyntheticDataGenerationEvalRunDataSource
A data source that generates synthetic data for an evaluation run. See generate synthetic data for cloud evaluation and generate a synthetic evaluation dataset.
type
enum
必要
The type of data source, always azure_ai_synthetic_data_gen.
item_generation_params
SyntheticDataGenerationItemGenerationParams
必要
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
input_messages
OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate
type
enum
必要
azure_ai_synthetic_data_generation_with_simulation
SyntheticDataGenerationWithSimulationEvalRunDataSource
Generates seed test-case scenarios via the data generation endpoint and then evaluates a target by simulating multi-turn user conversations over those scenarios. The generation_sources in synthetic_data_generation_configuration are forwarded to the data generation backend to produce seed test cases. Each generated scenario is then simulated against target: the model in model_configuration plays the simulated user and drives the conversation according to default_simulation_configuration until it reaches the desired length or maximum turn limit. The evaluation's testing criteria are then applied to the generated conversations.
type
enum
必要
The type of data source, always azure_ai_synthetic_data_generation_with_simulation.
synthetic_data_generation_configuration
SyntheticDataGenerationConfiguration
必要
Seed data-generation configuration for SyntheticDataGenerationWithSimulationEvalRunDataSource. The generation_sources are forwarded directly to the data generation endpoint to produce the seed test cases that are subsequently simulated.
test_case_count
integer
Number of seed test cases to generate.
output_test_case_dataset_name
string
Name of the dataset where the generated seed test cases are stored. When omitted, the service generates a name automatically.
generation_sources
DataGenerationJobSource[]
必要
Seed generation sources (prompt, agent, or file) forwarded to the data generation endpoint. Multiple sources may be provided.
model_configuration
EvaluationModelConfiguration
必要
Configures the model that plays the simulated user. This model is separate from the evaluated target.
model
string
必要
Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
voice_model
azure-standard
Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.
azure-standard
EvaluationAzureStandardVoiceModelConfiguration
Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.
type
enum
必要
The voice kind. Always azure-standard.
name
string
必要
The Azure neural voice name.
temperature
number
The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.
default_simulation_configuration
UserConversationSimulationDefaultConfiguration
Configures default conversation behavior and optional run-wide persistence of generated conversations.
max_num_turns
integer
Hard limit on turns in each conversation. When omitted, the service defaults to 20.
conversation_repetitions
integer
Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.
desired_num_turns
integer
Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.
audio_effects
UserConversationSimulationAudioEffectsConfiguration
Configures effects applied to simulated conversation audio.
effects
UserConversationSimulationAudioEffect[]
Effects to apply to simulated audio.
volume_percentage
integer
Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.
user_behavior
UserConversationSimulationUserBehaviorConfiguration
Configures conversation behavior for the simulated user.
interruption
default
Configuration for simulated user interruption behavior.
default
UserConversationSimulationDefaultInterruptionConfiguration
Configures the default interruption behavior for the simulated user.
type
enum
必要
The interruption type, always default.
enable_conversation_dataset_generation
boolean
Whether to write all generated conversations to a versioned Foundry dataset. When enabled, the completed run includes a simulated_user_conversations entry in output_datasets. When omitted, the service defaults to false.
output_conversation_dataset_name
string
Name of the dataset to which generated conversations are written. This property is used only when enable_conversation_dataset_generation is true. When omitted, the service generates a dataset name.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_responses
AzureAIResponsesEvalRunDataSource
A data source that retrieves deployed interactions for continuous evaluation. See evaluate deployed interactions.
type
enum
必要
The type of data source, always azure_ai_responses.
item_generation_params
ResponseRetrievalItemGenerationParams
必要
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
max_runs_hourly
integer
必要
Maximum number of evaluation runs allowed per hour.
event_configuration_id
string
必要
The event configuration name associated with this evaluation run.
azure_ai_target_completions
TargetCompletionEvalRunDataSource
A data source for evaluating model or agent target completions. See evaluate conversations.
type
enum
必要
The type of data source, always azure_ai_target_completions.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
type
enum
必要
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The source configuration for inline or file data.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
item_generation_params
red_team | red_team_seed_prompts | red_team_taxonomy | response_retrieval | target_completion | synthetic_data_gen
Configures how the service prepares input items for an evaluation run before applying testing criteria. Depending on type, preparation can generate new inputs, retrieve existing responses, transform source data, or simulate conversations. Each type selects a workflow-specific model with the parameters required by that preparation workflow. These parameters do not define the evaluated target or the testing criteria.
red_team
RedTeamItemGenerationParams
Represents the parameters for red team item generation.
type
enum
必要
The type of item generation parameters.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
red_team_seed_prompts
RedTeamSeedPromptsItemGenerationParams
Represents the parameters for red team seed prompts item generation.
type
enum
必要
The type of item generation parameters, always red_team_seed_prompts.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
red_team_taxonomy
RedTeamTaxonomyItemGenerationParams
Represents the parameters for red team taxonomy item generation.
type
enum
必要
The type of item generation parameters, always red_team_taxonomy.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
response_retrieval
ResponseRetrievalItemGenerationParams
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target_completion
TargetCompletionItemGenerationParams
Parameters for generating target completions for simulated conversations. See simulate conversations.
type
enum
必要
The type of item generation parameters, always target_completion.
max_concurrency
integer
The maximum number of target completions to execute concurrently. The services defaults to 1 if a value is not specified by the caller, which invokes the target sequentially.
synthetic_data_gen
SyntheticDataGenerationItemGenerationParams
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
csv
EvalCsvRunDataSource
A CSV data source for evaluation runs. See evaluation datasets.
type
enum
必要
The type of data source, always csv.
source
EvalCsvFileIdSource
必要
Represents a reference to an uploaded CSV file used as a source for evaluation data.
type
enum
必要
The type of source, always file_id.
id
string
必要
The identifier of the uploaded CSV file.
azure_ai_red_team
RedTeamEvalRunDataSource
Represents a data source for red team evaluation runs.
type
enum
必要
The type of data source. Always azure_ai_red_team.
item_generation_params
red_team | red_team_seed_prompts | red_team_taxonomy | response_retrieval | target_completion | synthetic_data_gen
必要
Configures how the service prepares input items for an evaluation run before applying testing criteria. Depending on type, preparation can generate new inputs, retrieve existing responses, transform source data, or simulate conversations. Each type selects a workflow-specific model with the parameters required by that preparation workflow. These parameters do not define the evaluated target or the testing criteria.
red_team
RedTeamItemGenerationParams
Represents the parameters for red team item generation.
type
enum
必要
The type of item generation parameters.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
red_team_seed_prompts
RedTeamSeedPromptsItemGenerationParams
Represents the parameters for red team seed prompts item generation.
type
enum
必要
The type of item generation parameters, always red_team_seed_prompts.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
red_team_taxonomy
RedTeamTaxonomyItemGenerationParams
Represents the parameters for red team taxonomy item generation.
type
enum
必要
The type of item generation parameters, always red_team_taxonomy.
attack_strategies
AttackStrategy[]
必要
The collection of attack strategies to be used.
num_turns
integer
必要
The number of turns allowed in the game.
source
OpenAI.EvalJsonlFileContentSource
必要
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
response_retrieval
ResponseRetrievalItemGenerationParams
Parameters for retrieving deployed conversations for evaluation. See evaluate deployed conversations.
type
enum
必要
The type of item generation parameters, always response_retrieval.
max_num_turns
integer
必要
The maximum number of turns of chat history to evaluate.
data_mapping
object
必要
Maps response_id to the source field that contains a stored Responses API response identifier. For example, {"response_id": "{{item.resp_id}}"}. Field names are case-sensitive.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource
必要
The inline JSONL content containing the response identifiers to retrieve. The azure_ai_responses data source supports file_content only; providing a file_id results in a 400 Bad Request response.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
target_completion
TargetCompletionItemGenerationParams
Parameters for generating target completions for simulated conversations. See simulate conversations.
type
enum
必要
The type of item generation parameters, always target_completion.
max_concurrency
integer
The maximum number of target completions to execute concurrently. The services defaults to 1 if a value is not specified by the caller, which invokes the target sequentially.
synthetic_data_gen
SyntheticDataGenerationItemGenerationParams
Represents the parameters for synthetic data generation item generation.
type
enum
必要
The type of item generation parameters.
samples_count
integer
必要
The maximum number of data samples to generate.
prompt
string
The prompt used to generate synthetic data. This property is optional when the target is an agent that already has instructions.
model_deployment_name
string
必要
The name of the model deployment to use for generating synthetic data.
output_dataset_name
string
The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically.
output_dataset_id
string
The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.
sources
OpenAI.EvalJsonlFileIdSource[]
必要
The optional seed data content source files for data generation.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_trace_data_source
AzureAITraceDataSourceEvalRunDataSource
A data source that selects traces for evaluation. See create an evaluation dataset from traces.
type
enum
必要
The type of data source, always azure_ai_trace_data_source.
trace_source
trace_id_source | conversation_id_source | agent_filter
Base class for polymorphic trace sources nested within an AzureAITraceDataSourceEvalRunDataSource.
trace_id_source
TraceIdTraceSource
A trace source that selects traces by explicit trace IDs.
type
enum
必要
The type of trace source, always trace_id_source.
trace_ids
string[]
必要
Collection of trace identifiers to evaluate.
conversation_id_source
ConversationIdTraceSource
A trace source that selects traces by conversation IDs.
type
enum
必要
The type of trace source, always conversation_id_source.
conversation_ids
string[]
必要
Collection of conversation identifiers to filter traces by.
agent_filter
AgentFilterTraceSource
A trace source that selects traces by agent reference with time-based filtering.
type
enum
必要
The type of trace source, always agent_filter.
agent_id
string
The identifier of the agent to filter traces by.
agent_name
string
The name of the agent to filter traces by.
agent_version
string
The version of the agent to filter traces by.
max_traces
integer
Maximum number of traces to sample. Must be greater than 0.
filter_strategy
string | enum
Specifies the type of filter strategy used to select traces for evaluation.
enum
azure_ai_benchmark_preview
AzureAIBenchmarkPreviewEvalRunDataSource
Represents a data source for benchmark evaluation runs.
type
enum
必要
The type of data source, always azure_ai_benchmark_preview.
input_messages
OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference
type
enum
必要
target
AzureAIModelTarget | AzureAIAgentTarget
必要
The target model or agent to evaluate against the benchmark. When using azure_ai_model target, sampling_params must not be provided; inference parameters are auto-filled from the benchmark specification stored in eval group properties.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
azure_ai_user_conversation_simulation
UserConversationSimulationEvalRunDataSource
Evaluates a model or agent by simulating user conversations against it. Each source item defines a test scenario. Use a JSONL source or an inline_user_conversation_simulation source with strongly typed test cases. JSONL attributes use the inline test-case property names by default; specify data_mapping only when the dataset uses different names. The model specified by model_configuration generates the simulated user's turns and drives the conversation with target until it reaches the desired length or maximum turn limit. The evaluation's testing criteria are then applied to the conversation.
type
enum
必要
The type of data source, always azure_ai_user_conversation_simulation.
source
OpenAI.EvalJsonlFileContentSource | OpenAI.EvalJsonlFileIdSource | UserConversationSimulationInlineTestCasesSource
必要
Sources supported by user conversation simulation.
type
enum
必要
The type of jsonl source. Always file_content.
content
OpenAI.EvalJsonlFileContentSourceContent[]
必要
The content of the jsonl file.
type
enum
必要
The type of jsonl source. Always file_id.
id
string
必要
The identifier of the file.
type
enum
必要
The source type. Always inline_user_conversation_simulation.
test_cases
UserConversationSimulationTestCase[]
必要
Test scenarios from which user conversations are simulated. At least one test case is required.
target
azure_ai_model | azure_ai_agent
必要
Base class for targets with discriminator support.
azure_ai_model
AzureAIModelTarget
A target that identifies an Azure AI model. See evaluate administrator-connected models.
type
enum
必要
The type of target, always azure_ai_model.
model
string
The name of the model deployment to invoke as the evaluation target.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
azure_ai_agent
AzureAIAgentTarget
A target that identifies an Azure AI agent. See evaluate model or agent targets.
type
enum
必要
The type of target, always azure_ai_agent.
name
string
必要
The name of the Azure AI agent to invoke as the evaluation target.
version
string
The version of the Azure AI agent. When omitted, the latest version is used.
tool_descriptions
ToolDescription[]
Optional descriptions of tools available to the agent.
tools
OpenAI.Tool[]
Tool definitions made available when invoking the agent.
model_configuration
EvaluationModelConfiguration
必要
Configures the model that plays the simulated user. This model is separate from the evaluated target.
model
string
必要
Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.
sampling_params
ModelSamplingParams
Represents a set of parameters used to control the sampling behavior of a language model during text generation.
temperature
number
The temperature parameter for sampling. Defaults to 1.0.
top_p
number
The top-p parameter for nucleus sampling. Defaults to 1.0.
seed
integer
The random seed for reproducibility. Defaults to 42.
max_completion_tokens
integer
The maximum number of tokens allowed in the completion.
voice_model
azure-standard
Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.
azure-standard
EvaluationAzureStandardVoiceModelConfiguration
Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.
type
enum
必要
The voice kind. Always azure-standard.
name
string
必要
The Azure neural voice name.
temperature
number
The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.
default_simulation_configuration
UserConversationSimulationDefaultConfiguration
Configures default conversation behavior and optional run-wide persistence of generated conversations.
max_num_turns
integer
Hard limit on turns in each conversation. When omitted, the service defaults to 20.
conversation_repetitions
integer
Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.
desired_num_turns
integer
Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.
audio_effects
UserConversationSimulationAudioEffectsConfiguration
Configures effects applied to simulated conversation audio.
effects
UserConversationSimulationAudioEffect[]
Effects to apply to simulated audio.
volume_percentage
integer
Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.
user_behavior
UserConversationSimulationUserBehaviorConfiguration
Configures conversation behavior for the simulated user.
interruption
default
Configuration for simulated user interruption behavior.
default
UserConversationSimulationDefaultInterruptionConfiguration
Configures the default interruption behavior for the simulated user.
type
enum
必要
The interruption type, always default.
enable_conversation_dataset_generation
boolean
Whether to write all generated conversations to a versioned Foundry dataset. When enabled, the completed run includes a simulated_user_conversations entry in output_datasets. When omitted, the service defaults to false.
output_conversation_dataset_name
string
Name of the dataset to which generated conversations are written. This property is used only when enable_conversation_dataset_generation is true. When omitted, the service generates a dataset name.
data_mapping
object
Maps JSONL dataset attributes to user conversation simulation inputs when their names differ from the defaults. The default attribute names are test_case_id, test_case_category, test_case_description, and simulation_configuration, matching UserConversationSimulationTestCase. Omit when the dataset uses these names or when using inline_user_conversation_simulation.
metadata
OpenAI.Metadata | null
必要
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
error
OpenAI.EvalApiError | null
必要
An object representing an error response from the Eval API.
code
string
必要
The error code.
message
string
必要
The error message.
created_by
string
The name of the person who created the evaluation run.
properties
object
Set of immutable 16 key-value pairs that can be attached to an object for storing additional information. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
evaluation_level
enum | string
The level at which evaluation is performed.
enum
output_datasets
EvaluationOutputDataset[]
Datasets produced by the evaluation run. Omitted when no datasets were generated.
latency
EvalRunLatency
Latency measurements reported for an evaluation run.
target
LatencySummary
Run-wide end-to-end latency percentiles for the evaluation target.
p50_ms
number
必要
Median target latency in milliseconds.
p95_ms
number
必要
95th percentile target latency in milliseconds.
sample_count
integer
必要
Number of evaluation rows that contributed a usable latency measurement.
estimated_cost
EvalRunCost
Estimated costs reported for an evaluation run.
target
InferenceCostSummary
Run-wide estimated inference cost for the evaluation target. The estimate is derived from reported token counts and list prices. It excludes evaluator and runtime usage and does not account for negotiated pricing, commitments, or discounts.
estimated_cost
number
必要
Estimated target inference cost in the specified currency.
currency
string
必要
ISO 4217 currency code for the estimate.
completeness
string | enum
必要
Indicates whether all target models attributed to the evaluation run were priced.
enum
pricing_version
string
Identifier of the price-list snapshot used for the estimate.
model_costs
ModelCost[]
必要
Estimated cost and token usage for each priced target model.
unpriced_models
string[]
Target models for which no reliable price was available.
Request
curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \
-X POST \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"gpt-4o-mini","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.
# Steps
1. Analyze the content of the news headline to understand its primary focus.
2. Extract the subject matter, identifying any key indicators or keywords.
3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.
4. Ensure only one category is selected per headline.
# Output Format
Respond with the chosen category as a single word. For instance: "Technology", "Markets", "World", "Business", or "Sports".
# Examples
**Input**: "Apple Unveils New iPhone Model, Featuring Advanced AI Features"
**Output**: "Technology"
**Input**: "Global Stocks Mixed as Investors Await Central Bank Decisions"
**Output**: "Markets"
**Input**: "War in Ukraine: Latest Updates on Negotiation Status"
**Output**: "World"
**Input**: "Microsoft in Talks to Acquire Gaming Company for $2 Billion"
**Output**: "Business"
**Input**: "Manchester United Secures Win in Premier League Football Match"
**Output**: "Sports"
# Notes
- If the headline appears to fit into more than one category, choose the most dominant theme.
- Keywords or phrases such as "stocks", "company acquisition", "match", or technological brands can be good indicators for classification.
"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"temperature":1,"max_completions_tokens":2048,"top_p":1,"seed":42},"model":"gpt-4o-mini","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}'
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
run = client.evals.runs.create(
eval_id="eval_id",
data_source={
"source": {
"content": [{
"item": {
"foo": "bar"
}
}],
"type": "file_content",
},
"type": "jsonl",
},
)
print(run.id)
import OpenAI from "openai";
const openai = new OpenAI();
const run = await openai.evals.runs.create(
"eval_67e579652b548190aaa83ada4b125f47",
{
name: "gpt-4o-mini",
data_source: {
type: "completions",
input_messages: {
type: "template",
template: [
{
role: "developer",
content: "Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.
# Steps
1. Analyze the content of the news headline to understand its primary focus.
2. Extract the subject matter, identifying any key indicators or keywords.
3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.
4. Ensure only one category is selected per headline.
# Output Format
Respond with the chosen category as a single word. For instance: "Technology", "Markets", "World", "Business", or "Sports".
# Examples
**Input**: "Apple Unveils New iPhone Model, Featuring Advanced AI Features"
**Output**: "Technology"
**Input**: "Global Stocks Mixed as Investors Await Central Bank Decisions"
**Output**: "Markets"
**Input**: "War in Ukraine: Latest Updates on Negotiation Status"
**Output**: "World"
**Input**: "Microsoft in Talks to Acquire Gaming Company for $2 Billion"
**Output**: "Business"
**Input**: "Manchester United Secures Win in Premier League Football Match"
**Output**: "Sports"
# Notes
- If the headline appears to fit into more than one category, choose the most dominant theme.
- Keywords or phrases such as "stocks", "company acquisition", "match", or technological brands can be good indicators for classification.
"
},
{
role: "user",
content: "{{item.input}}"
}
]
},
sampling_params: {
temperature: 1,
max_completions_tokens: 2048,
top_p: 1,
seed: 42
},
model: "gpt-4o-mini",
source: {
type: "file_content",
content: [
{
item: {
input: "Tech Company Launches Advanced Artificial Intelligence Platform",
ground_truth: "Technology"
}
}
]
}
}
}
);
console.log(run);
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});
const run = await client.evals.runs.create('eval_id', {
data_source: {
source: { content: [{ item: { foo: 'bar' } }], type: 'file_content' },
type: 'jsonl',
},
});
console.log(run.id);
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.JsonValue;
import com.openai.models.evals.runs.CreateEvalJsonlRunDataSource;
import com.openai.models.evals.runs.RunCreateParams;
import com.openai.models.evals.runs.RunCreateResponse;
import java.util.List;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
RunCreateParams params = RunCreateParams.builder()
.evalId("eval_id")
.dataSource(CreateEvalJsonlRunDataSource.builder()
.fileContentSource(List.of(CreateEvalJsonlRunDataSource.Source.FileContent.Content.builder()
.item(CreateEvalJsonlRunDataSource.Source.FileContent.Content.Item.builder()
.putAdditionalProperty("foo", JsonValue.from("bar"))
.build())
.build()))
.build())
.build();
RunCreateResponse run = client.evals().runs().create(params);
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
run = openai.evals.runs.create(
"eval_id",
data_source: {source: {content: [{item: {foo: "bar"}}], type: :file_content}, type: :jsonl}
)
puts(run)
回應
{
"object": "eval.run",
"id": "evalrun_67e57965b480819094274e3a32235e4c",
"eval_id": "eval_67e579652b548190aaa83ada4b125f47",
"report_url": "https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c",
"status": "queued",
"model": "gpt-4o-mini",
"name": "gpt-4o-mini",
"created_at": 1743092069,
"result_counts": {
"total": 0,
"errored": 0,
"failed": 0,
"passed": 0
},
"per_model_usage": null,
"per_testing_criteria_results": null,
"data_source": {
"type": "completions",
"source": {
"type": "file_content",
"content": [
{
"item": {
"input": "Tech Company Launches Advanced Artificial Intelligence Platform",
"ground_truth": "Technology"
}
}
]
},
"input_messages": {
"type": "template",
"template": [
{
"type": "message",
"role": "developer",
"content": {
"type": "input_text",
"text": "Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.
# Steps
1. Analyze the content of the news headline to understand its primary focus.
2. Extract the subject matter, identifying any key indicators or keywords.
3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.
4. Ensure only one category is selected per headline.
# Output Format
Respond with the chosen category as a single word. For instance: "Technology", "Markets", "World", "Business", or "Sports".
# Examples
**Input**: "Apple Unveils New iPhone Model, Featuring Advanced AI Features"
**Output**: "Technology"
**Input**: "Global Stocks Mixed as Investors Await Central Bank Decisions"
**Output**: "Markets"
**Input**: "War in Ukraine: Latest Updates on Negotiation Status"
**Output**: "World"
**Input**: "Microsoft in Talks to Acquire Gaming Company for $2 Billion"
**Output**: "Business"
**Input**: "Manchester United Secures Win in Premier League Football Match"
**Output**: "Sports"
# Notes
- If the headline appears to fit into more than one category, choose the most dominant theme.
- Keywords or phrases such as "stocks", "company acquisition", "match", or technological brands can be good indicators for classification.
"
}
},
{
"type": "message",
"role": "user",
"content": {
"type": "input_text",
"text": "{{item.input}}"
}
}
]
},
"model": "gpt-4o-mini",
"sampling_params": {
"seed": 42,
"temperature": 1.0,
"top_p": 1.0,
"max_completions_tokens": 2048
}
},
"error": null,
"metadata": {}
}