Sitemap
Data Science at Microsoft

Lessons learned in the practice of data science at Microsoft.

AI agents: The digital sidekicks we never knew we needed!

--

Image created with ChatGPT.

The landscape of Artificial Intelligence is rapidly evolving, with significant advancements transforming the way we interact with technology. One of the most notable trends in the AI domain is the progression through various stages of intelligence. These stages delineate the path from basic AI functionalities to highly sophisticated autonomous systems.

Currently, Bloomberg categorizes OpenAI’s “Stages of Artificial Intelligence” into five distinct levels (as noted ):

  • Level 1: Chatbots
  • Level 2: Reasoners
  • Level 3: Agents
  • Level 4: Innovators
  • Level 5: Organizations

The AI community is currently full of developments in the Chatbots stage and is growing at the Reasoners stage, with OpenAI reportedly nearing a breakthrough in reasoning AI with GPT-4o1. As we stand at the peak of transitioning to the third level — Agents — we are poised to witness a new era of AI capabilities.

Why are Agents needed?

One of the most frequently asked questions in the context of generative AI is Why can’t we simply develop a single solution that addresses all conceivable tasks? The desire for a unified, all-encompassing system stems from the frustration of having to rely on multiple, often disparate, (RAG) models for every distinct use case. Each RAG model is typically designed to excel at a specific task, which complicates the user experience and limits its efficiency.

What are AI-based agents?

Agents serve as sophisticated intermediaries that can manage and coordinate multiple models, providing a seamless user experience through a single-entry point. They are designed to integrate various specialized RAG models and other AI functionalities, orchestrating them to work harmoniously to achieve complex objectives. This not only simplifies the interaction process but also enhances the overall system’s scalability and adaptability.

I like to explain the agents as the sum of four parts and how this resembles humans:

  • Agents = LLM + Memory + Planner + Skills/Tools
  • Humans = Language + Memory + Reasoning + Capabilities

Using this analogy:

  • The LLM is the language power, the ability that allows us to interact in natural language with our agent.
  • Memory allows us to save sessions and to remember previous conversations so that we learn from them and can base our new answers on them.
  • The planner provides the ability to reason, to organize, and to understand what the agent must do; it represents the ability to cut into pieces what has been asked and to provide a chain of thoughts.
  • The skills or tools are the specific actions that our agent can execute. As not every human can act or execute the same type of actions, agents behave the same way. Some agents have specific capabilities such as sending an email, executing code, writing content in a database, or opening a support ticket.

Current landscape

You can create an agent from scratch but, despite agents being quite new, there are already quite a lot of frameworks that can simplify the experience; for example, Langchain, AgentVerse, Assistants API, and CrewAI, among others, as well as some that are Microsoft-specific such as AutoDev, AutoGen, MemGPT, GraphRAG, Promptflow, Semantic Kernel or Taskweaver.

In previous articles, I have talked about both AutoGen (Code cuisine: Whipping up gourmet menus with AutoGen | by Eva Jurado Cortés | Data Science at Microsoft | Medium and Code like a pro: A tour of the AutoGen SDK | by Eva Jurado Cortés | Data Science at Microsoft | Medium) and GraphRAG (GraphRAG vs. traditional RAG: Unveiling Avengers data secrets | by Eva Jurado Cortés | Data Science at Microsoft | Oct, 2024 | Medium). Since that time (in less than a year), both have undergone changes, newer versions of AutoGen are available, and we will have soon an experience that combines AutoGen with Semantic Kernel.

On the GraphRAG side of things, originally based only on Azure CosmosDB, we also have news of developing solutions using Azure Database for PostgreSQL thanks to the Apache AGE extension that includes graphs on the database ().

Still, all these solutions require developer experience and can be time consuming, so, I want to explore a new way of working with agents from a low-code perspective using Azure AI Agents.

Azure AI agents with a step-by-step example

Azure AI Agents are available in two formats: the User Interface (UI) and the Software Development Kit (SDK). To demonstrate how swiftly one can build an agent, let’s explore the UI option within .

1. Navigate to the Agents option: Begin by selecting the “New Agent” option.

2. Define Agent content: Specify the agent’s name, choose the Azure OpenAI resource and its deployment (for this example, I have selected GPT-4o to achieve optimal results), and provide a set of instructions to serve as a system prompt.

3. Utilize data sources and actions: This is where the process becomes both magical and straightforward. You have the ability to select data sources to ground your queries and also to define actions that the agent can execute. This capability transforms your agent from a simple Retrieval-Augmented Generation (RAG) model into one with skills or tools to interact with the real world.

4. Add knowledge sources: In the “Knowledge” section, you can integrate files, connect to an Azure AI Search index, link to a Fabric data agent (which offers access to any structured or unstructured data available in Fabric), access the entire Internet via Bing, or even connect to TripAdvisor. For this demonstration, I am grounding the agent with Bing Search.

5. Set up actions: You can enable a code interpreter or connect to any API using OpenAPI.

6. Start using your new agent: Once the agent is configured and tested in the playground, you can leverage your newly created sports-expert agent to engage in discussions in any language and retrieve original references. This streamlined process underscores the efficiency and versatility of building powerful AI agents with Azure AI Foundry.

Conclusions

As demonstrated, AI agents represent a significant leap forward in the evolution of Artificial Intelligence, embodying the transition from specialized, task-specific models to integrated, multifunctional systems. These digital sidekicks offer a seamless user experience by orchestrating multiple AI functionalities through a single-entry point, much like humans use their language, memory, reasoning, and capabilities in concert to navigate complex tasks.

With the advent of frameworks like Langchain, AgentVerse, and Microsoft-specific tools such as AutoGen and GraphRAG, the creation and deployment of AI agents are becoming more streamlined, even as we look forward to more accessible solutions like Azure AI Agents. As we commence this new era, the potential for AI agents to revolutionize our interactions with technology is immense, promising a future where AI is not just a tool, but an intuitive, integral part of our daily lives.

#Agents #Azure #AI

Eva Jurado Cortés is on .

Data Science at Microsoft
Data Science at Microsoft

Published in Data Science at Microsoft

Lessons learned in the practice of data science at Microsoft.

Eva Jurado Cortés
Eva Jurado Cortés

Written by Eva Jurado Cortés

Data&AI Technical Specialist @ Microsoft

No responses yet