# tEmbeddingAI

Available in...

* Cloud Data Fabric
* Data Fabric
* Qlik Talend Cloud Enterprise Edition
* Real-Time Big Data Platform

Leverages embedding models to efficiently process data with AI.

For a quick introduction on using this component in your Job, see the following video:

## tEmbeddingAI Standard properties

These properties are used to configure tEmbeddingAI running in the Standard Job framework.

The Standard tEmbeddingAI component belongs to the AI family.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit schema | A schema is a row description, and<br>it defines the fields to be processed and passed on to the next component.<br><br><ul> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul><br><br>Click Edit schema to make changes to<br>the schema. If you make changes, the schema automatically becomes built-in.<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> |
| Guess schema | Click this button to retrieve the schema according to your<br>settings. |
| Platform | Select the platform used to embed your input data.<br><br><ul> <li>If you are using <span>Amazon Bedrock</span>, only the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html" target="_blank">Amazon Titan Text Embedding v1 and                           v2</a> models are supported, and <a href="https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html" target="_blank">the default credentials provider                           chain</a> authentication method is used, which means the access to the                        AWS Service can be configured in a chain.</li> <li>If you are using <span>Google Vertex AI</span>, the <a href="https://cloud.google.com/docs/authentication/provide-credentials-adc" target="_blank">Application Default Credentials</a>                        authentication method is used, which means no additional parameters need to                        be defined as credentials are automatically found based on the application                        environment.</li> <li>If you are using <span>Hugging Face</span>, the server exception                           <span>"Model thenlper/gte-large is currently loading"</span> might                        occasionally happen and is due to the fact that the model used is a <a href="https://huggingface.co/docs/api-inference/supported-models" target="_blank">cold model</a>. The error will                        disappear at the next retry.</li> <li>If you are using <span>ONNX</span>, you may get out-of-memory                        errors as ONNX models are local and therefore memory-consuming. It is                        recommended to set the JVM parameters to 2GB minimum in <a href="https://help.qlik.com/talend/en-US/remote-engine-user-guide-windows/cloud/job-run-profile" target="_blank">the Job run profile</a>.</li> </ul> |
| Ali Bailian (DashScope) parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Token/API Key</span>: Click the                           <span>[...]</span> button next to the field to enter the access                        token to your Dashscope platform.</li> </ul><br><br>You can fill the API server URL in the Base URL<br>parameter of the Advanced settings. |
| Amazon Bedrock parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span> button next to the field to select the embedding model                        of your choice.</li> <li> <span>Region</span>: Click the <span>[...]</span>                        button next to the field to select one of the Amazon multi-regional                        locations you want to use. </li> </ul> |
| Azure OpenAI parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Token/API Key</span>: Click the                           <span>[...]</span> button next to the field to enter the access                        token to your Azure OpenAI platform.</li> <li> <span>Azure endpoint</span>: Enter the endpoint to access your                        Azure OpenAI service API. </li> </ul> |
| Cohere parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Token/API Key</span>: Click the                           <span>[...]</span> button next to the field to enter the access                        token to your Cohere platform.</li> </ul><br><br>You can fill the API server URL in the Base URL<br>parameter of the Advanced settings. |
| Google Vertex AI parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Location</span>: Enter one of the Google Cloud                        multi-regional locations you want to use. See <a href="https://cloud.google.com/vertex-ai/docs/general/locations" target="_blank">Vertex AI locations</a> for more                        information.</li> <li> <span>Google endpoint</span>: Enter the appropriate regional                        endpoint corresponding to your location. See <a href="https://cloud.google.com/vertex-ai/docs/general/locations" target="_blank">Vertex AI locations</a> for more                        information.</li> <li> <span>Google project ID</span>: Enter your Google Cloud project                        ID. See <a href="https://cloud.google.com/vertex-ai/docs/tutorials/tabular-bq-prediction/prerequisites#find-project-id" target="_blank">Find your Google Cloud project ID</a>                        for more information.<p>Example:                              <kbd>my-sample-project-370819</kbd> </p></li> </ul> |
| Hugging Face parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Token/API Key</span>: Click the                           <span>[...]</span> button next to the field to enter the access                        token to your Hugging Face platform.</li> </ul><br><br>You can fill the API server URL in the Base URL<br>parameter of the Advanced settings. |
| Mistral AI parameters | <ul> <li> <span>Model name</span>: Click the <span>[...]</span>                        button next to the field to select the embedding model of your choice.</li> <li> <span>Token/API Key</span>: Click the <span>[...]</span>                        button next to the field to enter the access token to your Mistral AI                        platform.</li> </ul><br><br>You can fill the API server URL in the Base URL<br>parameter of the Advanced settings. |
| ONNX parameters | Select the Use local ONNX file checkbox to use a local<br>tokenizer file. Specify the model and tokenizer paths, as well as the pooling<br>mode to apply. If unselected, the default embedded tokenizer file will be used.<br><br>See [Introduction to ONNX](https://onnx.ai/onnx/intro/index.html) for more information. |
| Column for embedding | Select or enter the schema column you want to apply the embedding model on. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at the Job level<br>as well as at each component level. |
| Base URL | Type in the base URL address of the API server you want to access.<br><br>This<br>option is available for the Ali Bailian, Cohere, Hugging Face, and Mistral AI<br>platforms. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |
| NB\_LINE | The number of rows processed. This is an After variable and<br>it returns an integer. |

## Usage

| Usage guidance | Description |
| --- | --- |
| Usage rule | This component can be used as a standalone component or as a start component of<br>a Job or subJob. |

**Related tasks**

* [Indexing phone reviews with embeddings and vector database](https://help.qlik.com/talend/en-US/components/8.0/ai/tembeddingai-tpineconeclient-tmap-indexing-phone-reviews-with-embeddings-and-vector-db "This Job reads phone review text files from a folder, splits the content into smaller chunks for better analysis, generates vector embeddings using Azure OpenAI, and stores them in a Pinecone vector database to enable semantic search.")