# TextEmbedding

Represents custom features derived from text embeddings with TF-IDF analysis.

TextEmbedding extends VectorFeature to handle text-based embeddings with additional text-specific analysis capabilities. It combines vector clustering with TF-IDF analysis to provide both semantic clustering and keyword extraction for text data.

The feature type is automatically set to CustomFeatureType.FROM\_TEXT\_EMBEDDING and uses clustering combined with TF-IDF summarization for drift computation.

## Examples

```python
# Creating a text embedding feature for review analysis:

text_feature = TextEmbedding(
    name="review_sentiment_clusters",
    column="review_embedding",
    source_column="review_text",
    n_clusters=8,
    n_tags=20
)

# Creating a feature for document classification:

doc_feature = TextEmbedding(
    name="document_topic_clusters",
    column="doc_embedding",
    source_column="document_content",
    n_clusters=12,
    n_tags=15
)
```

## type *: Literal\['FROM\_TEXT\_EMBEDDING']*

## source\_column *: str*

## n\_tags *: int | None*

## tf\_idf *: Dict\[str, List] | None*

## *classmethod* validate\_n\_tags(value)

**Return type:** int


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/fiddler-python-client-sdk/schemas/text-embedding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
