This feature is currently in private beta. Please reach out to us on Slack if
you’re interested in trying it out
Overview
AI Transforms can be used to augment data models using large language models in either the cloud or locally. AnLLMTransform
handles token management, column metadata context and more that is provided via Vinyl internals.
Lets take some user reviews of movies from the IMDB dataset. Suppose we want to tag each review with sentiment analysis using the latest LLM models available.
id | movie_title | comment_id | comment |
---|---|---|---|
1 | A Quiet Place | 101 | An intense experience with a few plot holes. |
2 | The Room | 102 | So bad its almost good. A cult classic for all the wrong reasons. |
3 | Lost in Translation | 103 | Subtly powerful and emotionally complex. |
4 | Requiem for a Dream | 104 | Disturbing content that leaves a lasting impression. |
LLMTransform
and OpenAIProvider
from Vinyl to run an LLM-powered transform on a specific column of our dataset.
models.py
OpenAIProvider
allows you to bring your own OpenAI API key.
We can preview the results of this using:
id | movie_title | comment_id | comment | sentiment |
---|---|---|---|---|
1 | A Quiet Place | 101 | An intense experience with a few plot holes. | Neutral |
2 | The Room | 102 | So bad its almost good. A cult classic for all the wrong reasons. | Negative |
3 | Lost in Translation | 103 | Subtly powerful and emotionally complex. | Positive |
4 | Requiem for a Dream | 104 | Disturbing content that leaves a lasting impression. | Negative |