# Embedding

Namespace: **Wisej.AI.Embeddings**

Assembly: **Wisej.AI** (3.5.0.0)

Represents an embedding which contains chunks of data, their associated vectors, and the model used for embedding.

{% tabs %}
{% tab title="C#" %}

```csharp
public class Embedding : ICloneable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class Embedding
    Inherits ICloneable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/ptrKjmmRoQB76pvrIqh0) Embedding(chunks, vectors, model)

Initializes a new instance of the [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) class with specified chunks, vectors, and model.

| Name        | Type                                                                  | Description                                                                   |
| ----------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **chunks**  | [String\[\]](https://docs.microsoft.com/dotnet/api/system.string)     | An array of strings representing the data chunks to be embedded.              |
| **vectors** | [Single\[\]\[\]](https://docs.microsoft.com/dotnet/api/system.single) | A jagged array of floats representing the vectors associated with the chunks. |
| **model**   | [String](https://docs.microsoft.com/dotnet/api/system.string)         | A string representing the model used for embedding.                           |

This constructor initializes the [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) class by setting the provided data chunks, their corresponding vectors, and the embedding model. The *chunks* parameter is used to input the raw data which will be embedded. The *vectors* parameter provides the associated vector representations for these chunks. The *model* specifies the model name used in the embedding process.\
Here is an example of how to create an instance of the [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) class:

```csharp

  string[] chunks = { "data1", "data2" };
  float[][] vectors = { new float[] { 1.0f, 2.0f }, new float[] { 3.0f, 4.0f } };
  string model = "exampleModel";
  Embedding embedding = new Embedding(chunks, vectors, model);

```

## Properties

### ![](/files/ptrKjmmRoQB76pvrIqh0) Chunks

[String\[\]](https://docs.microsoft.com/dotnet/api/system.string): Gets the chunks of data that were embedded.

### ![](/files/ptrKjmmRoQB76pvrIqh0) Model

[String](https://docs.microsoft.com/dotnet/api/system.string): Gets the model name used for embedding.

### ![](/files/ptrKjmmRoQB76pvrIqh0) Vectors

[Single\[\]\[\]](https://docs.microsoft.com/dotnet/api/system.single): Gets the vectors associated with the data chunks.

## Methods

### ![](/files/ptrKjmmRoQB76pvrIqh0) Add(embedding)

Adds the vectors and chunks from *embedding* .

| Parameter     | Type                                                                        | Description                                                                                                               |
| ------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **embedding** | [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) | The [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) instance providing the values to combine. |

**Returns:** [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md).

### ![](/files/ptrKjmmRoQB76pvrIqh0) Clone()

Creates a deep copy of the current [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) instance.

**Returns:** [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md). A new [Embedding](/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md) instance that is a deep copy of the current instance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/ai/components/api/embeddings/wisej.ai.embeddings.embedding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
