You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/ai-agents.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: AI agents
2
+
title: AI agent
3
3
description: Learn about key concepts for agents and step through the implementation of an AI agent memory system.
4
4
author: wmwxwa
5
5
ms.author: wangwilliam
@@ -9,13 +9,13 @@ ms.topic: conceptual
9
9
ms.date: 06/26/2024
10
10
---
11
11
12
-
# AI agents
12
+
# AI agent
13
13
14
14
AI agents are designed to perform specific tasks, answer questions, and automate processes for users. These agents vary widely in complexity. They range from simple chatbots, to copilots, to advanced AI assistants in the form of digital or robotic systems that can run complex workflows autonomously.
15
15
16
16
This article provides conceptual overviews and detailed implementation samples for AI agents.
17
17
18
-
## Features and types of AI agents
18
+
## What are AI agents?
19
19
20
20
Unlike standalone large language models (LLMs) or rule-based software/hardware systems, AI agents have these common features:
21
21
@@ -71,19 +71,19 @@ A multi-agent system provides the following advantages over a copilot or a singl
71
71
72
72
Complex reasoning and planning are the hallmark of advanced autonomous agents. Popular frameworks for autonomous agents incorporate one or more of the following methodologies (with links to arXiv archive pages) for reasoning and planning:
73
73
74
-
-[Self-ask](https://arxiv.org/abs/2210.03350)
74
+
-[Self-Ask](https://arxiv.org/abs/2210.03350)
75
75
76
76
Improve on chain of thought by having the model explicitly ask itself (and answer) follow-up questions before answering the initial question.
77
77
78
-
-[Reason and act](https://arxiv.org/abs/2210.03629)
78
+
-[Reason and Act (ReAct)](https://arxiv.org/abs/2210.03629)
79
79
80
80
Use LLMs to generate both reasoning traces and task-specific actions in an interleaved manner. Reasoning traces help the model induce, track, and update action plans, along with handling exceptions. Actions allow the model to connect with external sources, such as knowledge bases or environments, to gather additional information.
81
81
82
-
-[Plan and solve](https://arxiv.org/abs/2305.04091)
82
+
-[Plan and Solve](https://arxiv.org/abs/2305.04091)
83
83
84
84
Devise a plan to divide the entire task into smaller subtasks, and then carry out the subtasks according to the plan. This approach mitigates the calculation errors, missing-step errors, and semantic misunderstanding errors that are often present in zero-shot chain-of-thought prompting.
85
85
86
-
-[Reflect and self-critique](https://arxiv.org/abs/2303.11366)
Use *reflexion* agents that verbally reflect on task feedback signals. These agents maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials.
89
89
@@ -98,7 +98,7 @@ For advanced and autonomous planning and execution workflows, [AutoGen](https://
98
98
> [!TIP]
99
99
> The [implementation sample](#implementation-sample) later in this article shows how to build a simple multi-agent system by using one of the popular frameworks and a unified agent memory system.
100
100
101
-
### Memory system for AI agents
101
+
### AI agent memory system
102
102
103
103
The prevalent practice for experimenting with AI-enhanced applications from 2022 through 2024 has been using standalone database management systems for various data workflows or types. For example, you can use an in-memory database for caching, a relational database for operational data (including tracing/activity logs and LLM conversation history), and a [pure vector database](vector-database.md#integrated-vector-database-vs-pure-vector-database) for embedding management.
104
104
@@ -134,7 +134,7 @@ Currently, LLM-powered applications often use [retrieval-augmented generation](v
134
134
135
135
For example, if the task is to write code, vector search might not be able to retrieve the syntax tree, file system layout, code summaries, or API signatures that are important for generating coherent and correct code. Similarly, if the task is to work with tabular data, vector search might not be able to retrieve the schema, the foreign keys, the stored procedures, or the reports that are useful for querying or analyzing the data.
136
136
137
-
Weaving together a web of standalone in-memory, relational, and vector databases (as described [earlier](#memory-system-for-ai-agents)) is not an optimal solution for the varied data types. This approach might work for prototypical agent systems. However, it adds complexity and performance bottlenecks that can hamper the performance of advanced autonomous agents.
137
+
Weaving together a web of standalone in-memory, relational, and vector databases (as described [earlier](#ai-agent-memory-system)) is not an optimal solution for the varied data types. This approach might work for prototypical agent systems. However, it adds complexity and performance bottlenecks that can hamper the performance of advanced autonomous agents.
138
138
139
139
A robust memory system should have the following characteristics.
140
140
@@ -162,7 +162,7 @@ At the same time, the memory system must allow agents to preserve their own pers
162
162
163
163
## Building a robust AI agent memory system
164
164
165
-
The preceding characteristics require AI agent memory systems to be highly scalable and swift. Painstakingly weaving together disparate in-memory, relational, and vector databases (as described [earlier](#memory-system-for-ai-agents)) might work for early-stage AI-enabled applications. However, this approach adds complexity and performance bottlenecks that can hamper the performance of advanced autonomous agents.
165
+
The preceding characteristics require AI agent memory systems to be highly scalable and swift. Painstakingly weaving together disparate in-memory, relational, and vector databases (as described [earlier](#ai-agent-memory-system)) might work for early-stage AI-enabled applications. However, this approach adds complexity and performance bottlenecks that can hamper the performance of advanced autonomous agents.
166
166
167
167
In place of all the standalone databases, Azure Cosmos DB can serve as a unified solution for AI agent memory systems. Its robustness successfully [enabled OpenAI's ChatGPT service](https://www.youtube.com/watch?v=6IIUtEFKJec&t) to scale dynamically with high reliability and low maintenance. Powered by an atom-record-sequence engine, it's the world's first globally distributed [NoSQL](distributed-nosql.md), [relational](distributed-relational.md), and [vector database](vector-database.md) service that offers a serverless mode. AI agents built on top of Azure Cosmos DB offer speed, scale, and simplicity.
0 commit comments