Skip to content

Commit 45d127c

Browse files
authored
Merge pull request #21 from aprilspeight/main
Fix typos and add to trustworthy AI lesson
2 parents 86ddea6 + c58b41a commit 45d127c

File tree

9 files changed

+60
-56
lines changed

9 files changed

+60
-56
lines changed

01-intro-to-ai-agents/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ AI Agents are **systems** that enable **Large Language Models(LLMs)** to **perfo
2929

3030
Let's break this definition into smaller parts:
3131

32-
- **System** - It's important to think about agents not as just a single component but as a system of many components.At the basic level, the components of an AI Agent are:
32+
- **System** - It's important to think about agents not as just a single component but as a system of many components. At the basic level, the components of an AI Agent are:
3333
- **Environment** - The defined space where the AI Agent is operating. For example, if we had a travel booking AI Agent, the environment could be the travel booking system that the AI Agent uses to complete tasks.
3434
- **Sensors** - Environments have information and provide feedback. AI Agents use sensors to gather and interpret this information about the current state of the environment. In the Travel Booking Agent example, the travel booking system can provide information such as hotel availability or flight prices.
35-
- **Actuators** - Once the AI Agent receives the current state of the environment, For the current task the agent determines what action to perform to change the environment. For the travel booking agent, it might be to book an available room for the user.
35+
- **Actuators** - Once the AI Agent receives the current state of the environment, for the current task the agent determines what action to perform to change the environment. For the travel booking agent, it might be to book an available room for the user.
3636

3737
![What Are AI Agents?](./images/what-are-ai-agents.png?WT.mc_id=academic-105485-koreyst)
3838

@@ -60,7 +60,7 @@ Now that we have a general definition of AI Agents, let us look at some specific
6060

6161
## When to Use AI Agents
6262

63-
In the earlier section, we used the Travel Agent use-case to explain how the different type of agents can be used in different scenarios of travel booking. We will contiue to use this application througout the course.
63+
In the earlier section, we used the Travel Agent use-case to explain how the different type of agents can be used in different scenarios of travel booking. We will continue to use this application throughout the course.
6464

6565
Let's look at they types of use cases that AI Agents are best used for:
6666

02-explore-agentic-frameworks/README.md

Lines changed: 25 additions & 25 deletions
Large diffs are not rendered by default.

03-agentic-design-patterns/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This is the environment in which the agent operates. These principles inform how
3636
- **Connecting, not collapsing** – help connect people to other people, events, and actionable knowledge to enable collaboration and connection.
3737
- Agents help connect events, knowledge, and people.
3838
- Agents bring people closer together. They are not designed to replace or belittle people.
39-
- **Easily accessible yet occasionally invisible** – agent largely operates in the background and only nudges us when it is relevant and appropriate.
39+
- **Easily accessible yet occasionally invisible** – agent largely operate in the background and only nudges us when it is relevant and appropriate.
4040
- Agent is easily discoverable and accessible for authorized users on any device or platform.
4141
- Agent supports multimodal inputs and outputs (sound, voice, text, etc.).
4242
- Agent can seamlessly transition between foreground and background; between proactive and reactive, depending on its sensing of user needs.

04-tool-use/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The **Tool Use Design Pattern** focuses on giving LLMs the ability to interact w
2626

2727
AI Agents can leverage tools to complete complex tasks, retrieve information, or make decisions. The tool use design pattern is often used in scenarios requiring dynamic interaction with external systems, such as databases, web services, or code interpreters. This ability is useful for a number of different use cases including:
2828

29-
- **Dynamic Information Retrieval:** Agents can query external APIs or databases to fetch up-to-date data (e.g., quering an SQLite database for data analysis, fetching stock prices or weather information).
29+
- **Dynamic Information Retrieval:** Agents can query external APIs or databases to fetch up-to-date data (e.g., querying a SQLite database for data analysis, fetching stock prices or weather information).
3030
- **Code Execution and Interpretation:** Agents can execute code or scripts to solve mathematical problems, generate reports, or perform simulations.
3131
- **Workflow Automation:** Automating repetitive or multi-step workflows by integrating tools like task schedulers, email services, or data pipelines.
3232
- **Customer Support:** Agents can interact with CRM systems, ticketing platforms, or knowledge bases to resolve user queries.
@@ -41,7 +41,7 @@ Function calling is the primary way we enable Large Language Models (LLMs) to in
4141
For developers to implement function calling for agents, you will need:
4242

4343
1. An LLM model that supports function calling
44-
2. A schema containting function descriptions
44+
2. A schema containing function descriptions
4545
3. The code for each function described
4646

4747
Let's use the example of getting the current time in a city to illustrate:
@@ -255,7 +255,7 @@ As we learned in [Lesson 2](../02-explore-agentic-frameworks/) agentic framework
255255
import os
256256
from azure.ai.projects import AIProjectClient
257257
from azure.identity import DefaultAzureCredential
258-
from fecth_sales_data_functions import fetch_sales_data_using_sqlite_query # fetch_sales_data_using_sqlite_query function which can be found in a fecth_sales_data_functions.py file.
258+
from fecth_sales_data_functions import fetch_sales_data_using_sqlite_query # fetch_sales_data_using_sqlite_query function which can be found in a fetch_sales_data_functions.py file.
259259
from azure.ai.projects.models import ToolSet, FunctionTool, CodeInterpreterTool
260260

261261
project_client = AIProjectClient.from_connection_string(

05-agentic-rag/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Agentic RAG
22

3-
This lesson provides a comprehensive overview of Agentic Retrieval-Augmented Generation (Agentic RAG), an emerging AI paradigm where large language models (LMs) autonomously plan their next steps while pulling information from external sources. Unlike static retrieval-then-read patterns, Agentic RAG involves iterative calls to the LLM, interspersed with tool or function calls and structured outputs. The system evaluates results, refines queries, invokes additional tools if needed, and continues this cycle until a satisfactory solution is achieved.
3+
This lesson provides a comprehensive overview of Agentic Retrieval-Augmented Generation (Agentic RAG), an emerging AI paradigm where large language models (LLMs) autonomously plan their next steps while pulling information from external sources. Unlike static retrieval-then-read patterns, Agentic RAG involves iterative calls to the LLM, interspersed with tool or function calls and structured outputs. The system evaluates results, refines queries, invokes additional tools if needed, and continues this cycle until a satisfactory solution is achieved.
44

55
## Introduction
66

77
This lesson will cover
88

9-
- **Understand Agentic RAG:** Learn about the emerging paradigm in AI where large language models (LLMs) autonomously plan their next steps while pulling information from external data sources
9+
- **Understand Agentic RAG:** Learn about the emerging paradigm in AI where large language models (LLMs) autonomously plan their next steps while pulling information from external data sources.
1010
- **Grasp Iterative Maker-Checker Style:** Comprehend the loop of iterative calls to the LLM, interspersed with tool or function calls and structured outputs, designed to improve correctness and handle malformed queries.
1111
- **Explore Practical Applications:** Identify scenarios where Agentic RAG shines, such as correctness-first environments, complex database interactions, and extended workflows.
1212

@@ -53,7 +53,7 @@ All of these steps—refining queries, choosing sources, iterating until “happ
5353

5454
## Iterative Loops, Tool Integration, and Memory
5555

56-
![Tool Intergration Architecture](./images/tool-integration.png)
56+
![Tool Integration Architecture](./images/tool-integration.png)
5757

5858
An agentic system relies on a looped interaction pattern:
5959

06-building-trustworthy-agents/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ To create scalable system prompts, we can use a meta prompting system for buildi
3737
Here is an example of a meta prompt we would give to the LLM:
3838

3939
```plaintext
40-
You are an expert at creating AI agent assitants.
41-
You will be provided a company name, role, responsibilites and other
40+
You are an expert at creating AI agent assistants.
41+
You will be provided a company name, role, responsibilities and other
4242
information that you will use to provide a system prompt for.
43-
To create the system prompt, be descriptive as possible and provide a structure that a system using an LLM can better understand the role and responsibilites of the AI assistant.
43+
To create the system prompt, be descriptive as possible and provide a structure that a system using an LLM can better understand the role and responsibilities of the AI assistant.
4444
```
4545

4646
#### Step 2: Create a basic prompt
@@ -151,7 +151,7 @@ To build trustworthy AI agents, it is important to understand and mitigate the r
151151

152152
## Human-in-the-Loop
153153

154-
Another effective way to build trustworthy AI Agent systems is using a Human-in-the-loop. This creates a flow where users are able to provide feedback to the Agents during run. Users essentially act as agent in a multi-agent system and by providing apporval or termination of the running process.
154+
Another effective way to build trustworthy AI Agent systems is using a Human-in-the-loop. This creates a flow where users are able to provide feedback to the Agents during run. Users essentially act as agent in a multi-agent system and by providing approval or termination of the running process.
155155

156156
![Human in The Loop](./images/human-in-the-loop.png)
157157

@@ -177,4 +177,13 @@ await Console(stream)
177177

178178
```
179179

180+
## Conclusion
180181

182+
Building trustworthy AI agents requires careful design, robust security measures, and continuous iteration. By implementing structured meta prompting systems, understanding potential threats, and applying mitigation strategies, developers can create AI agents that are both safe and effective. Additionally, incorporating a human-in-the-loop approach ensures that AI agents remain aligned with user needs while minimizing risks. As AI continues to evolve, maintaining a proactive stance on security, privacy, and ethical considerations will be key to fostering trust and reliability in AI-driven systems.
183+
184+
## Additional Resources
185+
186+
- [Responsible AI overview](https://learn.microsoft.com/azure/ai-studio/responsible-use-of-ai-overview)
187+
-[Evaluation of generative AI models and AI applications](https://learn.microsoft.com/azure/ai-studio/concepts/evaluation-approach-gen-ai)
188+
- [Safety system messages](https://learn.microsoft.com/azure/ai-services/openai/concepts/system-message?context=%2Fazure%2Fai-studio%2Fcontext%2Fcontext&tabs=top-techniques)
189+
- [Risk Assessment Template](https://blogs.microsoft.com/wp-content/uploads/prod/sites/5/2022/06/Microsoft-RAI-Impact-Assessment-Template.pdf?culture=en-us&country=us)

07-planning-design/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ from pprint import pprint
109109
messages = [
110110
SystemMessage(content="""You are an planner agent.
111111
Your job is to decide which agents to run based on the user's request.
112-
Below are the available agents specialised in different tasks:
112+
Below are the available agents specialized in different tasks:
113113
- FlightBooking: For booking flights and providing flight information
114114
- HotelBooking: For booking hotels and providing hotel information
115115
- CarRental: For booking cars and providing car rental information
@@ -132,7 +132,7 @@ if response_content is None:
132132
pprint(json.loads(response_content))
133133
```
134134

135-
Below is the output from the above code and you can then use this structured output to route to `assigned_agent` and summarise the travel plan to end user
135+
Below is the output from the above code and you can then use this structured output to route to `assigned_agent` and summarize the travel plan to the end user.
136136

137137
```json
138138
{
@@ -179,14 +179,14 @@ e.g sample code
179179
messages = [
180180
SystemMessage(content="""You are a planner agent to optimize the
181181
Your job is to decide which agents to run based on the user's request.
182-
Below are the available agents specialised in different tasks:
182+
Below are the available agents specialized in different tasks:
183183
- FlightBooking: For booking flights and providing flight information
184184
- HotelBooking: For booking hotels and providing hotel information
185185
- CarRental: For booking cars and providing car rental information
186186
- ActivitiesBooking: For booking activities and providing activity information
187187
- DestinationInfo: For providing information about destinations
188188
- DefaultAgent: For handling general requests""", source="system"),
189-
UserMessage(content="Create a travel plan for a family of 2 kids from Singapore to Melboune", source="user"),
189+
UserMessage(content="Create a travel plan for a family of 2 kids from Singapore to Melbourne", source="user"),
190190
AssistantMessage(content=f"Previous travel plan - {TravelPlan}", source="assistant")
191191
]
192192
# .. re-plan and send the tasks to respective agents
@@ -196,10 +196,8 @@ For a more comprehensive planning do checkout Magnetic One [Blogpost](https://ww
196196

197197
## Summary
198198

199-
In this article we have looked at an example of how we can create a planner that can dynamically select the available agents defined. The output of the Planner decomposes the tasks and assigns the agents so them to be executed. It is assumed the agents has access to function/tools that are required to perform the task. In addition to the agents you can include other patterns like reflection, summarizer , round robin chat to further customise
199+
In this article we have looked at an example of how we can create a planner that can dynamically select the available agents defined. The output of the Planner decomposes the tasks and assigns the agents so them to be executed. It is assumed the agents has access to function/tools that are required to perform the task. In addition to the agents you can include other patterns like reflection, summarizer, and round robin chat to further customize.
200200

201201
## Additional Resources
202202

203-
* Using o1 reasoning models have proved quite adavnaced in planning complex tasks - TODO: Share example?
204-
205-
* Autogen Magentic One - A Generalist multi agent system for solving complex task and has achieved impressive results on multiple challenging agentic benchmarks. Reference: [autogen-magentic-one](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-magentic-one). In this implementation the orchestrator create task specific plan and delegates these tasks to the available agents. In addition to planning the orchestrator also employs a tracking mechanism to monitor the progress of the task and re-plans as required.
203+
* AutoGen Magentic One - A Generalist multi agent system for solving complex task and has achieved impressive results on multiple challenging agentic benchmarks. Reference: [autogen-magentic-one](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-magentic-one). In this implementation the orchestrator create task specific plan and delegates these tasks to the available agents. In addition to planning the orchestrator also employs a tracking mechanism to monitor the progress of the task and re-plans as required.

08-multi-agent/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ As soon as you start working on a project that involves multiple agents, you wil
66

77
In this lesson, we're looking to answer the following questions:
88

9-
- What are the scenarios where multi-agents are applicable to?
10-
- What are the advantages of using multi-agents over just one singular agent doing multiple tasks?
11-
- What are the building blocks of implementing the multi-agent design pattern?
9+
- What are the scenarios where multi-agents are applicable to?
10+
- What are the advantages of using multi-agents over just one singular agent doing multiple tasks?
11+
- What are the building blocks of implementing the multi-agent design pattern?
1212
- How do we have visibility to how the multiple agents are interacting with each other
1313

1414
## Learning Goals
@@ -143,8 +143,6 @@ There's quite a few agents listed above both for the specific refund process but
143143

144144
## Assignment
145145

146-
What's a good assignment for this lesson?
147-
148146
Design a multi-agent system for a customer support process. Identify the agents involved in the process, their roles and responsibilities, and how they interact with each other. Consider both agents specific to the customer support process and general agents that can be used in other parts of your business.
149147

150148
> Have a think before you read the solution below, you may need more agents than you think.
@@ -171,6 +169,5 @@ In this lesson, we've looked at the multi-agent design pattern, including the sc
171169

172170
## Additional resources
173171

174-
- [Autogen design patterns](https://microsoft.github.io/autogen/0.4.0.dev4/user-guide/core-user-guide/design-patterns/index.html)
175-
- [Agentic design patterns](https://www.analyticsvidhya.com/blog/2024/10/agentic-design-patterns/)
176-
172+
- [AutoGen design patterns](https://microsoft.github.io/autogen/0.4.0.dev4/user-guide/core-user-guide/design-patterns/index.html)
173+
- [Agentic design patterns](https://www.analyticsvidhya.com/blog/2024/10/agentic-design-patterns/)

10-ai-agents-production/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AI Agents in Production
1+
# AI Agents in Production
22

33
## Introduction
44

0 commit comments

Comments
 (0)