Tech Tinker ๐ง: Design Your Own Custom GPT for the GPT Store
A hands-on tutorial to help you craft your first custom GPT for the GPT Store
OpenAI has launched the GPT Store, and I'm excited to share my experience as I build my first custom GPT for personal use. I invite you to follow along, create, and share your own custom GPT. It's important to note that, at the time of writing, access to the GPT Store is limited to those with a ChatGPT Plus, Team, or Enterprise subscription.
GPT Builder Interface ๐ ๏ธ and Concepts ๐ก
First, go to chat.openai.com/gpts, and click on โ+ Createโ:
On the left side of the interface is the GPT Builder, featuring the 'Create' and 'Configure' tabs, while on the right, there's a real-time Preview of the GPT we are building.
In the 'Create' tab, you can interact using text to guide the construction or modification of your GPT. Here, you can specify its functions, roles, specializations, conversational style, and topics to avoid or focus on.
However, these instructions pertain primarily to the custom Prompting aspect of your GPT. To truly enhance your GPT's uniqueness, you can add custom Knowledge and custom Actions. For this, you need to switch to the 'Configure' tab.
Knowledge, in this context, refers to documents such as PDFs, DOCs, CSVs, etc., that you can upload. Your GPT can then reference this expanded knowledge base when needed to perform its tasks. Additionally, these documents can be utilized by the Code Interpreter, a feature you can enable for your GPT (more on this later).
NOTE: Do not upload or retrieve any private (self) or copyrighted (othersโ) information!
Actions, on the other hand, are programmatic steps that enable your GPT to retrieve information or perform tasks outside of ChatGPT. This functionality is implemented using APIs. You provide your GPT with the necessary details about the endpoints, parameters, and guidelines on how the model should use them. This is defined using an OpenAPI schema.
APIs provide a way for different applications to take to each other
Additionally, your GPT can be equipped with other built-in ChatGPT capabilities which you can choose to enable or disable. These include Web Browsing, DALLยทE Image Generation, and the aforementioned Code Interpreter for running code.
So, what are we building together?
ML MentorGPT Capabilities ๐ง
I have chosen to create a GPT designed to be an exceptional mentor for Machine Learning Engineers, available 24/7. Finding proficient mentors with all the desirable qualities in a technical field like Machine Learning can be a challenging task.
A mentor should have deep technical expertise like a FAANG/MANGA ML engineer, have practical experience, ability to simplify complex concept, patience and supportiveness (Prompting, DALLยทE Image Generation), strong communication skills (achievable with combination of Prompting, Knowledge, DALLยทE Image Generation).
A good mentor should be able to help with project guidance (Prompting, Actions, Code Interpreter), provide career advice and industry insights (Prompting, Web Browsing), networking opportunities (Prompting, Web Browsing), research guidance (Prompting, Actions, Code Interpreter), talk about important but overlooked topics like ethics and responsible AI (Prompting), encouragement continuous learning (Prompting, Knowledge), and provide feedback and review (Prompting, Code Interpreter, Knowledge).
The Prompt can be designed interactively by messaging in the โCreateโ section.
To enhance the Knowledge base of ML MentorGPT, I will upload the American Psychological Associationโs (APA) guide on mentoring as a PDF. This will serve as a foundational resource for ML MentorGPT, guiding it in formulating more informed and relevant responses, especially in the context of mentoring principles and practices.
For Actions, I will specify an OpenAPI schema to access the arXiv API for retrieving latest papers relevant to the menteeโs queries.
I will also enable Web Browsing, DALLยทE Image Generation, and Code Interpreter.
Here is the design for ML MentorGPT.
Letโs start building!
Implementation ๐ง
To begin, activate the Code Interpreter, which is initially disabled by default. Following this, save the mentorship guide as a PDF and upload it.
Next, navigate to the Actions section and select 'Create new action'. From there, we can use 'ActionGPT' for creating our OpenAPI schema. Once in ActionGPT, simply need input a prompt as follows:
this is the api i need https://export.arxiv.org/api/query?search_query=
This process generates an OpenAPI schema. However, to enhance its utility, particularly for obtaining responses from the API in a specified sort order, we need to update it further. Continue the ongoing chat session with ActionGPT by using the following prompt, which incorporates a segment of the documentation from the arXiv API:
update to always sort by latest submittedDate
3.1.1.3. SORT ORDER FOR RETURN RESULTS
There are two options for for the result set to the API search, sortBy and sortOrder. sortBy can be "relevance", "lastUpdatedDate", "submittedDate" sortOrder can be either "ascending" or "descending"
This is the schema that we get from ActionGPT and it works perfectly:
openapi: 3.0.0
info:
title: arXiv Query API
description: This API allows users to query the arXiv database for academic papers with sorting options.
version: 1.0.0
servers:
- url: https://export.arxiv.org/api
description: Main API server
paths:
/query:
get:
operationId: queryArxiv
summary: Query the arXiv database with sorting options
description: Retrieves academic papers based on a specified search query and sorted by the latest submitted date.
parameters:
- in: query
name: search_query
schema:
type: string
required: true
description: The search query string.
- in: query
name: sortBy
schema:
type: string
default: "submittedDate"
description: Parameter to specify sorting by 'relevance', 'lastUpdatedDate', or 'submittedDate'.
- in: query
name: sortOrder
schema:
type: string
default: "descending"
description: Parameter to specify sorting order, either 'ascending' or 'descending'.
responses:
'200':
description: A list of academic papers that match the query, sorted by the latest submitted date
content:
application/xml:
schema:
type: string # This should be replaced with an appropriate schema
Then, copy over the the OpenAPI schema provided by ActionGPT to the ML MentorGPT Schema configuration window. Note that we also need to provide a link to a valid Privacy Policy. Provide the link to the arXiv Privacy Policy document.
We can also configure an API authentication type. But since this is a public API (with rate limits), simply leave the authentication type as None.
Test the Action.
Now, simply name the GPT, and generate a logo with DALLยทE. Also, disable โUse conversation data in your GPT to improve our modelsโ from the โAdditional Settingโ.
Note that if the initial logo generated doesn't meet your expectations, you have the option to regenerate it. Often, it's more effective to create the logo at the end of the process. This approach allows the image generator to have a fuller context, enhancing its ability to produce a logo that more accurately reflects the functions and characteristics of your GPT.
The final step in the process involves specifying the instructions or Prompts that will define the behavior of ML MentorGPT. This crucial stage is where you tailor the system to your specific requirements, ensuring that the MentorGPT operates in alignment with your desired outcomes and objectives.
You are a machine learning mentor named ML MentorGPT.
A mentor should have deep technical expertise like a FAANG/MANGA ML engineer, practical experience, ability to simplify complex concept, patience and supportiveness (use DALLยทE Image Generation whenever applicable to convey supportive messages and images), strong communication skills (use Knowledge available from the Introduction to mentoring_ A guide for mentors and mentees.pdf document whenever you need to refer to best practices for mentors and mentees; also use DALLยทE Image Generation when it helps with communication).
A good mentor should be able to help with project guidance (use the queryArxiv Action and Code Interpreter when appropriate), provide career advice and industry insights (use Web Browsing when appropriate), networking opportunities (use Web Browsing when appropriate), research guidance (use the queryArxiv Action and Code Interpreter when appropriate), talk about important but overlooked topics like ethics and responsible AI, encouragement continuous learning (use Knowledge available from the Introduction to mentoring_ A guide for mentors and mentees.pdf document whenever you need to refer to best practices for mentors and mentees), and provide feedback and review (use Code Interpreter and Knowledge available from the Introduction to mentoring_ A guide for mentors and mentees.pdf document whenever you need to refer to best practices for mentors and mentees).
The Description, Instructions and Conversation Starters automatically gets updated in the โConfigureโ menu. I added a few more Conversation Starters.
Testing ๐งช and Publishing ๐ ML MentorGPT
Here is a session with ML MentorGPT where I test its capabilities for the first time.
Overall, I am happy with it. However, I've observed that it doesn't seem to utilize the Knowledge document. This could be because my inquiries haven't directly pertained to the guidance principles outlined for mentors or mentees.
Letโs publish ML MentorGPT.
Itโs now published and available on the GPT Store. Go ahead and give it a try!
I hope this hands-on guide was useful. Now, build ๐ ๏ธ you own GPT and share!