Skip to main content

10. 🧑‍💻How to build your own ChatGPT

· 6 min read
Heidi Steen

Please share


🗓️ Day 10 of #30DaysOfAzureAI

Build your own ChatGPT with Azure Cognitive Search + Azure OpenAI Service

Yesterday was about the Azure AI Hub, a treasure trove of Azure AI SDK samples. Today, hear from distinguished engineer Pablo Castro about how to build your own ChatGPT with Azure OpenAI and Azure Cognitive Search and how to integrate Azure OpenAI Service into your apps.

🎯 What we'll cover

  • How to build your own ChatGPT.
  • How to integrate Azure OpenAI Service into your apps.
  • How to sign up to Azure OpenAI Service.

Image banner for day 10

📚 References

🚌 Introduction

In today's post, distinguished engineer Pablo Castro covers two questions we hear most often:

  1. How do I build my own ChatGPT that uses my own data as the basis for its responses?
  2. How do I integrate Azure OpenAI Service into my application?

Building your own ChatGPT

Read the full article that addresses the question “How do I build something like ChatGPT that uses my own data as the basis for its responses?”

The image shows the architecture

View the companion video on YouTube

How to integrate Azure OpenAI Services into my apps

Scenario One: Converse with Minecraft

Transforming the surface area of an app might be easier than you think! In this video segment, Pablo shows us how he used Minecraft's extension APIs to integrate a conversational user interaction model to build in Minecraft.

The add-in module, named "conjure", collects a text input that's passed to Codex, transforming user intent into actionable code that Minecraft understands.

If your application supports plug-in or add-on modules, you can attach a module that accepts text prompts as inputs, and then pass that input to Codex to interpret the user intent. Codex returns native code that can then be processed by your application.

Scenario Two: Combine Content Discovery and Language Understanding to Create New Information

The next example combines the content discovery capabilities of Azure Cognitive Search with the language understanding of the GPT-3 model.

The premise is an app for a green energy company that helps users find the latest insights and developments by scanning content over large volumes of unstructured content from various sources.

  • Cognitive Search accepts a user query and returns a set of matching documents in order of relevance. Instead of returning the results to the user, it sends them to GPT-3 for more analysis.

  • GPT-3 takes the documents and composes better answers and insights using content from all of them.

In this example, the app calls Azure Cognitive Search to discover text-based documents related to the user's question. This step finds the matches, ranks the documents, and returns the most relevant candidates.

Graphical user interface Description automatically generated

But sometimes the best answer isn't in one document. By adding language understanding, the app can use GPT-3 to derive a new answer using the content from all of the matching documents. This isn't just a verbatim answer from one document, but a new answer from multiple documents.

Graphical user interface, text, application Description automatically generated

Key Takeaways and Next Steps

Now that you've seen a few examples, here are some next steps:

See how Microsoft integrates OpenAI into applications. You can catch these examples in the video.

  • Co-Pilot in the Power Platform lets you author Power Fx commands and automation flow without having to know or type the syntax.

  • M365's Microsoft Designer lets you use AI-generated images when creating visual content.

Sign up for Azure OpenAI to get core building blocks for production-grade applications, including hosting at scale, to enterprise-level security.

  • Call OpenAI from your code just like any other REST API.

  • Secure with strong authentication, role-based access control and the ability to configure virtual networks, private endpoints as you would for any Azure service.

Sign up for Azure OpenAI Studio to experiment and test your ideas before bringing them into your code. Watch this segment of the video for a walkthrough.

👓 View today's article

Today's article.

🙋🏾‍♂️ Questions?

You can ask questions about this post on GitHub Discussions

📍 30 days roadmap

What's next? View the #30DaysOfAzureAI Roadmap

🧲 Subscribe