О чём урок
In this cookbook, we will explore how to use Structured Outputs to build multi-agent systems.
Structured Outputs is a new capability that builds upon JSON mode and function calling to enforce a strict schema in a model output.
By using the new parameter strict: true, we are able to guarantee the response abides by a provided schema.
To demonstrate the power of this feature, we will use it to build a multi-agent system.
When using function calling, if the number of functions (or tools) increases, the performance may suffer.
To mitigate this, we can logically group the tools together and have specialized "agents" that are able to solve specific tasks or sub-tasks, which will increase the overall system performance.
The use case we will tackle is a data analysis task.
Let's first set up our 4-agents system:
- Triaging agent: Decides which agent(s) to call
- Data pre-processing Agent: Prepares data for analysis - for example by cleaning it up
- Data Analysis Agent: Performs analysis on the data
- Data Visualization Agent: Visualizes the output of the analysis to extract insights
We will start by defining the system prompts for each of these agents.
We will then define the tools for each agent.
Apart from the triaging agent, each agent will be equipped with tools specific to their role:
- Clean data
- Transform data
- Aggregate data
- Statistical analysis
- Correlation analysis
- Regression Analysis
- Create bar chart
- Create line chart
- Create pie chart
План урока
- Why build a Multi-Agent System?
- Environment set up
- Agents set up
- Data pre-processing agent
- Data analysis agent
- Data visualization agent
Урок входит в полный доступ. Полный текст и видео открываются после оплаты. Первые уроки каждого курса бесплатны.