AI Application Development using Azure and OpenAI
OpenAI has revolutionized the way we interact and think about AI today. The ChatGPT democratized AI like anything happened before. People who studied Machine Learning, Statistics and Mathematics have been talking about it and working on finding new ways. Most of them were stuck in theory. Thus, making it inaccessible to most of us till ChatGPT swapped it away.
What ChatGPT did was build an easy interface for us to play with it. API played a key critical role, allowing developers to think about designing domain specific GenAI applications. People realized GPT model works best with certain limitations. It can’t be used with private data as-is. However, the RAG pattern revolutionized the OpenAI and its real use case.??
Amidst the flood of so-called AI enthusiasts, it is the developers who are still trying to find the holy grail of development. Talking to developers, one thing is clear that they have the skillset to call an API but to design the end of end application which can be used by end users is not yet clear.
In this series it is a humble effort to deal with the basic flow of building a GenAI-based web application which can be packaged and deployed as cloud native way.
Technologies used:
1)????? Azure OpenAI (OpenAI hosted in Azure)
2)????? Azure Container Registry
3)????? Azure Container Apps
YouTube Channel: https://www.youtube.com/c/TechTalksWriju?sub_confirmation=1
YouTube Playlist: https://www.youtube.com/watch?v=9bbNbukPT2Y&list=PLPIVZsyfpXt8oifc9GOnWS2AsOvllIEwK
GitHub Repo: https://github.dev/wrijugh/genai-application
This 9-part series covers the end-to-end development using Python as programming language. We have tried to build an application using OpenAI and containerized it for any standard container platform.
Below is the application architecture at a high level.
1 – Choices and Setting up the Development Environment
During development, you can choose your preferred integrated development environment (IDE) such as Visual Studio Code. Python is the programming language used here, and it works well on both Windows and Linux operating systems. You can configure the operating system on either physical or virtual machines. Additionally, the development environment can be hosted in development containers, or if using Linux, within the Windows Subsystem for Linux (WSL). There are many options available, allowing you to select based on legacy requirements and personal convenience. For this demo we have used GitHub Codespaces which makes our life simple and can be accessed via browser.
?
2 – Creating Azure Resources
Ideally, Azure resource creation for production should be managed through Infrastructure as Code (IaC). However, for the demo, we used the Azure Portal to navigate through the available options.
?
3 – Environment variables and Jupyter notebook
Jupyter notebook is a great way to explore the API call. We can test various API and their methods using it. When it looks fine, we may then build the Python class file to use it.
领英推荐
?
4 – Orchestration using LangChain and Prompt Template
OpenAI-based application development is not just about the Azure OpenAI we need other things to build it.
5 – Quick website using streamlit
Streamlit is a fantastic library to build a quick portal and can be packaged in a cloud-native fashion.
?
6 – Build and test the streamlit Webapp
Bringing the codes from Jupyter notebook to build the final application.
?
7 – Containerize the streamlit Webapp
Containerize the streamlit app and push the container to a container registry.
?
8 – Host the Containerized app to Azure
Finally host the containerized app to Azure.
?
9 – Making changes to the App
Making changes to the app and redeployment. In production we must adopt CI/CD like GitHub Actions.
Gen AI patent holder| Azure Architect @ Accenture | ITIL V4 certified| Working with Microsoft Fabric,Azure Open AI, Apache Airflow, Python and .NET Core
2 个月Awesome