Overview
This node integrates with Oracle Cloud Infrastructure (OCI) Generative AI to generate text embeddings using OCI's embedding models. It is designed to convert input text into vector representations (embeddings), which are useful for tasks such as semantic search, recommendation systems, clustering, and natural language understanding.
Common scenarios where this node is beneficial include:
- Enhancing search functionality by comparing query embeddings with document embeddings.
- Building recommendation engines based on similarity of content.
- Performing clustering or classification of text data.
- Feeding embeddings into downstream machine learning models.
For example, a user might input product descriptions and obtain embeddings to find similar products or group them by semantic similarity.
Properties
| Name | Meaning |
|---|---|
| Service Endpoint | The OCI Generative AI inference service endpoint URL specific to your region. Example: https://inference.generativeai.region.oci.oraclecloud.com |
| Embedding Model Name or ID | Select an embedding model from the list fetched dynamically from OCI, or specify a model ID manually. Models support text embeddings capability. |
| Compartment ID | The OCI Compartment OCID where the selected embedding model is available. This identifies the compartment in your OCI tenancy. |
Output
The node outputs data under the json field containing the generated embeddings. The output structure corresponds to the embedding vectors produced by the OCI Generative AI model specified. The exact JSON schema depends on the model response but typically includes:
- An array of numerical values representing the embedding vector for the input text.
The node does not output binary data.
Dependencies
- Requires OCI SDK packages:
oci-commonandoci-generativeai. - Requires a valid OCI API authentication credential with access to the Generative AI service.
- The node expects the OCI private key to be provided in a specific format and handles formatting internally.
- The OCI region is inferred either from the service endpoint URL or from the credentials.
- The node dynamically fetches available embedding models from OCI using the provided credentials and compartment ID.
Troubleshooting
- Missing OCI SDK modules: If the required OCI SDK packages (
oci-common,oci-generativeai) are not installed, the node will throw an error instructing to install them via npm. - Invalid or improperly formatted private key: The node reformats the private key internally; if the key is invalid or incomplete, authentication will fail.
- Incorrect service endpoint URL or region mismatch: Ensure the service endpoint matches the region of your OCI resources; otherwise, the node may fail to connect.
- No embedding models found: If no models with embedding capabilities are found in the specified compartment, the node defaults to a recommended model "Cohere Embed v4.0".
- Permission issues: The OCI credentials must have permission to list models and perform inference in the specified compartment.
- Network connectivity: Ensure that the n8n instance can reach the OCI Generative AI service endpoint.
Links and References
- Oracle Cloud Infrastructure Generative AI Documentation
- OCI SDK for JavaScript
- n8n Expressions Documentation (for specifying dynamic model IDs)
This summary is based solely on static analysis of the provided source code and property definitions.