indexers.dataclasses.VectorStoreEmbedOutput

indexers.dataclasses.VectorStoreEmbedOutput(data)

DataFrame-like object for storing and validating embedded vectors.

This class represents the output of embedding operations, containing the original text data, computed vector embeddings, and associated metadata.

Attributes

Name Type Description
id pd.Series Unique identifier for each embedded item.
text pd.Series The original text that was embedded.
embedding pd.Series The computed vector embedding (numpy array).

Methods

Name Description
from_data Create a validated VectorStoreEmbedOutput from a dictionary or DataFrame.
validate Validate an existing DataFrame and return a VectorStoreEmbedOutput.

from_data

indexers.dataclasses.VectorStoreEmbedOutput.from_data(data)

Create a validated VectorStoreEmbedOutput from a dictionary or DataFrame.

Creates a new instance of VectorStoreEmbedOutput by validating the input data against the defined schema.

Parameters

Name Type Description Default
data dict | pd.DataFrame A dictionary or pandas DataFrame containing the input data. Must include ‘id’, ‘text’, and ‘embedding’ columns/keys. required

Returns

Name Type Description
VectorStoreEmbedOutput VectorStoreEmbedOutput A validated instance of the class.

validate

indexers.dataclasses.VectorStoreEmbedOutput.validate(df)

Validate an existing DataFrame and return a VectorStoreEmbedOutput.

Validates the provided pandas DataFrame against the defined schema and returns a new instance of VectorStoreEmbedOutput if validation is successful.

Parameters

Name Type Description Default
df pd.DataFrame A pandas DataFrame to validate. Must include ‘id’, ‘text’, and ‘embedding’ columns. required

Returns

Name Type Description
VectorStoreEmbedOutput VectorStoreEmbedOutput A validated instance of the class.