Skip to main content

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
Get description from tf-idf cluster keywords
describe_clusters(ds.tfidf_clusters) -> (ds.description)

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").
tfidf
column[category]
required
TF-IDF keywords from the clusters to describe in natural language.
descriptions
column[category]
required

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

language
string
default:"Same as tf-idf keywords"
Language. Language you wish to use. Defaults to the TF-IDF keywords.
model
object
Model Configuration. Configuration for OpenAI’s model.
id
string
default:"gpt-4o-mini"
OpenAI model to choose.Values must be one of the following:
  • gpt-4o
  • gpt-4o-mini
temperature
number
default:"0.7"
Temperature. Higher means more creativity, but also makes the model more likely to hallucinate. Lower temperature yields more deterministic results.Values must be in the following range:
0temperature1
I