NOTE: This article refers to the AI stack from the perspective of the generative AI landscape. The term “AI stack,” as used in this article, is interchangeable with “gen AI” or “generative AI stack.”
The AI stack combines integrated tools, libraries, and solutions to create applications with generative AI capabilities, such as image and text generation. The components of the AI stack include programming languages, model providers, large language model (LLM) frameworks, vector databases, operational databases, monitoring and evaluation tools, and deployment solutions.
The infrastructure composition of the AI stack uses parametric knowledge from the foundation models and non-parametric knowledge from information sources (PDFs, databases, search engines) to conduct generative AI functionalities like text and image generation, text summarization, and LLM-powered chat interfaces.
This article explores each component of the AI stack. Our objective is, that by the time you make it to the end of this piece, you will understand the current state of generative AI applications, including the tools and technologies used to develop them.
Are you technical? Great! This article will include some tools you are familiar with and introduce you to some new players within the AI ecosystem. Are you non-technical? Even better! AI isn’t the scary topic it used to be, and these days every business role, function, and department needs to understand the AI stack. Use this article as your guide.
What’s covered in this article:
- Introduction to the AI layer and Tech Stack
- The AI stack
- The Role of Programming Languages
- Model Providers: Open Source vs. Closed-Source
- Large Language Model (LLM) Frameworks
- Vector and Operational Databases
- Monitoring, Evaluation, and Observability
- Deployment Solutions for AI Applications
Introduction to the AI layer
“The AI layer is an enabling component of the modern application tech stack.”
We can understand a technology or “tech” stack as a collection of tools that integrate across several layers of application or system infrastructure to facilitate the development and deployment of software applications.
Simply put, a tech stack is a composition of tools that play nicely together.
Tools and technologies within the tech stack are divided into layers, which cover application concerns such as managing user interface and experience and handling data storage and processing. Other layer-specific concerns are business processing logic, security, and communication methods between layers (i.e., REST, SOAP, GraphQL, WebSockets).
Let’s break the tech stack down into its layers:
- Application layer: This is the main part of software applications. It covers the user interface (UI), user experience (UX), front-end creation, application accessibility, and more.
- Back end layer: This is also known as the “server-side” and manages the bulk of the application logic, including connecting to databases, setting up application programming interface (API), application authentication, and security.
- Data layer: All information from user and system interaction with an application requires storage alongside any business data that assists in the application's function. The data layer includes tools that handle the storage, retrieval, backup, and management of data that moves across the tech stack.
- Operational layer: Applications need to be deployed into a production environment, where considerations like maintenance, update schedule, automation, management, and optimization become crucial. The tools and technologies in this layer fall under the umbrella of “development operations” or “DevOps.”
The above is not an exhaustive list or description of the layers. We just need you to have a picture of the traditional tech stack and its composition. With advances in machine learning, deep learning, and AI, the AI layer has come into play and now has a permanent position within modern applications.
The AI layer is a new key part of the tech stack. It introduces intelligence across the stack through descriptive (data visualization) and generative (image and text generation) capabilities in the application layer, predictive analysis (behavior and trends) in the data layer, and process automation and optimization in the operational layer. Even the backend layer, responsible for orchestrating user requests to appropriate resources, has benefited from including the AI layer through techniques such as semantic routing. For completeness, semantic routing is the technique of distributing operations (network traffic, user requests) to receiving processes based on the meaning and intent of the task to be done and the receiving processor configurations and characteristics. This approach transforms the allocation of user requests from a programmatic concern to one outsourced to LLMs.
The effectiveness and importance of the AI layer in modern applications also reduce the roles and responsibilities of the application and data layers, which can blur the boundaries between them.
But in all this, the AI stack has emerged in software development.
The AI stack
The AI stack, as we define it in the world of generative AI applications, is still in its infancy, even at the time of writing in early 2024. This means that some parts of the stack have yet to consolidate into a selection of tools, libraries, and frameworks — opening doors for business and investment opportunities. At the same time, other components of the stack have developed to the point where there are industry best practices and leading tooling and cloud service providers.