liveBook · Manning

Sentiment score

As explained in Software Testing with Generative AI

A sentiment score in fine-tuning is a measure of how closely a model response aligns with the expected output.

A sentiment score measures how closely a model’s response aligns with the expected output during instruction-based fine-tuning. The score guides parameter updates: desirable responses prompt minimal changes, while undesirable responses prompt larger adjustments. section 12.2.2

The fine-tuning loop applies the score through these steps:

  • Combine instruction and input fields into a prompt. section 12.2.2
  • Send the prompt to the model and compare its response with the stored output. section 12.2.2
  • Use the resulting score to adjust model parameters across dataset entries and repeated epochs. section 12.2.2
Figure 12.2 A visualization of what happens during fine-tuning

A process visualization clarifies where response comparison and sentiment scoring occur within the fine-tuning loop. section 12.2.2

How Software Testing with Generative AI covers it

How deep it goes
Defines the comparison and adjustment loop, but does not specify a scoring formula or implementation.
Examples
Uses instruction, input, and output records as the comparison data.
What it assumes
Assumes a structured instruction-input-output dataset and prompt design, while explaining the scoring loop before tuning.
What you can do after
Evaluate fine-tuning responses and adjust model parameters more or less strongly according to alignment.
How it connects
Connects instruction-based fine-tuning with prompts, datasets, model parameters, responses, outputs, and epochs.

Also explained in

Compare how 3 books explain sentiment score →

Related concepts

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