Building Your GPT: A Guide to DIY Models

Dr. Jaber Kakar
6 min readMar 18, 2024

--

The world of artificial intelligence (AI) has seen remarkable advancements in natural language processing (NLP), specifically after OpenAI introduced ChatGPT, which is based on its Generative Pre-trained Transformer (GPT) models. A new functionality introduced by OpenAI allows users to create customized AI models, referred to as GPTs. In this blog post, we’ll explore how to create GPTs, discussing some (dis)advantages, costs, and considerations for privacy and data security.

ChatGPT — a prominent example of a chatbot
ChatGPT — a prominent example of a chatbot

A Gentle Overview of ChatGPT and GPTs

Fundamentals: Understanding Transformers and GPTs

Before discussing how to create your own GPT, let us first introduce the fundamentals:

  • What are transformers?
  • How are transformers related to ChatGPT?

Transformers, introduced in the famous research paper entitled “Attention is all you need” by Google scientists, are deep learning models primarily used in NLP. GPT, short for Generative Pre-trained Transformer, is a family of transformer-based language models created by OpenAI. These GPT models are pre-trained on extensive text corpora and can be fine-tuned for various NLP tasks.

ChatGPT is the respective conversational AI system that is based on the GPT-3 and GPT-4 models. This system is designed to provide support on a wide range of topics through a chat-based conversation. It seeks to provide harmless and honest answers based on the user’s query. For further details on generative AI including ChatGPT, consider reading our previous post.

Motivation behind Create Own GPTs

Building custom GPTs unlocks a plethora of great opportunities:

  • Personalized Virtual Assistants: Tailor a virtual assistant to suit your specific needs.
  • Task Automation: Automate repetitive tasks like responding to emails, boosting productivity.
  • Business Enhancement: Develop AI to enhance your business offerings and services.

Exploring GPTs

Free vs. ChatGPT Plus Plan

Upon logging into the ChatGPT application as ChatGPT Plus subscriber ($20/month), users can follow the “Explore GPTs” links, revealing many (public) GPTs created by various users, including the ChatGPT team (see screenshot below).

Explore GPT section

When considering creating your our own GPT, there are typically two options:

  • Option 1 (“No coding required”): Create your own GPT with OpenAI’s GPT Interface
  • Option 2: Create your own GPT with OpenAI’s API.

By clicking the “Create” button at the top right of the screen (we refer to the screenshot) enables you to create your own GPT based on Option 1. Option 2, on the other hand, requires a degree of programming proficiency and differs slightly in the approach. More details on Option 2 will be given in our next blog post.

Initial Considerations Before Creating Your Own GPT

Before creating your GPT, some initial thinking is often a good idea. After all, identifying goals and defining use cases for your custom GPT lays the foundation for developing a valuable solution for your intended users. Consider the following questions to develop a comprehensive understanding:

  • What specific problem do you aim to address, and which tasks do you intend your GPT to automate?
  • Who will use the GPT? Define the typical persona and use scenarios, along with the preferred tone of voice.
  • Which data sources or APIs do you plan to integrate?
  • What are the potential limitations and ethical considerations pertinent to your problem and GPT solution?
  • Which build option (Option 1/Option 2) aligns with your requirements?

Answering these questions not only guides the creation process but also helps in tailoring prompts to optimize your GPT for your specific use case.

Option 1 — Building Your Own GPT with OpenAI’s GPT Interface

Next, we describe the build process for Option 1 which includes 5 steps:

Step 1 — Initiate the Create Process

This step is only about clicking the “Create” button to launch the GPT creation interface. In this creation interface (shown below), the GPT Builder is used to help you in the creation process. Initially, it asks you to specifiy what kind of GPT you want to create (see below).

GPT creation interface
GPT creation interface

Step 2 — Prompt the GPT Builder

Next, we make use of our initial considerations by explaining the GPT builder on how we want our GPT to behave. Say, for instance, we are interested in creating a GPT that helps people suggest recipes for healthy food that can be cooked quickly and requires inexpensive ingredients, we could prompt the following to the GPT builder.

Let’s create a GPT that helps users create recipes for meals that are healthy, inexpensive and quick to prepare. The GPT should respond to the user’s wishes, cooking preferences and tastes and provide suitable dishes with the corresponding recipes. Users may have different prior knowledge about the respective dishes. Some users may not have cooked very often before.

Step 3 — Create a Name and Profile Picture

Based on the prompt, the GPT Builder proposes a name (e.g., “Recipe Wizard”) and a profile picture generated by DALL-E 3. While suggestions are made, users can provide feedback for potential improvements. The GPT Builder will respond to comments and offer alternative suggestions if necessary.

GPT Builder’s suggestions for profile name and picture
GPT Builder’s suggestion for name and profile picture

Step 4 — Configure Your Custom GPT

Navigate to the “Configure” tab to adjust (a) default instructions, (b) conversation starters and (c) upload relevant files or data sets to enrich your GPT’s knowledge base.

Screen for additional GPT configuration

To enhance the capabilities of your GPT, explore integration with external APIs through the “Actions” tab under the “Configure” menu. By connecting to external APIs, your GPT gains the ability to access real-time information, interact with various software, and can thus improve the response quality.

Step 5 — Publish Your GPT

Finalize the process by clicking “Save” to publish your custom GPT. You have the flexibility to publish the GPT with different access models: (i) Only me, (ii) anyone with a link, and (iii) everyone.

Publish your Custom GPT

Once published you many want to consider testing your GPT. In our specific case, we ask “Recipe Wizard” to suggest a quick and health lunch.

Testing the custom GPT “Recipe Wizard”

Privacy, Safety and Compliance of Custom GPTs

Creating custom GPTs comes with responsibilities:

  1. Ensuring Privacy and Safety: Implement measures to protect user data and monitor interactions for unintended outputs.
  2. Compliance with Usage Policies: Adhere to OpenAI’s usage policies to ensure ethical and legal use of GPT technology.

Conclusion

Creating custom GPTs with Open AI’s ChatGPT interface opens many possibilities for users interested in leveraging AI without extensive technical expertise. By following the outlined steps, users can create their own GPT to automate tasks, create digital assistants, or enhance business offerings. Setting clear goals and understanding use cases are important initial stages, ensuring the utilization of appropriate prompts to realize the desired GPT outcome. Make sure to read OpenAI’s usage policy to ensure the ethical and legal use of GPT technology. The future of custom GPTs is promising, with evolving capabilities and a vibrant community shaping the landscape.

In our next blog, we will delve into the process of creating GPTs programmatically through OpenAI’s API, offering a more flexible, alternative approach for those with coding expertise. Stay tuned as we explore this exciting avenue of GPT development.

Thanks for reading! If you want to learn more about Ethical Hacking and other topics such as AI, please subscribe to this blog.

--

--

Dr. Jaber Kakar

🔐 Cybersecurity Enthusiast | Ethical Hacker in the Making | Exploring the Digital Battlefield | Sharing Insights to Safeguard the Online Realm 🔐