Vectors¶
Vector fields in Argilla are used to define the vector form of a record that will be reviewed by a user.
Usage Examples¶
To define a vector field, instantiate the VectorField
class with a name and dimenstions, then pass it to the vectors
parameter of the Settings
class.
settings = rg.Settings(
fields=[
rg.TextField(name="text"),
],
vectors=[
rg.VectorField(
name="my_vector",
dimension=768,
title="Document Embedding",
),
],
)
To add records with vectors, refer to the
rg.Vector
class documentation.
Class Reference¶
rg.VectorField
¶
Bases: SettingsPropertyBase
Vector field for use in Argilla Dataset
Settings
Source code in src/argilla_sdk/settings/_field.py
__init__(name, dimensions, title=None)
¶
Vector field for use in Argilla Dataset
Settings
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the field |
required |
dimensions |
int
|
The number of dimensions in the vector |
required |
title |
Optional[str]
|
The title of the field. Defaults to None. |
None
|