liveBook · Manning

Sentiment analysis

As explained in Software Testing with Generative AI

Sentiment analysis is the computational classification or scoring of text according to expressed sentiment or evaluative polarity.

Sentiment analysis compares a model’s returned output with the expected output and produces a score indicating their alignment. In fine-tuning evaluation, it helps determine whether parameter changes support the intended context. section 12.2.5

Applied during inference testing, it:

  • Uses held-out or newly collected instruction-output data that follows the fine-tuning dataset’s structure. section 12.2.5
  • Sends instructions to the model, captures responses, and compares those responses with expected outputs. section 12.2.5
  • Leaves model parameters unchanged, unlike fine-tuning, and uses the score to guide possible future tuning. section 12.2.5

Scored evaluation with human review

A high sentiment score suggests that tuning met its goals. A low score signals a need to investigate the data or consider another fine-tuning session, while human validation checks outputs that mathematical scoring may misjudge. section 12.2.5

How Software Testing with Generative AI covers it

How deep it goes
Explains automated comparison and score interpretation, then stops short of replacing manual human validation.
Examples
Uses held-out or new instruction-output data and compares each returned response with its expected response.
What it assumes
Assumes instruction-output datasets and fine-tuning, while distinguishing inference evaluation from parameter-changing tuning.
What you can do after
Diagnose tuning quality via sentiment scores, then select future fine-tuning or human-review steps.
How it connects
Connects fine-tuning, inference, model parameters, expected outputs, and human validation.

Also explained in

Compare how 12 books explain sentiment analysis →

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.