Generative AI and Agents
Table of Content
What is Generative AI?
Generative AI is a branch of AI. It lets a software application create new content.
The content can be:
- Natural language dialogs
- Images
- Video
- Code
- Other formats
Example: a website about the history of computing can have a chat. The user asks about people, technologies and events, and the chat gives an original answer.
How Does Generative AI Work?
The content is created by a language model. The model is trained with a huge amount of data, usually documents from the Internet or other public sources.
- The user talks to the model with prompts.
- A prompt is a statement or a question in natural language.
- The model uses the prompt to start generating a response.
- The model keeps the semantic relationships between words. It knows how the words relate to each other, so it can build a text that makes sense.
LLMs vs SLMs
| Large Language Models (LLMs) | Small Language Models (SLMs) | |
|---|---|---|
| Scope | Broad, they generalize well | Focused on specific domains |
| Cost | Higher to train and to run | Lower, more efficient |
| Best for | General-purpose tasks | On-device apps and local agents |
Reference for a family of SLMs:
Introducing Phi-3: Redefining what's possible with SLMs | Microsoft Azure BlogWe are excited to introduce Phi-3, a family of small open models offering groundbreaking performance, developed by Microsoft. Learn more.azure.microsoft.com
Reference for the Azure service that gives access to language models:
Foundry Models sold by Azure - Microsoft FoundryLearn about Microsoft Foundry Models sold by Azure, their capabilities, deployment types, and regional availability for AI applications.learn.microsoft.com
What Are Agents?
Agents are applications built on top of generative AI. An agent can:
- Reason over natural language and generate it.
- Automate tasks using tools.
- React to the context and take the right action.
An agent works like a digital assistant. It automates tasks and works together with the user.
The 3 Key Elements of an Agent
- Large Language Model.- The brain of the agent. It understands the language and reasons.
- Instructions.- A system prompt that defines the role and the behavior of the agent. It is like a job description.
- Tools.- What the agent uses to work with the world.
Types of Tools
- Knowledge tools.- Give access to information.
- Search engines
- Databases
- Action tools.- Let the agent do tasks.
- Send emails
- Update calendars
- Control devices
Reference for the Azure service to build agents:
What is Microsoft Foundry Agent Service? - Microsoft FoundryLearn about Microsoft Foundry Agent Service capabilities, agent types, tools, and runtime features for building AI agents.learn.microsoft.com
Common Use Cases
- Chatbots that answer questions or keep a conversation.
- AI assistants that automate tasks for the user.
- Creation of a new document or content, as a first version to improve later.
- Automatic translation between languages.
- Summary and explanation of complex documents.
Key Takeaways
- Generative AI creates new content using language models trained with a lot of data.
- Prompts are the main way to talk to a generative AI model.
- LLMs offer breadth. SLMs offer efficiency and are easier to deploy.
- An agent is an LLM + instructions + tools.
- Agents are the most useful real-world application of generative AI.
