liveBook · Manning

Manual dataset building

As explained in Data Storytelling with Altair and AI

Manual dataset building is the deliberate creation of training examples by writing each prompt and desired completion individually.

Manual dataset building creates a fine-tuning set by writing every prompt–completion pair yourself. It offers close control over a model’s behavior for a given input, but requires substantial time because every example is curated individually. section 7.4.1

Teach a title pattern

A pair can ask for “a title for the general public about topic X” and answer “X revealed to you!” After fine-tuning, a relativity prompt may yield a similarly framed title. Build separate, specific datasets for audiences, scenarios, or output types such as titles, annotations, and commentary. section 7.4.1

Use a practical workflow:

  • Curate samples that cover all intended cases; at least 10 samples are required. section 7.4.1
  • Train the model, then give identical prompts to the original and fine-tuned models. section 7.4.1
  • Adopt the fine-tuned model only when its outputs improve on the original. section 7.4.1
Table 7.2 The samples based on the information to convey
Information to Convey
Prompt
Completion a
Parts of a whole
Percentage of participants in the conference by type (researchers 5%, students 30%, professors 65%)
More professors participated in the conference (65%). Researchers were not interested in the event (5%).
Comparison among entities
Comparison between red (80%), yellow, and green performance
Compared to yellow and green, red experienced an improvement in performance of 80%.
Trend
Sales changed in the last 12 months (–12%), due to fewer subscribers and video views.
Over the last 12 months, sales decreased by 12% based on various metrics, including subscribers and video views.
Outcomes of a survey or a questionnaire
Questionnaire: 3 positive answers, 7 negative answers
Three out of 10 people answered the questionnaire with a positive answer.
Distribution
Sales of product A (+30%) and product B over the last 12 months
Compared to product B, sales of product A have increased by 30% over the last 12 months.
Spatial information
Sales in North Europe (+23%) compared to South Europe
Compared to South Europe, sales in North Europe increased by 23%.
Relationship
The sales trend line from 1990 to 2020 increased by 120%.
Between 1990 and 2020, sales increased by 120%.
Comparison among entities
Top ingredients for our recipe: sugar and salt
The chosen ingredients for our recipe are sugar and salt.
Comparison among entities
Comparison between gold (30), silver (20), and bronze (40)
Bronze beats silver and gold with 40.
Distribution
Distribution of household chores (cooking 35%, cleaning 30%, laundry 20%, and yard work 15%)
Cooking takes up the most significant portion at 35%. Cleaning follows at 30%, while laundry and yard work account for 20% and 15%, respectively.
a. The word completion may be confusing, but it is used by the OpenAI API. Completion refers to the output produced by the model.

Sample pairs show how prompts about parts of a whole, comparisons, trends, surveys, and distributions can be matched with concise data commentary. section 7.4.1

How Data Storytelling with Altair and AI covers it

How deep it goes
Explains pair creation, minimum sample coverage, training, and comparison against an original model without detailing training internals.
Examples
Illustrates public-facing titles and tabular examples for trends, comparisons, distributions, surveys, and parts of a whole.
What you can do after
Build it from scratch by curating examples, training a model, and comparing its outputs with the original.
How it connects
Connects fine-tuning with prompt–completion pairs, model evaluation, data storytelling, and audience-specific generation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.