The Future of AI: Unlocking the Power of Azure AI with the Book of AI

  • Thread starter Thread starter robchambers
  • Start date Start date
R

robchambers

Welcome to the next installment in our AI Futures blog series! I’m Rob Chambers, and in this post, I want to share how you can unlock the power of Azure AI with our recent efforts to create the Book of AI. This comprehensive guide provides developers with a wealth of resources, tutorials, and sample code for leveraging Azure AI services to build innovative solutions. Whether you’re new to AI or an experienced developer, the Book of AI has something for everyone.

robchambers_3-1726852261687.png


But before we dive into the details, let's back up a bit and talk about how we got here.



My Journey with AI​

Before joining Marco's team, I served as the Engineering Manager and Architect for our Developer Experiences team. My team and I designed and built the Azure AI Speech SDK, Azure AI Vision SDK, and even the new Azure OpenAI Service SDKs which were a close partnership between OpenAI and Microsoft. With nearly 30 years at Microsoft and almost 25 years dedicated to AI, I’ve seen technology evolve and make significant impacts. The last few years have been particularly exciting, witnessing AI's innovations such as Teams Live Captions, Universal Translation, AI-power meeting recaps, and Microsoft Copilot. Packaging these underlying capabilities into easy-to-use SDKs for developers across many programming languages, ecosystems, and platforms has been challenging - but also very rewarding.

Earlier this year, I moved over to Marco's AI Futures team to focus on next generation AI experiences, SDKs, and tools.

Members of Marco's team regularly meet with customers to understand their needs, which then shapes our approach to SDKs, services, tools, samples, and documentation. One of the standout aspects of our work recently is how we've used the power of OpenAI's GPT-4o model with the new Azure AI CLI to create the documentation for the Book of AI's site itself. This is a great example of building products and experiences for AI developers that satisfy typical developer needs by harnessing the power of AI itself.

No Code, No Content, No Problem​

Manually writing a complete website requiring tens of thousands of lines of text can be a daunting task. Having worked with AI for so long, I knew there had to be a better way to generate content for the Book of AI site. I wanted to create a site that was easy to maintain and update, with a focus on clear, concise documentation and code samples. I didn’t want to spend hours writing HTML and CSS for each page. I also wanted to ensure I could easily use AI to help me generate code and content for the site.

I decided to use a static site generator to simplify the process. I wanted a tool that would allow me to focus on content creation without worrying about the underlying structure of the site. I also wanted to leverage AI to generate code snippets and examples for the site, making it easier to provide comprehensive coverage of Azure AI services.

After evaluating several options, I chose to use MkDocs Material, a static site generator that allows content creation in markdown. This framework provided the flexibility and simplicity I was looking for, enabling us to focus on writing content rather than managing the site’s layout and design. And as you already know, LLMs are great at producing markdown text.

Leveraging the Power of AI​

I started by creating a basic structure for the Book of AI site using MkDocs Material. I then used the Azure ai CLI to generate code snippets and examples for the site. The CLI’s ability to use OpenAI Function Calling w/ pre-defined file system functions made it easy to focus on prompting the AI to generate the content I needed, without needing to copy/paste the generated content and save them to disk. If the prompt wasn't perfect, I could easily tweak it and re-run it to get the desired output. After each round of generation, I reviewed the content to ensure it met the quality standards I was aiming for.

A key part of this process was feeding the right context and the right prompts to the AI model. To solve the context problem, I created an OpenAI Assistant that contained all the source code from the CLI's repository:

Code:
github clone https://github.com/Azure/azure-ai-cli
ai chat assistant create --name MyCliAssistant --files "\*\*/*.cs"

Then, I used the ai CLI iteratively with different prompts to generate content for the site, using the Assistant I just created:

ai chat --built-in-functions --user-prompt @PROMPT1

When I wanted to run a specific LLM prompt across a series of files, I could iterate over a set of files easily:

ai chat --built-in-functions --user-prompt @PROMPT2--foreach var file in files @filelist.txt

The result is a comprehensive guide to Azure AI services that covers a wide range of topics, from basic concepts to advanced scenarios. The Book of AI site is packed with tutorials, examples, and best practices to help developers get started with Azure AI and build innovative solutions. Leveraging the power of AI to generate content for the site has been a game-changer, allowing us to create a rich, interactive experience for developers without writing a single line of code: 15k lines of markdown with only 5 days of work.

The Book of AI​

Now that you know how we built it, let's talk about what you can expect from the Book of AI. The site is organized into several sections, each focusing on a different aspect of Azure AI services. Here are a few highlights:
  • Get started with Azure AI services quickly and easily
  • Access Azure AI services without writing code, directly command line
  • Learn and experiment with AI concepts like LLMs, Speech, Agents, and more
  • Use Azure OpenAI Chat and Assistants, Azure AI Model Catalog, GitHub Models, ONNX, and Phi-3 models
  • Tutorials for beginners and experts, with in-depth sample code documentation
  • Dynamically generate code for your projects in C#, Go, Java, JavaScript, or Python
  • You can use the ai CLI on Windows, macOS, and Linux, or from VS Dev Container or GitHub Codespaces
You can even build your very own ChatGPT-style website using the Book of AI's tutorials:

ai dev new openai-chat-webpage-with-functions --javascript
robchambers_4-1726852528329.png



Call to Action​

In conclusion, the Book of AI is an essential resource for anyone looking to leverage the power of Azure AI. It's clear instructions, real-world examples, and comprehensive coverage make it a go-to guide for both beginners and seasoned developers. By following the tips and best practices outlined in the Book of AI, you’ll be well-equipped to create and deploy innovative AI solutions using Azure.

Ready to dive in? Start exploring the Book of AI today and unlock the full potential of Azure AI services. Stay tuned for more insights and tutorials in our AI Futures blog series!

https://thebookof.ai
GitHub - robch/book-of-ai: The Book of AI helps you learn everything you need to know to get started w/ Azure AI services and the Azure AI CLI (`ai`).
GitHub - Azure/azure-ai-cli: This repository is for active development of the Azure AI CLI. For consumers of the CLI, we suggest you check out The Book of AI at https://thebookof.ai

Continue reading...
 
Back
Top