Browse Courses

Agent Usage

This module explores the shift from monolithic models to compound AI systems highlighting how integrating models with tools and databases enables more flexible, accurate, and adaptable solutions for real-world tasks.

This document explains the evolution from monolithic AI models to compound AI systems, demonstrating how combining models with programmatic components and external data sources enables more accurate, adaptable, and context-aware solutions for complex tasks.


From Monolithic Models to Compound AI Systems

Traditional AI models are limited by the data they are trained on and are difficult to adapt to new tasks or information. Adapting such models requires significant investment in data and resources. For example, a language model cannot answer personalized queries, such as vacation days available for a specific user, without access to external data.


Integrating Models with Tools and Databases

The true potential of AI is unlocked when models are integrated into larger systems. By connecting a model to a database or external tool, it can retrieve relevant information and generate accurate, context-specific responses. This approach is known as a compound AI system, which is inherently modular and easier to adapt than monolithic models.

Example: Vacation Query System

A compound AI system can:

StepDescription
1. Receive QueryUser asks about available vacation days
2. Generate SearchModel creates a search query for the vacation database
3. Fetch DataSystem retrieves data from the database
4. Generate AnswerModel uses data to generate a personalized response

Programmatic Control Logic

Compound AI systems use programmatic control logic to determine the path a query follows. This logic can be designed by humans or, increasingly, delegated to large language models capable of reasoning and planning. The system can be set to follow strict instructions (“think fast”) or to break down complex problems and adjust its plan as needed (“think slow”).


Retrieval-Augmented Generation (RAG)

One popular type of compound AI system is retrieval-augmented generation (RAG), where the model retrieves relevant information from external sources before generating a response. This approach improves accuracy and adaptability but still depends on the design of the control logic.


Conclusion

Compound AI systems represent a significant advancement over monolithic models by enabling modularity, integration with external tools, and flexible control logic. These systems are better suited for real-world applications that require up-to-date, personalized, and context-aware solutions.


FAQ

  1. They are limited by the data they were trained on and are hard to adapt
  2. They can access any external database automatically
  3. They always provide correct answers to all queries
  4. They are modular and easy to update
(1) Monolithic models cannot access new data or adapt quickly without significant retraining.

The model will be unable to provide accurate, personalized, or up-to-date answers for queries requiring external or sensitive information.

TermDescription
A. Compound AI System1. Integrates models with programmatic components
B. Control Logic2. The path a program follows to answer a query
C. RAG3. Uses retrieval to augment model responses
D. Monolithic Model4. Standalone model trained on fixed data
A-1, B-2, C-3, D-4.

  1. They can combine models with databases and tools
  2. They always provide correct answers regardless of the query
  3. They use programmatic components to improve flexibility
  4. They are easier to adapt than monolithic models
(2) Compound AI systems can still fail if the control logic is not designed for the query type.

It allows for more flexible, modular, and accurate solutions by combining models with external tools and databases.

Compound AI systems are inherently modular and can be adapted more quickly than monolithic models.

True. Modularity enables faster adaptation and integration of new components.

The ability of the system to access and integrate relevant external data sources and tools should be checked first.

  1. Modular integration with external tools
  2. Limited to its training data
  3. Difficult to adapt quickly
  4. Standalone operation
(1) Monolithic models are not designed for modular integration.

Integrate a language model with the company’s vacation database and use programmatic control logic to fetch and generate accurate responses.