Skip to content

Describe clusters

aiopenaichatgptgptclusters

Describe your clusters from their given relevant TF-IDF terms using OpenAI.

Usage


The following are the step's expected inputs and outputs and their specific types.

Step signature
describe_clusters(tfidf: category, {
    "param": value
}) -> (descriptions: category)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Example

Get description from tf-idf cluster keywords

Example call (in recipe editor)
describe_clusters(ds.tfidf_clusters) -> (ds.description)

Inputs


tfidf: column:category

TF-IDF keywords from the clusters to describe in natural language.

Outputs


descriptions: column:category

Parameters


language: string = "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.

Items in model

id: string = "gpt-3.5-turbo-1106"

OpenAI model to choose.

Must be one of: "gpt-3.5-turbo-1106", "gpt-3.5-turbo", "gpt-4", "gpt-4-32k", "gpt-4-0125-preview", "gpt-4-1106-preview"


temperature: number = 0.7

Temperature. Higher means more creativity, but also makes the model more likely to hallucinate. Lower temperature yields more deterministic results.

Range: 0 ≤ temperature ≤ 1