appends text and its follow-up to the ChatObject chat.


represents an operator form of ChatEvaluate that can be applied to a ChatObject.

Details and Options

  • ChatEvaluate is used to continue the conversation in a ChatObject.
  • The following options can be specified:
  • Authentication Inheritedexplicit user ID and API key
    MaxItems Infinitymaximum number of tokens to generate
    LLMEvaluator InheritedLLM configuration to use
  • If LLMEvaluator is set to Inherited, the LLM configuration specified when the chat was created is used, and no additional prompts are appended.
  • If LLMEvaluator is not set to Inherited, any prompts specified by the option may be added.
  • LLMEvaluator can be set to an LLMConfiguration object or an association with any of the following keys:
  • "Model"base model
    "Temperature"sampling temperature
    "TotalProbabilityCutoff"sampling probability cutoff (nucleus sampling)
    "PromptDelimiter"delimiter to use between prompts
    "StopTokens"tokens on which to stop generation
    "Tools"list of LLMTool objects to use
    "ToolPrompt"prompt for specifying tool format
    "ToolRequestParser"function for parsing tool requests
    "ToolResponseString"function for serializing tool responses
  • Valid forms of "Model" include:
  • namenamed model
    {service,name}named model from service
    <|"Service"service,"Name"name,"Task"task|>fully specified model
  • The generated text is sampled from a distribution. Details of the sampling can be specified using the following properties of the LLMEvaluator:
  • "Temperature"t1sample using a positive temperature t
    "TopProbabilityCutoff"p1sample among the most probable choices with an accumulated probability of at least p (nucleus sampling)
  • Multiple prompts are separated by the "PromptDelimiter" property of the LLMEvaluator.
  • Possible values for Authentication are:
  • Automaticchoose the authentication scheme automatically
    Inheritedinherit settings from chat
    Environmentcheck for a key in the environment variables
    SystemCredentialcheck for a key in the system keychain
    ServiceObject[]inherit the authentication from a service object
    assocprovide explicit key and user ID
  • With AuthenticationAutomatic, the function checks the variable "OPENAI_API_KEY" in Environment and SystemCredential; otherwise, it uses ServiceConnect["OpenAI"].
  • When using Authenticationassoc, assoc can contain the following keys:
  • "ID"user identity
    "APIKey"API key used to authenticate
  • ChatEvaluate uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.


open allclose all

Basic Examples  (1)

Create a new chat:

Add a message and a response to the conversation:

Options  (9)

Authentication  (4)

Provide an authentication key for the API:

Look for the key in the system keychain:

Look for the key in the system environment:

Authenticate via a service object:

MaxItems  (1)

By default, the text generation continues until a termination token is generated:

Limit the amount of generated samples (tokens):

LLMEvaluator  (4)

Specify that the sampling should be performed at zero temperature:

Specify a high temperature to get more variation in the generation:

Specify the maximum cumulative probability before cutting off the distribution:

Specify the service and the model to use for the generation:

Specify a prompt to be automatically inserted:

Wolfram Research (2023), ChatEvaluate, Wolfram Language function,


Wolfram Research (2023), ChatEvaluate, Wolfram Language function,


Wolfram Language. 2023. "ChatEvaluate." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2023). ChatEvaluate. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2023_chatevaluate, author="Wolfram Research", title="{ChatEvaluate}", year="2023", howpublished="\url{}", note=[Accessed: 02-December-2023 ]}


@online{reference.wolfram_2023_chatevaluate, organization={Wolfram Research}, title={ChatEvaluate}, year={2023}, url={}, note=[Accessed: 02-December-2023 ]}