Represents custom features derived from text embeddings.
Input Parameter | Type | Default | Description |
---|---|---|---|
source_column | str | Required | Specifies the column name where text data (e.g. LLM prompts) is stored |
column | str | Required | Specifies the column name where the embeddings corresponding to source_col are stored |
n_tags | Optional[int] | 5 | How many tags(tokens) the text embedding are used in each cluster as the tfidf summarization in drift computation. |
n_clusters | Optional[int] | 5 | The number of clusters. |
centroids | Optional[List] | Centroids of the clusters in the embedded space. Number of centroids equal to n_clusters | Centroids 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
)