fdl.TextEmbedding

Represents custom features derived from text embeddings.

Input ParameterTypeDefaultDescription
typeCustomFeatureTypeCustomFeatureType.FROM_TEXT_EMBEDDINGIndicates this feature is derived from a text embedding.
source_columnstrRequiredSpecifies the column name where text data (e.g. LLM prompts) is stored
columnstrRequiredSpecifies the column name where the embeddings corresponding to source_col are stored
n_tagsOptional[int]5How many tags(tokens) the text embedding are used in each cluster as the tfidf summarization in drift computation.
n_clustersOptional[int]5The number of clusters.
centroidsOptional[List]Centroids of the clusters in the embedded space. Number of centroids equal to n_clustersCentroids of the clusters in the embedded space. Number of centroids equal to n_clusters
text_embedding_feature = TextEmbedding(
    name='text_custom_feature',
    source_column='text_column',
    column='text_embedding',
    n_tags=10
)