liveBook · Manning

Dataset

As explained in The Complete Obsolete Guide to Generative AI

A dataset is a structured collection of data used to analyze patterns or train a computational model.

A dataset is a structured collection of data used to find patterns or train a computational model. It can contain labeled examples, such as images paired with verified descriptions, or unlabeled material. For generative AI, very large and varied datasets supply real-world examples for training—because apparently the internet had to become homework first. section 1.8

Datasets also drive analysis. Before software can reliably answer questions about a large spreadsheet or transcript, its contents must be made machine-readable: the unglamorous but vital work called data wrangling. An LLM-based workflow can load documents, build an index, and answer targeted questions, such as which regions have the highest average household net wealth. section 8.1

A practical dataset workflow has a few moving parts:

  • Choose data suited to the question: a transcript for summarizing a call, a spreadsheet for business analysis, or reviews for sentiment analysis. section 8.1 section 8.4
  • Keep useful labels when they exist. Prelabeled reviews make it possible to compare model-generated sentiment with known sentiment values. section 8.4
  • Query or process the data with clear constraints, then inspect the results rather than treating a model response as magic confetti. section 8.1 section 8.4
  • Match training data to a specialized model’s domain. Legal or medical specialization calls for a dataset rich in legal or medical content, plus substantial hardware for fine-tuning. section 9.5 section 9.8

Checking sentiment labels

A CSV dataset of 1,000 X messages about companies includes each comment and a sentiment label. Python loads the file, sends every comment to GPT-3 and GPT-3.5 with a positive-or-negative prompt, and stores the predicted labels beside the existing ones. Counting the combinations exposes agreement, mistakes, ambiguous answers, and operational trouble such as rate-limit failures. A smaller sample may be necessary when the API refuses to play along. section 8.4

Company

Sentiment

Comment

Microsoft

Negative

@Microsoft Why do I pay for WORD when it functions so poorly on my @SamsungUS Chromebook?

MaddenNFL

Positive

Thank you @EAMaddenNFL!!

Inspect a small labeled-review table to see the kind of paired company, sentiment, and comment data used for automated sentiment testing. section 8.4

Creating a dataset for model fine-tuning is a separate, demanding job. It requires enough relevant content to train effectively and is paired with significant hardware needs; the detailed build process is deliberately left for another adventure. section 9.5 section 9.8

How The Complete Obsolete Guide to Generative AI covers it

How deep it goes
Moves from training-data context through machine-readable analytics and a coded CSV sentiment test, but defers fine-tuning dataset construction.
Examples
Uses a call transcript, a business spreadsheet, and 1,000 prelabeled X product-review messages.
What it assumes
Starts with CSV loading and prompt functions but assumes Python libraries and OpenAI API setup for automation.
What you can do after
Apply it via GPT APIs to query data and compare generated sentiment labels with existing labels.
How it connects
Connects datasets with generative AI, data wrangling, sentiment analysis, fine-tuning, and large language models.

Also explained in

Compare how 24 books explain dataset →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Complete Obsolete Guide to Generative AI. The section links point to the parts of the book it draws on.