AI_GENERATE_TEXT (Beta)

Applies to: ✅ Data 360 SQL ❌ Tableau Hyper API

AI_GENERATE_TEXT is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer’s sole discretion.

Calls the Nemotron 3 Nano 30B (Beta) large language model (LLM) in a Data 360 SQL query to generate or summarize text. The function returns generated text for each row of data. To get started with this function in beta, turn on Beta Generative AI Models. To find this beta feature: under Platform Tools in Setup, go to Einstein, then to Einstein Generative AI, and then to Einstein Setup.

  • input_prompt: The text prompt sent to the model. This can be a column, a literal, or an expression that composes a prompt from other columns (for example, by using the string concatenation operator).

Returns generated text for each row according to the input prompt. A language model generates the output, so the same prompt can produce different text on different runs.

  • This is a beta function, and its output behavior may change during the beta period.
  • When you turn on Beta Generative AI Models, the underlying model (NVIDIA Nemotron 3 Nano 30B on Amazon (Beta)) is enabled by default. If the model isn’t available, queries that call this function fail with a “model not available” error. To verify that the model is available, open the App Launcher, select AI Models, choose Library (Generative), and confirm that NVIDIA Nemotron 3 Nano 30B on Amazon (Beta) appears under Model Name. For the models that support generative AI features, see Supported Models for Generative AI Features.
  • Requests to the function time out after 30 seconds. To stay within the timeout, reduce the amount of data the query processes. For example, use ORDER BY with LIMIT to cap the number of rows sent to the model.
  • input_prompt must be a non-NULL value. Add NON_NULL to the WHERE clause in your SQL statement to avoid NULL value errors.

Generate text from a single prompt.

Returns the generated text for the prompt.

Generate a short summary of customer feedback for each row in a table.

This example builds the prompt for each row with the string concatenation operator (||). The operator joins the fixed instruction text, 'Summarize this customer feedback in one sentence: ', to the value in the customerServiceFeedback__c column, so each row sends its own feedback text to the model as part of the prompt.

Returns a one-sentence summary of the feedback for each row.

Compose a prompt from identity, purchase, and service fields on a unified profile to generate a short brief for sales or service users.

This example uses the string concatenation operator (||) to build a prompt from several profile fields, so the model generates a personalized brief for each customer. ORDER BY with LIMIT keeps the query within the 30-second timeout by capping how many rows are sent to the model.