liveBook · Manning

Fine-tuning

As explained in Microsoft Azure in Action

Fine-tuning is the process of further training a pretrained model on task-specific data to adapt its behavior or vocabulary.

A general-purpose model may understand a customer review yet miss the vocabulary of a specialist bookshop. Fine-tuning trains a chosen base model on labeled examples so its recommendations better reflect that vocabulary. Try it when an off-the-shelf model falls short—not simply because a bigger model is available. Compare quality and fairness alongside cost and latency before deciding whether to fine-tune or switch models. section 7.4.3

In Azure AI Foundry, the workflow is:

  • Prepare a JSON Lines (JSONL) file with one input–output pair per line, such as a review and the recommendation it should produce. section 7.4.4
  • Open Fine-Tuning in an accessible AI Foundry workspace, start the wizard, and choose a base GPT model. Select the JSONL file from linked Blob Storage or upload it from your workstation. section 7.4.4
  • Review the settings and submit the job. Inspect its status and recorded training details; when satisfied with the result, deploy the model as an endpoint for application requests. section 7.4.4
Listing 7.1 Example JSONL file for Banning Books
{"input": "I loved the intricate world-building and moral dilemmas in 'The
Handmaid's Tale'. Margaret Atwood's prose keeps me hooked.", "output": 
"Recommend 'Never Let Me Go' by Kazuo Ishiguro—another speculative novel 
with deep ethical questions and beautiful writing."}
{"input": "The coding examples in 'Learning Python' were clear, but I wish 
there were more real-world projects.", "output": "Suggest 'Fluent Python' 
by Luciano Ramalho—it offers advanced, hands-on Python projects to level up 
your skills."}
{"input": "This hacker thriller had me on the edge of my seat, but the tech 
jargon was a bit dense for a newcomer.", "output": "Recommend 'Zero Days' 
by Kim Zetter—a gripping cybersecurity exposé that's more accessible for 
readers new to hacking topics."}
{"input": "I appreciated the historical context in 'The Code Book', but the 
math sections were challenging.", "output": "Suggest 'The Golden Ticket' by 
Lance Fortnow—a computer science history that focuses on stories rather 
than heavy mathematics."}
{"input": "The practical examples in 'Azure in Action' helped me deploy 
services quickly, but I'd like a deeper dive into AI features.", "output": 
"Recommend 'Architecting Microsoft Azure AI Solutions' by Drobny and 
Perfekt—it offers in-depth coverage of Azure AI services with hands-on 
labs."}

The sample JSONL pairs customer-review inputs with desired book recommendations, making the training format concrete. section 7.4.4

A deployed endpoint is not the end of the decision. Keep weighing reader satisfaction and operating cost, and monitor real-world performance and fairness as the recommendation feature moves toward production. section 7.4.3 section 7.6

How Microsoft Azure in Action covers it

How deep it goes
Walks through data preparation, wizard submission, job inspection, and deployment; defers real-world production monitoring.
Examples
Uses a JSONL file pairing customer reviews with desired book recommendations for a recommendation engine.
What it assumes
Requires labeled input–output examples and access to an AI Foundry workspace; accepts training files from linked Blob Storage or a workstation.
What you can do after
Apply it via Azure AI Foundry’s Fine-Tuning wizard to submit labeled data, inspect a job, and deploy an inference endpoint.
How it connects
Links fine-tuning to model selection, Blob Storage, endpoint deployment, and fairness monitoring.

Also explained in

Compare how 37 books explain fine-tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.