Generative AI, powered by large language models (LLMs), brings new opportunities for developers and organizations. Services like Azure OpenAI make AI easy to use with simple APIs. Developers of all skill levels can add advanced AI features to their apps without needing special knowledge or hardware.
As a developer, you might wonder what your role is and where you fit in. Maybe you want to know which part of the "AI stack" to focus on, or what you can build with today's technology.
To answer these questions, start by building a mental model that connects new terms and technologies to what you already know. This approach helps you design and add generative AI features to your apps.
In this series, we show how your current software skills apply to generative AI. We also introduce key terms and concepts to help you start building your first generative AI solutions.
How businesses benefit from using generative AITo see how your software skills fit with generative AI, first look at how businesses use it.
Businesses use generative AI to boost customer engagement, work more efficiently, and solve problems in creative ways. Adding generative AI to existing systems lets businesses improve their software. It can add features like personalized recommendations or smart agents that answer questions about a company or its products.
Common ways that generative AI helps businesses:
Content generation:
Natural language processing:
Data analysis:
As a developer, you can make significant improvements by adding generative AI features to the software your organization uses.
How to build generative AI applicationsAlthough the LLM does the heavy lifting, you build systems that integrate, orchestrate, and monitor the results. There's much to learn, but you can apply the skills you already have, including how to:
Developing generative AI solutions build on your existing skills.
Microsoft builds tools, services, APIs, samples, and learning resources to help you start with generative AI. Each one covers a key part of building a generative AI solution. To use these resources well, make sure you:
Thereâs no single right way to add generative AI features to your apps. You can choose from many tools and methods. Always weigh the pros and cons of each.
Start with the application layerYou donât need to know everything about generative AI to get started. You likely already have the skills you need. Use APIs and your current knowledge to begin.
You donât need to train your own LLM. Training an LLM takes too much time and money for most companies. Instead, use existing pretrained models like GPT-4o by making API calls to hosted services such as Azure OpenAI API. Adding generative AI features to your app is just like adding any other feature that uses an API.
You might want to learn how LLMs are trained or how they work. But fully understanding LLMs requires deep knowledge of data science and math, often at a graduate level.
If you have a computer science background, you know most app development happens at a higher layer in the technology stack. You might know a bit about each layer, but you probably focus on app development, using a specific language, platform, APIs, and tools.
The same idea applies to AI. You can learn the theory behind LLMs, but you should focus on building apps or creating patterns and processes for generative AI in your company.
Hereâs a simple view of the knowledge layers needed to add generative AI features to an app:
At the lowest level, data scientists do research to improve AI using advanced math like statistics and probability.
One layer up, data scientists use theory to build LLMs. They create neural networks and train them to accept prompts and generate results (completions). The process of generating results from prompts is called inference. Data scientists decide how the neural network predicts the next word or pixel.
Because training and running models takes significant computing power, most models are trained and hosted in large datacenters. You can train or host a model on your own computer, but itâs slow. Dedicated GPUs make this training faster and more efficient.
When models run in datacenters, you access them through REST APIs. SDKs often wrap these APIs to make them easier for developers. Other tools help with monitoring and other tasks.
App developers use these APIs to build business features.
Beyond calling models, new patterns and processes help organizations build reliable generative AI features. For example, some patterns help make sure generated content meets ethical, safety, and privacy standards.
If youâre an app developer, consider focusing on these app layer topics:
You can use low-code and no-code generative AI tools and services from Microsoft to help you build some or all of your solution. Various Azure services can play pivotal roles. Each contributes to the efficiency, scalability, and robustness of the solution.
API and SDKs for a code-centric approachEvery generative AI solution uses an LLM. Azure OpenAI gives you all the features in models like GPT-4.
Product Description Azure OpenAI A hosted service that gives you access to powerful language models like GPT-4. Use APIs to create embeddings, build chat features, and customize results to fit your needs. Execution environmentsYou need a service to run your business logic, presentation logic, or APIs for generative AI in your apps.
Product Description Azure App Service (or other container-based cloud services) Host web interfaces or APIs for users to interact with your RAG chat system. Quickly develop, deploy, and scale web apps. Easily manage the front end of your system. Azure Functions Use serverless compute for event-driven tasks in your RAG chat system. Trigger data retrieval, process user queries, or handle background tasks like syncing and cleanup. Build a modular, scalable back end. Low-code and no-code solutionsSome of the logic that you need to implement your generative AI vision can be built quickly and be hosted reliably by using a low-code or no-code solution.
Product Description Azure AI Foundry You can use Azure AI Foundry to train, test, and deploy custom machine learning models to enhance a RAG chat system. For example, use Azure AI Foundry to customize response generation or to improve the relevance of retrieved information.For guidance on building low-code solutions, see Low-code application development on Azure.
Vector databaseSome generative AI solutions need to store and retrieve data to improve results. For example, a RAG-based chat system lets users chat with your companyâs data. In this case, you need a vector database.
Product Description Azure AI Search Search large datasets to find information for the language model. Use it for the retrieval part of a RAG system to make responses more relevant and useful. Azure Cosmos DB Store large amounts of structured and unstructured data for the RAG chat system. Fast read and write speeds help serve real-time data and store user interactions. Azure Cache for Redis Cache frequently used information to reduce delays and speed up the RAG chat system. Store session data, user preferences, and common queries. Azure Database for PostgreSQL - Flexible Server Store app data like logs, user profiles, and chat history. Its flexibility and scalability keep your data available and secure.Each of these Azure services helps you build a scalable, efficient generative AI solution. They let you use the best of Azureâs cloud and AI features. For more information, see Choosing a Vector Database.
Code-centric generative AI development by using the Azure OpenAI APIThis section covers the Azure OpenAI API. You use a REST API to access LLM features. You can call these APIs from any modern programming language. Many languages have SDKs that make calling the API easier.
Here's the list of Azure OpenAI REST API wrappers:
If thereâs no SDK for your language or platform, make REST calls directly to the web APIs:
Most developers know how to call web APIs.
Azure OpenAI has several APIs for different AI tasks. Hereâs an overview of the main APIs:
This article focuses on text-based generative AI, like chat and summarization, but you can use these APIs for many types of media.
Get started developing with generative AIWhen you learn a new language, API, or technology, start with tutorials or training that show how to build small apps. Some developers prefer to learn by building their own small projects. Both ways work well.
Start small, set simple goals, and build your skills step by step. Generative AI development is different from traditional software. In regular software, you get the same output for the same input every time. With generative AI, you get different answers for the same prompt, which brings new challenges.
As you begin, keep these tips in mind.
Tip 1: Be clear about your goalTo try building a generative AI solution, start with Get started with chat by using your own data sample for Python. You can also find tutorials for .NET, Java, and JavaScript.
Final considerations for application designHere's a short list of things to consider and other takeaways from this article that might affect your application design decisions:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4