OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Scikit LLM

Scikit LLM is a Python library that connects large language models with scikit-learn-style text-analysis workflows. Its README demonstrates GPT zero-shot classification through a fit-and-predict interface.

Independent OpenViST project profile, based on linked sources.

Scikit LLM — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Scikit LLM when you want to incorporate a GPT classifier into a Python text-analysis workflow using a scikit-learn-style interface.

Who it is for

  • Python developers using scikit-learn who want to add LLM-based text classification.
  • Practitioners exploring sentiment labels or other zero-shot categories on text datasets.

Documented uses

  • Classify text with a GPT zero-shot classifier.
  • Use a familiar fit-and-predict pattern for LLM-backed text analysis.
  • Generate sentiment predictions for text labeled positive, negative or neutral in the demonstration.
Before you choose

Requirements & limits

The project is identified as open source under the MIT license. The documented example requires an OpenAI key and organization ID.

  • The demonstrated classifier uses OpenAI credentials and names GPT-4 as its model.
  • The README provides a pip installation command and a Python example, rather than a hosted interface.
  • The repository identifies Python as its primary language and lists scikit-learn and OpenAI in the project ecosystem.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run zero-shot text classification with GPT

Use Scikit-LLM’s GPT classifier on its demo text-classification dataset.

Before you start

  • Python environment with Scikit-LLM installed (pip install scikit-llm).
  • OpenAI API key and organization ID.
  • The example uses the gpt-4 model.

Steps

  1. Install Scikit-LLM with the command below.

    Documented command
    pip install scikit-llm
  2. Import get_classification_dataset, SKLLMConfig, and ZeroShotGPTClassifier from the modules shown in the README.

  3. Set credentials with SKLLMConfig.set_openai_key("") and SKLLMConfig.set_openai_org("").

  4. Load the demo data with X, y = get_classification_dataset(), create ZeroShotGPTClassifier(model="gpt-4"), then call clf.fit(X, y) and clf.predict(X).

Expected outcome

The example invokes a GPT zero-shot classifier to predict labels for the demo text dataset, whose labels are positive, negative, and neutral.

Guide limitations

  • The example requires OpenAI credentials and selects gpt-4.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
10 October 2026
Original website title
fnnx-ai/scikit-llm · Official homepage title · retained in its source language