# VectorChunk

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.vectorchunk/
> Summary: VectorChunk: A single chunk to write.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

A single chunk to write.

```csharp
public sealed record VectorChunk : IEquatable<VectorChunk>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.vectorchunk/">VectorChunk</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;VectorChunk&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_VectorChunk__ctor"></a> VectorChunk\(\)

```csharp
public VectorChunk()
```

## Properties

### <a id="Tracon_VectorChunk_Content"></a> Content

The chunk's text.

```csharp
public required string Content { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_VectorChunk_Embedding"></a> Embedding

The chunk's embedding. Its length MUST match
[IVectorSearchStore.Dimensions](/api/tracon.ivectorsearchstore/#Tracon_IVectorSearchStore_Dimensions); otherwise the write fails.

```csharp
public required ReadOnlyMemory<float> Embedding { get; init; }
```

#### Property Value

 [ReadOnlyMemory](https://learn.microsoft.com/dotnet/api/system.readonlymemory\-1)<[float](https://learn.microsoft.com/dotnet/api/system.single)\>

### <a id="Tracon_VectorChunk_Index"></a> Index

The sequence number within the source (0-based).

```csharp
public required int Index { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_VectorChunk_Metadata"></a> Metadata

Optional metadata. Can be used for filtering.

```csharp
public IReadOnlyDictionary<string, string>? Metadata { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

## Methods

### <a id="Tracon_VectorChunk_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VectorChunk_Equals_Tracon_VectorChunk_"></a> Equals\(VectorChunk?\)

```csharp
public bool Equals(VectorChunk? other)
```

#### Parameters

`other` [VectorChunk](/api/tracon.vectorchunk/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VectorChunk_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_VectorChunk_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_VectorChunk_op_Equality_Tracon_VectorChunk_Tracon_VectorChunk_"></a> operator ==\(VectorChunk?, VectorChunk?\)

```csharp
public static bool operator ==(VectorChunk? left, VectorChunk? right)
```

#### Parameters

`left` [VectorChunk](/api/tracon.vectorchunk/)?

`right` [VectorChunk](/api/tracon.vectorchunk/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_VectorChunk_op_Inequality_Tracon_VectorChunk_Tracon_VectorChunk_"></a> operator \!=\(VectorChunk?, VectorChunk?\)

```csharp
public static bool operator !=(VectorChunk? left, VectorChunk? right)
```

#### Parameters

`left` [VectorChunk](/api/tracon.vectorchunk/)?

`right` [VectorChunk](/api/tracon.vectorchunk/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
