Usage
The following example shows how the step can be used in a recipe.Examples
Examples
- Example 1
- Signature
Generate topics for a given text column
Inputs & Outputs
The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced
by name e.g. "churn-clf").
Inputs
Inputs
Column containing the texts to infer topics from.
Outputs
Outputs
Configuration
The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e.step(..., {"param": "value", ...}) -> (output).
Parameters
Parameters
Associated integration.
Number of Topics.
Maximum approximate number of topics to infer.Values must be in the following range:
Number of Subtopics.
Maximum approximate number of subtopics to infer per topic.Values must be in the following range:
Number of Samples.
Maximum number of text samples to use for topic extraction. More texts consume more tokens and increase cost.Values must be in the following range:
Multi-topic Assignment.
Whether to allow assigning multiple topics to each text. If enabled, the output columns will contain lists of
topics/subtopics instead of single values.
Inference AI Model.
AI model used to infer topic hierarchy. This model will receive all sample texts, so potentially
a large context, and needs to be reasonably capable to generate a well-structured topic hierarchy
(no repeated or similar topics etc.).Values must be one of the following:
openai/gpt-4.1 openai/gpt-4.1-mini openai/gpt-4.1-nano openai/gpt-5 openai/gpt-5-mini openai/gpt-5-nano openai/gpt-5.1 openai/gpt-5.2Assignment AI Model.
AI model used to assign topic and subtopics to each text (row). This model will receive individual texts
along with the inferred topic hierarchy, so it can be a smaller model focused on classification.Values must be one of the following:
openai/gpt-4.1 openai/gpt-4.1-mini openai/gpt-4.1-nano openai/gpt-5 openai/gpt-5-mini openai/gpt-5-nano openai/gpt-5.1 openai/gpt-5.2Inference Parameters.
Additional parameters passed to the responses API for the inference call.
Assignment Parameters.
Additional parameters passed to the responses API for the assignment call.