Classify text with an LLM
llm_fetch_textcat · Built-in action recipeGet text classification predictions from an OpenAI model, set up in a spacy-llm config, and save them to a dataset.
If you've connected Ellf to your coding assistant, it can set up the action for you: it knows the recipe's settings, can create the datasets and assets it needs and will ask you about anything it can't work out itself.
✳︎Claude Code: Setting up an action
› Set up an Ellf action using the Classify text with an LLM recipe (llm_fetch_textcat) and help me choose the right settings for my data.- In the app, go to ActionsNew action.
- Select the Classify text with an LLM recipe under Data.
- Fill in the form – you'll need to provide Output dataset, spaCy config file, Input data asset and OpenAI API key. Everything else has sensible defaults.
- Create the action. It starts on your cluster straight away.
API key needed
This recipe needs your OpenAI API key. Add it as a secret on your cluster and select it in the form.
Create the action with ellf actions create and the recipe name. All settings from the form are available as arguments. To view all recipe arguments, run ellf actions create llm_fetch_textcat --help.
| Argument | Type | Description | Default |
|---|---|---|---|
--name | str | Name of the action | None |
--output | str | Output dataset: Dataset to save the predictions to. | |
--config | str | spaCy config file: Remote path to a loadable spaCy config file. | |
--input | str | Input data asset: Upload data to your cluster and it will be available here. | |
--openai-key | str | OpenAI API key: Your OpenAI API key, stored as an Ellf secret. | |
--resume | bool | Resume: Skip examples already present in an earlier run's output. | False |
--project-id | str | Project ID to add action to. Defaults to your saved project. | None |
--worker-class | str | Worker class to launch the action on, as configured on your cluster | None |