# EmbeddingResult


```
public final class EmbeddingResult
```

<br />

*** ** * ** ***

Result of an embedding request returned by `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingModel#generateEmbedding(com.google.mlkit.genai.embedding.EmbeddingRequest)`.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingResult#EmbeddingResult(com.google.mlkit.genai.embedding.EmbeddingVector,kotlin.String)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingVector embedding, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html modelSignature )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingVector` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingResult#getEmbedding()()` The generated `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingVector` corresponding to the input `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/Content`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingResult#getModelSignature()()` The signature of the model that generated this embedding (matching `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingModel#getModelSignature()`). |

## Public constructors

### EmbeddingResult

```
public EmbeddingResult(
    @NonNull EmbeddingVector embedding,
    @NonNull String modelSignature
)
```

## Public methods

### getEmbedding

```
public final @NonNull EmbeddingVector getEmbedding()
```

The generated `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingVector` corresponding to the input `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/Content`.

### getModelSignature

```
public final @NonNull String getModelSignature()
```

The signature of the model that generated this embedding (matching `https://developers.google.com/android/reference/com/google/mlkit/genai/embedding/EmbeddingModel#getModelSignature()`). Embeddings generated by models with different signatures are incompatible and should not be directly compared; persist this value alongside stored vectors to detect when re-indexing is required.