Weaviate Embeddings
Overview
Weaviate Embeddings provides secure, scalable embedding generation as a fully managed service.
Weaviate Embeddings integrates with Weaviate Cloud instances to generate, store, and search embeddings without managing infrastructure.
With Weaviate Embeddings, you can generate embeddings for your data and queries directly from a Weaviate Cloud database instance.
This means you can perform semantic, vector and hybrid searches without the need to externally generate vector embeddings, or manage additional model providers.
Weaviate Embeddings is fully integrated with Weaviate Cloud, so you can manage your data and embeddings in one place.
Weaviate Embeddings is in technical preview. This means that the service is still in development and may have limited functionality.
During the technical preview, you can use Weaviate Embeddings for free. However, the service may be subject to change.
To try out Weaviate Embeddings, please contact us to request access.
Key Features
Weaviate Embeddings offers a fully managed service for embedding generation that is integrated with Weaviate Cloud instances.
- Single authentication: Your Weaviate Cloud credentials are used for authorization and access to Weaviate Embeddings.
- Unified billing: Your billing and usage can be managed in one place through Weaviate Cloud.
- Model selection: Choose from our hand-picked selection of embedding models to generate embeddings that suit your use case.
Availability
Weaviate Embeddings is a part of Weaviate Cloud, and available for Weaviate Cloud instances. It is currently not available for open-source Weaviate users.
Service Details
Models
The following models are available for use with Weaviate Embeddings:
arctic-embed-m-v1.5
(default)- A 109M parameter, 768-dimensional model for enterprise retrieval tasks in English.
- Trained with Matryoshka Representation Learning to allow vector truncation with minimal loss.
- Quantization-friendly: Using scalar quantization and 256 dimensions provides 99% of unquantized, full-precision performance.
- Read more at the Snowflake blog, and the Hugging Face model card
- Allowable
dimensions
: 768 (default), 256
Additional models will be added in the future.
Currently, input exceeding the model's context windows is truncated from the right (i.e. the end of the input).
Parameters
model
(optional): The name of the model to use for embedding generation.dimensions
(optional): The number of dimensions to use for the generated embeddings. Only available for models that support Matryoshka Representation Learning.base_url
(optional): The base URL for the Weaviate Embeddings service. (Not required in most cases.)
Rate Limits
Weaviate Embeddings does not impose rate limits on requests.
Pricing and Billing
During the technical preview, Weaviate Embeddings is free to use.
Pricing and billing details will be provided in the future.
Data Privacy
Weaviate Embeddings is a stateless service that does not store any data.
The data provided to Weaviate Embeddings is used solely for the purpose of generating embeddings.
We do not store or use your data for any other purpose, including training or model improvement.
Service and Data Location
Weaviate Embeddings makes use of infrastructure located in the United States. Note that by using Weaviate Embeddings, you are agreeing to have your data transferred to the United States for processing.
We may expand the service to other regions in the future.
Administration
Weaviate Embeddings can be enabled from the Weaviate Cloud console, at the organization level.
Once enabled, all clusters within the organization can access Weaviate Embeddings.
Authentication is managed through your existing Weaviate Cloud API key.
Get Started
Prerequisites
To use Weaviate Embeddings, you need a Weaviate Cloud account, and a Weaviate Cloud Serverless instance. If you do not have an account, you can sign up for free at the Weaviate Cloud console.
To use Weaviate Embeddings, you need:
- A Weaviate Cloud instance running at least Weaviate
1.27.6
- A Weaviate client library that supports Weaviate Embeddings:
- Python client version
4.9.5
or higher - JavaScript/TypeScript client version
3.2.5
or higher - Go/Java clients are not yet officially supported; you must pass the
X-Weaviate-Api-Key
andX-Weaviate-Cluster-Url
headers manually upon instantiation as shown below.
- Python client version
Usage
To use Weaviate Embeddings, log into the Weaviate Cloud console, and enable the Weaviate Embeddings service for your organization.
Once the service is enabled, you can use Weaviate Embeddings to generate embeddings for your data and queries.
Connect to Weaviate
Your Weaviate Cloud credentials will be used to authorize your Weaviate Cloud instance's access for Weaviate Embeddings.
- Python API v4
- JS/TS API v3
- Go
- Java
import weaviate
from weaviate.classes.init import Auth
import os
client = weaviate.connect_to_weaviate_cloud(
cluster_url=weaviate_url, # `weaviate_url`: your Weaviate URL
auth_credentials=Auth.api_key(weaviate_key), # `weaviate_key`: your Weaviate API key
)
# Work with Weaviate
client.close()
import weaviate from 'weaviate-client'
const client = await weaviate.connectToWeaviateCloud(
'WEAVIATE_INSTANCE_URL', // Replace with your instance URL
{
authCredentials: new weaviate.ApiKey('WEAVIATE_INSTANCE_APIKEY'),
}
)
// Work with Weaviate
client.close()
// Set these environment variables
// WCD_HOSTNAME your Weaviate instance hostname
// WCD_API_KEY your Weaviate instance API key
package main
import (
"context"
"fmt"
"os"
"github.com/weaviate/weaviate-go-client/v4/weaviate"
"github.com/weaviate/weaviate-go-client/v4/weaviate/auth"
)
func main() {
cfg := weaviate.Config{
Host: os.Getenv("WCD_W_EMB_HOSTNAME"),
Scheme: "https",
AuthConfig: auth.ApiKey{Value: os.Getenv("WCD_W_EMB_API_KEY")},
Headers: map[string]string{
"X-Weaviate-Api-Key": os.Getenv("WCD_W_EMB_API_KEY"),
"X-Weaviate-Cluster-Url": fmt.Sprintf("https://%s", os.Getenv("WCD_W_EMB_HOSTNAME")),
},
}
client, err := weaviate.NewClient(cfg)
if err != nil {
fmt.Println(err)
}
// Work with Weaviate
}
import io.weaviate.client.Config;
import io.weaviate.client.WeaviateAuthClient;
import io.weaviate.client.WeaviateClient;
import io.weaviate.client.base.Result;
import static org.assertj.core.api.Assertions.assertThat;
// Set these environment variables
// WCD_HOSTNAME Your Weaviate instance hostname
// WCD_API_KEY Your Weaviate instance API key
public class ConnectWeaviateEmbeddings {
public static void main(String[] args) throws Exception {
String host = System.getenv("WCD_W_EMB_HOSTNAME");
String apiKey = System.getenv("WCD_W_EMB_API_KEY");
Map<String, String> headers = new HashMap<String, String>() { {
put("X-Weaviate-Api-Key", apiKey);
put("X-Weaviate-Cluster-Url", "https://" + System.getenv("WCD_W_EMB_HOSTNAME"));
} };
Config config = new Config("https", host, headers);
WeaviateClient client = WeaviateAuthClient.apiKey(config, apiKey);
// check the result
Result<Boolean> result = client.misc().readyChecker().run();
System.out.println(result.getResult());
}
}
Configure the vectorizer
Configure a Weaviate index as follows to use a Weaviate Embeddings model:
- Python API v4
- JS/TS API v3
- Go
- Java
from weaviate.classes.config import Configure
client.collections.create(
"DemoCollection",
vectorizer_config=[
Configure.NamedVectors.text2vec_weaviate(
name="title_vector",
source_properties=["title"]
)
],
# Additional parameters not shown
)
await client.collections.create({
name: 'DemoCollection',
properties: [
{
name: 'title',
dataType: 'text' as const,
},
],
vectorizers: [
weaviate.configure.vectorizer.text2VecWeaviate({
name: 'title_vector',
sourceProperties: ['title'],
},
),
],
// Additional parameters not shown
});
// package, imports not shown
func main() {
// Instantiation not shown
ctx := context.Background()
// Define the collection
basicWeaviateVectorizerDef := &models.Class{
Class: "DemoCollection",
VectorConfig: map[string]models.VectorConfig{
"title_vector": {
Vectorizer: map[string]interface{}{
"text2vec-weaviate": map[string]interface{}{},
},
},
},
}
// add the collection
err = client.Schema().ClassCreator().WithClass(basicWeaviateVectorizerDef).Do(ctx)
if err != nil {
panic(err)
}
}
Map<String, Object> text2vecWeaviate = new HashMap<>();
Map<String, Object> text2vecWeaviateSettings = new HashMap<>();
text2vecWeaviateSettings.put("properties", new String[]{"title"});
text2vecWeaviate.put("text2vec-weaviate", text2vecWeaviateSettings);
// Define the vector configurations
Map<String, WeaviateClass.VectorConfig> vectorConfig = new HashMap<>();
vectorConfig.put("title_vector", WeaviateClass.VectorConfig.builder()
.vectorIndexType("hnsw")
.vectorizer(text2vecWeaviate)
.build());
// Create the collection "DemoCollection"
WeaviateClass clazz = WeaviateClass.builder()
.className("DemoCollection")
.vectorConfig(vectorConfig)
.build();
Result<Boolean> result = client.schema().classCreator().withClass(clazz).run();
Once your collection is configured, you can start using Weaviate Embeddings to generate embeddings for your data and queries.
Refer to the Model Provider Integrations page for further examples, on: