Responsible AI For Developers: Resources For Self-Guided Learning
Tags: azure, beginners, ai, thisweekinai
Published: 2024-01-31 12:02:41

---
title: Responsible AI For Developers: Resources For Self-Guided Learning
published: true
description: Building Machine Learning Models or Generative AI Applications? In this post @ruthieyakubu and @nitya share three workshop resources to take you from understanding Responsible AI principles, to applying them in practice.
tags: azure, beginners, ai, thisweekinai
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybo25gd2u2h00ott5mtz.png
series: This Week In AI News
---

**Three Actions You Can Take To JumpStart The Journey:**
1. [Visit the Responsible AI Developers Hub](https://aka.ms/rai-hub/website)
2. [Bookmark the Responsible AI Developers Collection](https://aka.ms/rai-hub/collection)
3. [Complete the Responsible AI Dashboard Learn Module](https://learn.microsoft.com/training/modules/train-model-debug-with-responsible-ai-dashboard-azure-machine-learning/?WT.mc_id=aiml-114127-cxa)

---

## What is Responsible AI?

If you've built AI applications or trained a machine learning model, you've probably heard the term _responsible AI_ being used in combination with words like "evaluation", "fairness" or "explainability". So what do these mean? And why should you care about responsible AI? And most importantly, how can you skill up on this with self-guided learning resources? 

By [one definition](https://responsibleaitoolbox.ai/) Responsible AI is an approach to "assessing, developing and deploying AI systems in a safe, trustworthy and ethical manner". Rapid growth in Large Language Models (LLM) and Generative AI (apps) is accelerating adoption of AI in every aspect of our daily lives. And this is raising concerns around data privacy, and the ability of these systems to operate _fairly and reliably_ when making decisions that have the potential to cause harm to individuals and society.

---

## 6 Principles Of Responsible AI

To address this, Microsoft identified [six principles](https://www.microsoft.com/ai/responsible-ai) to guide AI development and usage. These are:

1. **Fairness** | AI Systems should allocate opportunities or resources in a fair and unbiased manner, across all users.
1. **Reliability & Safety** | Systems should work correctly and reliably, even under conditions or contexts it may not have been designed for.
1. **Privacy and Security** | Systems should protect data and preserve user privacy in all operations.
1. **Inclusiveness** | Systems should function in a manner that is inclusive to people of all abilities.
1. **Transparency** | System should be understandable to its users so that it is not misused or misinterpreted.
1. **Accountability** | Humans should be accountable for system operations by means of appropriate oversight.

![Principles of Responsible AI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a7vo091yzefg114ryqsl.png)

---

## The Responsible AI Developer Hub

How can we apply these principles in practice, as we build our machine learning models or generative AI applications? How can we integrate these practices into our developer workflows? To help developers answer these questions and more, we setup the [Responsible AI Developer Hub](https://aka.ms/rai-hub/website) - a site with training materials and resources for the self-guided learner.

![Responsible AI Developer Hub](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxj9eyoe8p7jbvitd6vk.png)

The site currently has three workshops that help you learn responsible AI practices for model debugging, prompt engineering (and LLMOps) and content safety for generative AI experiences. Let's take a quick look at each.

---

## Responsible AI Dashboard Workshop

Building a machine learning model for your application domain with a relevant data set? How can you ensure that your model follows responsible AI practices? Traditional model performance metrics (e.g. accuracy) provide aggregated results which are insufficient to pinpoint where biases or model errors exist that could negatively affect people. This hands-on lab teaches you how to **debug your model** using a number of tools (error analysis, model performance, data representation, interpretability etc.) to assess it for fairness, transparency, inclusiveness and more. You'll start by training a model with a given dataset, registering the trained model on Azure, then creating a customized Dashboard to help you debug this visually. 

{% speakerdeck 4fdbd94322da4e229e2be5d3763f7e2e %}

The Dashboard is a _single pane of glass_ experience that lets you seamlessly integrate and use a variety of toolkit components from the same UI.

---

## Azure Content Safety Workshop

The Dashboard can help you debug the underlying model for fairness, reliability etc. But ensuring responsible AI experiences with generative AI **content** poses additional challenges in making sure that the prompts and responses do not include _offensive, harmful or inappropriate_ contnet in text and images.

{% speakerdeck 553875f45bbe4ac9bccf0dc92ccde1e6 %}

With the [Azure Content Safety](https://contentsafety.cognitive.azure.com/) tools,  developers can now **moderate** text, image and multimodal content using out-of-the-box AI models with built-in blocklists that you can customize further. In _this_ workshop, you'll learn to detect and flag text that is unsuitable for end users, block inappropriate images, and create applications that present a safe and friendly tone to your audience.

---

## Prompt Flow Evaluation Workshop

Generative AI applications rely on _prompt engineering_ to improve the quality and relevance of the responses generated by the underlying model. Prompt engineering it itself a tedious process requiring orchestration of multiple steps in a "prompt flow" before the final _model prompt_ can be generated, and the result returned to the user.

![Responsible AI in Prompt Engineering](https://azure.microsoft.com/en-us/blog/wp-content/uploads/2023/12/Picture3.webp)

To [infuse responsible AI tools and practices in your LLMOps](https://azure.microsoft.com/en-us/blog/infuse-responsible-ai-tools-and-practices-in-your-llmops/) it is not enough to understand the best practices as identified in that article above. Instead, you will need to iteratively test and refine the process, _evaluating the results each time_ until you get the desired outcome. Azure, with Prompt Flow, provides a comprehensive evaluation toolkit with sample flows that you can use (and customize) to evaluate metrics like groundedness, relevance etc.

{% speakerdeck a863c7436e104f4b81369da730e62107 %}

In this workshop, you'll learn to create a chat application using an LLM with a RAG architecture - then use the QnA RAG Evaluation template to test the flow for relevant metrics.

---

## Related Resources

Want to learn more about Responsible AI? Bookmark our [Collection](https://aka.ms/rai-hub/collection) and watch for updates. You can also follow the authors on dev.to for news on upcoming events and content to help you skill up further.

{% user nitya %}

{% user ruthieyakubu %}

Last but not least, check out the [Responsible AI Toolbox](https://responsibleaitoolbox.ai/) suite from Microsoft Research, for an open-source version of the tools that you can use for a customized end-to-end responsible AI experience.

Build AI Apps. And Build Responsibly.🛡 

---

**Three Actions You Can Take To JumpStart The Journey:**
1. [Visit the Responsible AI Developers Hub](https://aka.ms/rai-hub/website)
2. [Bookmark the Responsible AI Developers Collection](https://aka.ms/rai-hub/collection)
3. [Complete the Responsible AI Dashboard Learn Module](https://learn.microsoft.com/training/modules/train-model-debug-with-responsible-ai-dashboard-azure-machine-learning/?WT.mc_id=aiml-114127-cxa)