You are viewing documentation about an older version (1.7.0). View latest version

snowflake.cortex.ClassifyText

snowflake.cortex.ClassifyText(str_input: Union[str, Column], categories: Union[List[str], Column], session: Optional[Session] = None) Union[str, Column]

Use the LLM inference service to classify the INPUT text into one of the target CATEGORIES.

Parameters:
  • str_input – A Column of strings to classify.

  • categories – A list of candidate categories to classify the INPUT text into.

  • session – The snowpark session to use. Will be inferred by context if not specified.

Returns:

A column of classification responses.