Sitemap

Member-only story

ChatGPT lands on Scikit-learn

7 min readJun 4, 2023

The power of ChatGPT and the ease of Scikit-learn

Artifically Generate with crayon.com

Introduction

I recently came across a new and fast-growing open-source project and I had to give it a try!

The project at hand is Scikit-LLM:

Seamlessly integrate powerful language models like ChatGPT into scikit-learn for enhanced text analysis tasks.

Here is the tagline from the project GitHub repository. Indeed, their goal is quite clear: they provides a handful interface to Large Language Models (e.g. ChatGPT) in a pure Scikit-learn style (i.e. with the iconic .fit() and .predict() methods that many people encountered moving the first steps in the Machine Learning world).

Therefore, in this article we’ll try two of the main functionalities provided: the ZeroShotGPTClassifier and the GPTVectorizer. We’ll test the workflow and also the capabilities of ChatGPT.

Open a Python notebook and follow along! You can find the code on this repository:

Installation

Nicola Corbellini
Nicola Corbellini

Written by Nicola Corbellini

I'm a PhD student in Computer Science and Machine Learning enthusiast believing AI could have a positive impact for human behavior understanding and social good

No responses yet

Write a response