Translate
With Select AI, you can use generative AI from supported translation providers to translate your text into the language of your choice. This feature supports OCI, Google, AWS, and Azure as providers.
You can use this feature alongside the existing Select AI RAG. You can
combine translate with DBMS_CLOUD_AI.GENERATE or narrate to use
generative AI for producing translated outputs in your preferred language.
See TRANSLATE Function, GENERATE Function, and Example: Select AI Translate to learn more.
Topics
- Benefits of Translate
The translate feature in Select AI enables you to translate input text in different languages. - How Do I Use Translate
Select AI enables you to translate your text input into your preferred language by using thetranslateaction or by calling theDBMS_CLOUD_AI.GENERATEor theDBMS_CLOUD_AI.TRANSLATEfunctions.
Parent topic: Select AI Features
Benefits of Translate
The translate feature in Select AI enables you to translate input text in different languages.
- Translate improves usability by converting text into your preferred language, enabling you to work with the database more effectively.
- Translate lets you convert documents in one language into a language that may be better suited for your selected embedding model, producing better vectors for use with RAG.
- Automatically translate output into your preferred language when
using
DBMS_CLOUD_AI.GENERATEorNARRATE.
Parent topic: Translate
How Do I Use Translate
Select AI enables
you to translate your text input into your preferred language by using the
translate action or by calling the DBMS_CLOUD_AI.GENERATE or the
DBMS_CLOUD_AI.TRANSLATE functions.
To use the Select AI translation feature, you must configure authentication and permissions based on the AI provider defined in the AI profile. Select AI Translate supports multiple providers, including OCI, Google, AWS, and Azure.
Authentication and authorization are handled differently depending on the provider:
-
OCI provider uses OCI IAM policies.
-
External providers (Google, AWS, Azure) use provider-specific credentials and IAM configurations, which are stored in the database using
DBMS_CLOUD.CREATE_CREDENTIAL. These credentials are referenced by name in AI profiles and are used by the database to authenticate API requests to external services. The credential must be associated with a provider account that has the translation service enabled and accessible (for example, Cloud Translation API in Google, Amazon Translate in AWS, or Azure AI Translator in Azure). See Prerequisites for Select AI for setting up your AI profile and provider documentation for configuring the policies.
OCI
To use the Select AI translation feature, you must have the appropriate IAM policy permissions to access Oracle Cloud Infrastructure Language services.
Grant the permission to use ai-service-language-family
resource in your IAM policy. An example policy statement to grant permission to a
user group in a specific compartment is:
allow group <your group name> to use ai-service-language-family in compartment <your_compartment>
-
If using Resource Principal credential, assign the permission to the Dynamic Group.
-
If using Private Key credential, assign the permission to the User Group.
A Dynamic Group identifies resources such as databases or functions by matching their OCIDs or tags, while a User Group contains individual IAM users.
Use a dynamic group when the policy applies to OCI resources, and use a user group when the policy applies to human users. For detailed steps to create dynamic and user groups, see Managing Dymanic Groups.
See Language Policies for more information.
Google Cloud
For Google Cloud, configure Identity and Access Management (IAM) roles that grant access to the Cloud Translation API. See Identity and Access Management documentation for more details.
-
Assign predefined roles or custom roles that include permissions such as (required for translation requests):
cloudtranslate.generalModels.predict -
Attach the role to a service account used by the AI profile with credentials.
-
The database uses these credentials to call Google APIs directly.
Google Cloud IAM provides centralized access control for managing permissions across services.
AWS
For AWS, configure IAM identity-based policies that grant access to Amazon Translate. See How Amazon Translate works with IAM for more details.
-
Create or attach a policy that includes actions such as:
translate:TranslateText translate:ListLanguages -
Assign the policy to an IAM user or role to an account used by the AI profile with credentials.
-
The database uses these credentials to call Amazon Translate APIs directly.
AWS IAM uses JSON-based policies to control access to services and resources, following the principle of least privilege.
Azure
For Azure, configure role-based access control (RBAC) using Microsoft Entra ID to grant access to translation services. See Compare AWS and Azure identity management solutions and Azure Translator documentation for more details.
-
Assign appropriate roles (for example, Cognitive Services roles) to users or service principals. Be sure that the assigned role grants access to the Azure Translator service that permit translation operations.
-
Ensure the service principal used by the AI profile with credentials has access to the required translation resource.
-
The database uses these credentials to call Azure AI services directly.
Azure uses role-based access control integrated with Microsoft Entra ID to manage permissions and access to services.
Use a dynamic group when the policy applies to resources, and use a user group when the policy applies to users.
Each provider implements IAM differently. Ensure that permissions follow provider-specific best practices and grant only the minimum required access.
Translation Methods
You can translate text using the following:
-
Use
translateas a Select AI action. Useselect ai translate <text>. See Example: Select AI Actions. -
Provide
translateas an action within theDBMS_CLOUD_AI.GENERATEfunction. See GENERATE Function. -
Use the
DBMS_CLOUD_AI.TRANSLATEfunction. See TRANSLATE Function. -
See also Example: Select AI Translate to learn more.
Parent topic: Translate