weaviate/weaviate · error
inputs are not equal to vectors returned
Error message
inputs are not equal to vectors returned
What it means
In the multi-vector CLIP vectorizer, Texts() calls the remote inference client (VectorizeQuery) and expects the result to contain exactly one embedding per input text. If the number of returned TextVectors differs from the number of inputs, the request/response contract with the inference container is broken, so it refuses to combine vectors and returns this error. It guards against silent misalignment of inputs and embeddings.
Source
Thrown at usecases/modulecomponents/vectorizer/batchclip/batch_clip_vectorizer.go:115
vecs, err := v.objects(ctx, []*models.Object{obj}, cfg)
if err != nil {
return nil, nil, err
}
if len(vecs) != 1 {
return nil, nil, fmt.Errorf("more than one embedding found for object: %s", obj.ID)
}
return vecs[0], nil, err
}
func (v *BatchCLIPVectorizer[T]) Texts(ctx context.Context,
inputs []string, cfg moduletools.ClassConfig,
) (T, error) {
res, err := v.client.VectorizeQuery(ctx, inputs, cfg)
if err != nil {
return nil, fmt.Errorf("remote client vectorize: %w", err)
}
if len(inputs) != len(res.TextVectors) {
return nil, errors.New("inputs are not equal to vectors returned")
}
vector, err := v.combineVectors(res.TextVectors, nil)
if err != nil {
return nil, err
}
return vector, nil
}
func (v *BatchCLIPVectorizer[T]) VectorizeImage(ctx context.Context,
id, image string, cfg moduletools.ClassConfig,
) (T, error) {
res, err := v.client.VectorizeImages(ctx, []string{image}, cfg)
if err != nil {
return nil, err
}
if len(res.ImageVectors) != 1 {
return nil, errors.New("more than one embedding found for image")
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Check that the Weaviate inference container (semitechnologies/series or inference service) version matches the Weaviate version; upgrade both to compatible releases.
- Remove empty or blank strings from the input batch before vectorizing — some inference backends skip them, breaking the 1:1 mapping.
- Log len(inputs) and len(res.TextVectors) at the inference client boundary to identify whether inputs are dropped or duplicated.
- Retry the request; transient inference failures can produce partial responses.
- If operating as a module developer, make the inference client return an error instead of a short result so this mismatch cannot occur.
Example fix
// before
inputs := []string{text1, "", text3}
vector, err := vectorizer.Texts(ctx, inputs, cfg)
// after
nonEmpty := make([]string, 0, len(inputs))
for _, t := range inputs {
if strings.TrimSpace(t) != "" {
nonEmpty = append(nonEmpty, t)
}
}
vector, err := vectorizer.Texts(ctx, nonEmpty, cfg) Defensive patterns
Strategy: validation
Validate before calling
if len(inputs) == 0 || containsEmpty(inputs) {
return fmt.Errorf("refusing to vectorize: %d inputs, empty strings present", len(inputs))
} Type guard
func vectorsMatchInputs[T dto.Embedding](inputs []string, res *modulecomponents.VectorizationCLIPResult[T]) bool {
return res != nil && len(res.TextVectors) == len(inputs)
} Try / catch
vector, err := vectorizer.Texts(ctx, inputs, cfg)
if err != nil {
if strings.Contains(err.Error(), "inputs are not equal to vectors returned") {
return reconcileBatch(ctx, vectorizer, inputs, cfg) // split and vectorize individually
}
return fmt.Errorf("vectorize: %w", err)
} Prevention
- Pin inference container versions to the matching Weaviate release.
- Filter out empty/blank strings from batches before vectorizing.
- Add a pre-flight smoke test that vectorizes a small known batch at startup.
- Split large batches so partial inference failures are easier to isolate.
When it happens
Trigger: Calling Texts() (directly via nearText vectorization or batch imports using a multi-vector CLIP module like multi2vec-clip/multi2vec-bind) when the remote CLIP inference service returns a different count of text vectors than the number of input strings — e.g. inference drops empty strings, truncates the batch, or returns an empty result on a partial failure.
Common situations: Mismatched versions of Weaviate and the inference container (text2vec/multi2vec CLIP service upgraded independently); an inference backend that silently skips blank or invalid text inputs; a proxy/load balancer in front of inference mangling the batch response; overloaded inference returning partial batches.
Related errors
- more than one embedding found for image
- text vector not found for object: %s at index: %v
- image vector not found for object: %s at index: %v
- DigitalOcean response missing embedding for input index %d (
- more than one embedding found for object: %s
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/e5cbc16a6cd3763a.
Report an issue: GitHub.