AI/ML Embeddings
AI/ML Embeddings lets you convert text into numerical vectors (embeddings) that can be used for search, clustering, or as inputs to other AI models. It uses the AI/ML API to generate these vectors based on the model you choose.
How it Works
When you run the component, it sends your text to the AI/ML API using the model you selected from the dropdown. The API processes the text and returns a set of numbers that represent the meaning of the text. These numbers are the embeddings that the component outputs. No data is stored locally; everything happens through the API call.
Inputs
-
Model Name: Choose the embedding model you want to use from the list of available AI/ML models. This determines how the text will be processed and the quality of the embeddings.
The component also requires a credential. Before using the component, add an AI/ML API credential in Nappai’s credentials section and then select that credential in the component’s Credential field.
Outputs
- Embeddings: A list of numerical vectors that represent the input text. These can be passed to other components such as similarity search, clustering, or downstream AI models.
Usage Example
- Add the component to your workflow.
- Configure the credential:
- Go to Credentials → Add Credential → choose AI/ML API.
- Enter your API key (you can get one from https://docs.aimlapi.com/).
- Save the credential.
- Select the credential in the component’s Credential field.
- Choose a model from the Model Name dropdown.
- Connect the text input (e.g., from a Text Input component) to the component.
- Run the workflow. The component will output the embeddings, which you can then feed into a similarity search or any other downstream component.
Related Components
- Text Embeddings – Generates embeddings using popular open‑source models.
- Custom Embeddings – Allows you to upload your own embedding model.
- Similarity Search – Finds the most similar items based on embeddings.
Tips and Best Practices
- Pick a model that balances speed and accuracy for your use case.
- Test with a small batch of text first to confirm the embeddings look reasonable.
- Keep your API key secure; never expose it in public workflows.
Security Considerations
The API key is stored securely in Nappai’s credential store. Only the component that needs the key can access it, and the key is never exposed in the workflow or logs. Always use the credential system rather than hard‑coding keys.