Courseiva
AI-102Chapter 12 of 16Objective 4.3

Generative AI: Responsible Use, Fine-Tuning, and Customization

How do you stop a powerful generative AI model from saying something harmful, while also making it uniquely useful for your business? That's the exact problem that fine-tuning, customisation, and responsible use policies solve, and it's central to the AI-102 exam. Understanding this process is what separates someone who merely uses AI from someone who safely and effectively deploys it at scale for real customers.

12 min read
Advanced
Updated Jul 23, 2026
Reviewed by Johnson Ajibi· Senior Network & Security Engineer · MSc IT Security

A simple way to picture Generative AI: Responsible Use, Fine-Tuning, and Customization

The Master Chef Recipe Analogy

First, a master chef creates a signature recipe (the base generative AI model) by training it on thousands of dishes from around the world. This gives you a general-purpose model that can cook anything reasonably well, but nothing perfectly.

Now, imagine you own a small Italian restaurant. Using that master chef's recipe as a starting point, you don't start from scratch. Instead, you take that general recipe and fine-tune it by adding your own secret ingredients: more garlic, less salt, a specific type of basil from your garden. You customise the cooking instructions to match your local customers' tastes. This fine-tuning process makes the dishes perfect for your restaurant, without needing a world-class chef to invent a whole new cuisine.

But with this power comes responsibility. You must ensure the ingredients you add are safe, the cooking methods are ethical (no stolen recipes), and your customised dish doesn't accidentally offend anyone. You must label allergens, avoid false claims about health benefits, and ensure your modifications don't accidentally produce a dangerous dish. The restaurant owner is responsible for the final plate, not the original master chef. In the same way, when you fine-tune a generative AI model for your business, you are responsible for its outputs, its biases, and its ethical use. You can't just blame the original AI model if your customised version starts giving harmful advice.

How It Actually Works

Generative AI refers to artificial intelligence models that create new content, rather than just analysing or classifying existing data. Examples include GPT-4 (which can write text), DALL-E (which can create images), and code generators like GitHub Copilot. These models are huge, containing billions of parameters (the model's internal settings that it learns from data).

The base model is initially trained on a massive, general dataset from the internet, books, and other sources. This training process is incredibly expensive and time-consuming, taking weeks or months using thousands of specialised computer chips. The result is a general-purpose model that can do many things reasonably well, but it's not optimised for any specific task.

Fine-tuning is the process of taking that pre-trained, general base model and further training it on a smaller, more specific dataset that relates to a particular task or domain. For instance, a medical chatbot would be fine-tuned on a dataset of medical textbooks, patient records (anonymised), and doctor-patient conversations. This allows the model to learn the specific terminology, style, and knowledge of that domain without starting from scratch.

Customisation goes beyond fine-tuning. It includes methods like:

Prompt engineering: designing the exact instructions (prompts) you give the model to guide its output.

Retrieval-Augmented Generation (RAG): giving the model access to a specific database of documents (like your company's internal knowledge base) to fetch relevant information before generating a response. This helps prevent the model from making up false facts.

Adjusting model parameters: changing settings like temperature (controls randomness) and max length (limits response size) to shape the model's behaviour.

Now, the 'responsible use' part is critical. These models can produce harmful, biased, or factually incorrect content. Responsible use is a set of practices, policies, and technical controls to mitigate these risks. It includes:

Content filtering: systems that detect and block harmful outputs (hate speech, violence, spam) before they reach the user.

Bias detection: checking the model's outputs for unfair stereotypes or discrimination against certain groups.

Transparency: clearly telling users they are interacting with an AI, not a human.

Accountability: establishing who is responsible when the AI model causes harm (the organisation deploying it, not the model developer).

Privacy: ensuring the model doesn't memorise and leak sensitive training data.

How does it all fit together? An organisation starts with a base model from a provider like OpenAI (through Azure OpenAI Service), then fine-tunes it on their own data using Azure Machine Learning or Azure OpenAI Studio. They then deploy the fine-tuned model, often in a containerised environment like a virtual machine. Before going live, they implement responsible use filters using Azure AI Content Safety, which can block harmful content in real-time. They also set up monitoring to track the model's performance and detect any drift in its behaviour over time.

Why does this exist and what does it replace? Before fine-tuning, you would have to either build a custom AI model from scratch (extremely expensive and slow) or use a generic model that might give bad answers (like a general language model trying to answer specific legal questions). Fine-tuning gives you the best of both worlds: the power of a huge pre-trained model with the specificity of a custom-built one. It replaces the 'one-size-fits-all' approach with 'tailored for you'.

This diagram shows the end-to-end process: starting with a base model, fine-tuning it with customer data, deploying it with content safety filters, and continuously monitoring for drift.

Walk-Through

1

1. Identify the Use Case and Base Model

Define exactly what task you want the AI to perform (e.g., customer support for insurance, code generation for a development team). Then choose a suitable base model from Azure OpenAI Service, such as GPT-4 for text or DALL-E for images.

2

2. Prepare the Fine-Tuning Dataset

Collect a dataset of high-quality examples that represent the desired behaviour. For a customer support bot, this might be 500 question-answer pairs from old chats. The data must be cleaned, anonymised, and formatted correctly (usually in JSONL format).

3

3. Run the Fine-Tuning Job in Azure OpenAI

Use the Azure OpenAI Studio or API to create a fine-tuning job. Upload your dataset, specify the base model, and configure training parameters like number of epochs (how many times the model sees your data). The job runs in the cloud; it might take a few hours.

4

4. Evaluate the Fine-Tuned Model

Test the model on a separate dataset it hasn't seen during training. Check for accuracy, tone, and safety. If it makes errors, go back and improve the training data or adjust parameters. This step is crucial before any deployment.

5

5. Implement Responsible Use Controls

Deploy content filters using Azure AI Content Safety. Set up a system message that constrains the model's behaviour. Implement monitoring via Azure Monitor to track outputs. Establish a human review process for critical decisions.

6

6. Deploy and Monitor Continuously

Deploy the model behind an API endpoint. Monitor its outputs regularly for drift (changes in behaviour over time). Plan for periodic re-fine-tuning (e.g., quarterly) to keep the model accurate and safe as new data and regulations emerge.

What This Looks Like on the Job

Let's imagine you work for a large UK insurance company named 'SafeGuard Insurance'. The company wants to deploy a generative AI chatbot on its website to answer customer queries about policies, claims, and coverage. Using a raw, untuned model from Azure OpenAI would be risky because it might give incorrect policy information or use aggressive sales language.

Here's the step-by-step reality:

First, the IT team obtains the base GPT-4 model through the Azure OpenAI Service. They don't start with a blank slate. Next, they gather a dataset of 10,000 historical customer service interactions: past chats, emails, and call transcripts. This data must be cleaned and anonymised to remove personal details like names and addresses, because data privacy laws (like GDPR) require it.

The team then uses Azure Machine Learning to fine-tune the model. They create a fine-tuning job, which is essentially a training run. They select the base model, upload their dataset, choose the number of training epochs (how many times the model sees the data), and configure other settings. The job might run for a few hours on a GPU cluster in the cloud. This fine-tuning teaches the model to answer in a helpful, professional tone specific to insurance, to use correct policy terminology, and to avoid making up policy details.

After fine-tuning, the team evaluates the model. They test it on a held-back set of questions that weren't in the training data. They check for accuracy (does the model give the correct policy limit?), tone (is it polite and clear?), and safety (does it avoid discussing illegal activities or giving medical advice?).

If the model passes, they implement a responsible use strategy. This involves:

Setting up Azure AI Content Safety to filter out harmful language.

Creating a 'safety system message' that tells the model its boundaries (e.g., 'You are a helpful insurance assistant. Never give investment advice. Never fabricate policy terms.').

Implementing a human-in-the-loop system where critical queries (e.g., 'Should I cancel my policy?') are escalated to a human agent.

Monitoring the model's outputs with Azure Monitor and setting up alerts for unusual response patterns.

Finally, they deploy the model behind a web API. The chatbot goes live. The IT team now has ongoing responsibility: they must regularly retrain the model with new data, update content filters as regulations change, and review user feedback. This is not a 'set and forget' process. The model will need to be fine-tuned again quarterly with new policy documents and customer interaction data to keep it accurate.

How AI-102 Actually Tests This

The AI-102 exam (Exam AI-102: Designing and Implementing a Microsoft Azure AI Solution) dedicates a meaningful portion of its content to this area under objective 4.3. The exam explicitly tests your ability to 'Implement responsible use, fine-tuning, and customization of generative AI models'. Do not underestimate this section.

Here's exactly what you will see:

First, you will get multiple-choice questions that ask you to choose the correct Azure service for a specific task. They love testing the distinction between:

Azure OpenAI Service (for accessing and fine-tuning large models like GPT-4)

Azure AI Language (for more basic text analytics)

Azure Machine Learning (for training custom models from scratch, not just fine-tuning)

Azure AI Content Safety (for implementing filters)

A typical trap question: 'You need to fine-tune a GPT-4 model for a medical application. Which service should you use?' The correct answer is Azure OpenAI Service, not Azure Machine Learning (which is for custom models, not fine-tuning existing ones).

Second, they test the concept of 'responsible use' through scenario-based questions. For example: 'Your company deploys a chatbot that sometimes generates offensive language. What should you do first?' The answer is: implement a content filter using Azure AI Content Safety, and then consider fine-tuning the model on safer data.

Third, they test fine-tuning terminology. Key terms that appear:

Training data: the specific dataset you use for fine-tuning.

Epochs: how many complete passes the model makes through the training data.

Batch size: number of samples processed before updating model weights.

Learning rate: how quickly the model adjusts to new data.

Fourth, they test the 'customisation' aspect, especially Retrieval-Augmented Generation (RAG). Questions might ask: 'How can you ensure a generative model uses your company's specific knowledge base?' The answer: use Azure Cognitive Search to index your documents, then integrate it with the model's prompt (RAG).

Fifth, they test 'transparency' and 'privacy' principles. Expect questions about:

Telling users they are talking to an AI (transparency).

Not storing or misusing customer data (privacy).

Having a human review process for high-stakes decisions (accountability).

Memorise this pattern: If the question is about preventing harmful outputs, think 'Azure AI Content Safety'. If it's about specialising a model for a specific domain, think 'fine-tuning in Azure OpenAI Service'. If it's about pulling information from your own documents, think 'RAG + Azure Cognitive Search'. If it's about the principles, think 'Microsoft's Responsible AI principles: fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability'. They love to test these six principles directly.

Key Takeaways

Fine-tuning adapts a pre-trained generative AI model to a specific task using a small, targeted dataset, which is far cheaper and faster than training from scratch.

Azure OpenAI Service is the primary Azure tool for fine-tuning large language models like GPT-4, not Azure Machine Learning.

Responsible use of generative AI requires implementing content filters (Azure AI Content Safety), ensuring transparency, protecting privacy, and maintaining human accountability.

Fine-tuning does not remove all biases; you must still apply monitoring and content filtering to prevent harmful outputs.

Retrieval-Augmented Generation (RAG) allows a model to pull information from your own company data, preventing it from making up false facts.

The six Microsoft Responsible AI principles are: fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.

Your organisation—not the model developer—is responsible for everything the deployed AI does or fails to do.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Fine-Tuning

Requires additional training on your own dataset, which takes time and compute.

Modifies the model's behaviour permanently for that task.

More powerful for specialised domains but more expensive.

Prompt Engineering

No training required; you only craft better instructions (prompts).

Does not change the base model; it only guides its responses.

Cheaper and faster, but less effective for highly specialised tasks.

Azure OpenAI Service

Specifically designed for accessing and fine-tuning large language models from OpenAI.

Supports fine-tuning via a simple no-code interface or API.

Manages the GPU infrastructure for you.

Azure Machine Learning

A general platform for building, training, and deploying any machine learning model.

Requires more setup and coding to fine-tune a large language model.

Gives you full control over training infrastructure but is more complex.

Content Filtering (Azure AI Content Safety)

Automated and immediate, blocking harmful output in milliseconds.

Can only handle content types it was trained on (e.g., hate, violence).

Runs 24/7 without human intervention.

Human Review (Human-in-the-Loop)

Manual, slower, but more nuanced for complex situations.

Can handle ambiguous or edge-case queries that filters miss.

Requires staffing and is not real-time.

Fine-Tuning on Proprietary Data

Permanently bakes your data into the model's parameters.

Best for learning style, terminology, and fixed knowledge.

Does not require a separate database; the model 'memorises' the data.

Retrieval-Augmented Generation (RAG)

Keeps your data in an external database (e.g., Azure Cognitive Search).

Best for dynamic or frequently changing knowledge (e.g., policy updates).

Requires a separate retrieval pipeline to fetch relevant documents at query time.

Watch Out for These

Mistake

Fine-tuning is the same as training a model from scratch.

Correct

Fine-tuning starts with an existing pre-trained model and adjusts it slightly. Training from scratch requires building the model architecture and training it on billions of data points from zero.

Beginners hear the word 'training' and assume it means the full, expensive process. They don't realise that fine-tuning is a far cheaper and faster shortcut.

Mistake

Once you fine-tune a model, you can never use the base model again.

Correct

Fine-tuning creates a separate copy of the model. You still have the original base model and can fine-tune it in different ways for different purposes.

This comes from thinking of the model as a physical object that you permanently modify, rather than a software file that can be duplicated.

Mistake

Fine-tuning will completely erase any harmful biases from the original model.

Correct

Fine-tuning can reduce biases but cannot eliminate them entirely. Biases embedded deep in the base model's billions of parameters will still influence outputs. Responsible use filters are still needed.

Beginners expect a magic fix. They overestimate the power of fine-tuning and underestimate how deeply biases are ingrained in large models.

Mistake

If you use a fine-tuned model, you are no longer responsible for its outputs.

Correct

The organisation that deploys the model is legally and ethically responsible for its outputs, regardless of whether it was fine-tuned or not.

People think 'the model did it, not me'. But in real-world regulation, the deployer is the responsible party. This is a critical exam point.

Mistake

Content filters are only useful for blocking swear words.

Correct

Content filters in Azure AI Content Safety can block many categories: hate speech, violence, self-harm, sexual content, and also factually incorrect or misleading information (through custom categories).

The term 'filter' sounds simple, leading to underestimating its sophistication. Exam questions often test the breadth of these categories.

Mistake

Fine-tuning a model requires a massive amount of data, like terabytes.

Correct

Fine-tuning can be effective with as few as a few hundred high-quality examples, depending on the task. The base model already knows a lot; fine-tuning just adjusts it slightly.

People compare it to the original training which does need huge datasets, so they assume fine-tuning needs the same.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

Can I fine-tune any Azure OpenAI model?

No. Only certain models support fine-tuning, such as GPT-4 (limited preview) and GPT-3.5-Turbo. Check the Azure OpenAI documentation for which models are currently fine-tunable.

How much does fine-tuning cost?

Cost depends on the model size and training duration. For GPT-3.5-Turbo, it's charged per training hour and per output token. Typically, a small fine-tuning job can cost tens to a few hundred dollars.

Do I need to know machine learning code to fine-tune?

Not necessarily. Azure OpenAI Studio provides a no-code interface for fine-tuning where you can upload your data and start a job with a few clicks. However, for advanced control, you can use the Python API or Azure Machine Learning SDK.

What happens if my fine-tuned model starts generating bad content after a while?

This is called 'model drift'. It can happen due to changes in input data or user interactions. You should have monitoring in place (Azure Monitor) and a plan to retrain the model periodically.

Is fine-tuned data kept private?

Yes. Your training data is not used to train the base model for other customers. Azure OpenAI ensures data privacy: your data stays within your tenant and is not shared with Microsoft training processes.

How long does a fine-tuning job take?

It varies. With a small dataset of a few hundred examples, it might take 15-60 minutes. Larger datasets with many epochs can take several hours.

Can I see what the model learned during fine-tuning?

The fine-tuning process modifies the model parameters internally, but you cannot directly inspect them. The only way to assess what it learned is to test it with sample prompts.

Terms Worth Knowing

Keep going

You've finished Generative AI: Responsible Use, Fine-Tuning, and Customization. Continue through the AI-102 study guide to build a complete picture of the exam.

Done with this chapter?