How to Build Custom GPTs: A Step‑by‑Step Guide to Their Core Capabilities
This article walks through the ChatGPT interface for creating custom GPTs, explains configuring basic information, details the five built‑in tools—knowledge base, web browsing, DALL·E image generation, code interpreter, and external API actions—and demonstrates each with concrete prompts and screenshots.
GPTs Development Interface
In the ChatGPT UI, click your username at the lower left, select “My GPTs”, and you’ll see a list of all created GPTs. From here you can edit existing GPTs or click “Create a GPT” to start a new one.
The creation page is split into a left workspace for configuration and prompt writing, and a right preview area that shows changes instantly (preview conversations are not saved).
Basic Information Configuration
Name & Description
Each GPT needs a clear name and description so users instantly understand its purpose and main features.
Instructions (System Prompt)
The system prompt drives the GPT’s core logic. A structured prompt should include role definition, task description, execution conditions, and expected output format.
For detailed guidance on structured prompts, see the referenced article “ChatGPT 定制化进阶:四步成为 AI 对话高手”.
Conversation Starters
Quick start phrases can be configured to guide users into effective interactions from the first turn.
Core Abilities + Five Built‑in Tools
GPTs inherit fluent conversational ability from the underlying large language model. In addition, they provide five extensible tools that can be invoked automatically based on context, giving them agent‑like scheduling capabilities.
Knowledge (外挂知识库): Accesses private or up‑to‑date data beyond the model’s training cutoff.
Web Browsing (网页浏览): Retrieves real‑time information via Bing search.
DALL·E Image Generation (绘图功能): Generates images using OpenAI’s DALL·E 3 model.
Code Interpreter (代码解释器): Executes code in a sandbox, processes uploaded files, and returns results.
Actions (外部 API): Calls user‑defined external APIs to extend functionality.
Tool 1: Knowledge Base
1. Configuration
A demo GPT is created with a simple system prompt:
当用户提出问题时,仅在已上传的文件中寻找答案。如果在文件中找不到答案,请回复 “知识库里没有包含相关信息”。请严格遵守这一要求。The knowledge base is populated with the “Awesome AI” open‑source project referenced in a linked article.
Quick start phrases are also set for convenient testing.
Note: Markdown files (*.md) are not parsed well; rename them to *.txt for proper ingestion.
2. Demonstration
When a user asks a question, the GPT searches the uploaded files and replies based solely on that content. If the answer is absent, it returns the predefined “knowledge base does not contain relevant information” message. If needed, the GPT can fall back to other tools such as web browsing.
Tool 2: Web Browsing
Web browsing mitigates hallucinations by fetching live information via Bing. The demo GPT uses the following system prompt snippet:
* 如果用户发来一串英文单词,请查询维基百科,并基于维基百科的解释总结为一段 50 字左右的描述,回复给用户。The conversation screenshot shows the GPT retrieving and summarizing a Wikipedia entry.
Tool 3: DALL·E Image Generation
The demo GPT includes a prompt that handles image requests:
* 如果用户要求画一张图:
* 如果用户已经提供了作图的主题或描述,请执行该要求。画完以后不需要解释或总结。
* 否则,向用户询问作图的主题或描述,得到答案后执行该要求。画完以后不需要解释或总结。If the user supplies a clear description, the GPT generates the image directly; otherwise it asks for clarification, demonstrating a simple multi‑turn dialogue pattern.
Tool 4: Code Interpreter
The code interpreter creates a sandbox environment for each conversation, allowing file uploads, code generation, execution, and iterative processing (e.g., renaming files, format conversion, statistical analysis). The article references prior live demos for detailed usage.
Tool 5: External API (Actions)
1. Simple API Example
A status endpoint on the author’s server returns JSON with a data.status boolean and a message field for errors. Example response:
{
"code": 200,
"message": "请求成功",
"data": {
"status": true,
"env": true
}
}2. Defining an Action
The Action’s core field is the “Schema”, an OpenAI‑defined interface description. The author uses the “ActionsGPT” helper to generate a Schema from API documentation, then pastes it into the GPT configuration. The resulting Action is named getStatus and can be tested from the preview pane.
3. Invoking the Action in Prompts
Prompt snippet for calling the Action:
* 如果用户询问服务器状态如何,请调用 Action `getStatus`,并根据响应结果回复:
* 如果请求失败,则回复 “服务器连不上”。
* 如果成功响应,查看响应体中的 `data.status` 字段:
* 如果为 `true`,回复 “服务器正常运行”。
* 如果不为 `true`,则回复 “服务器故障”,并附上 `message` 的值。The demo shows the GPT querying the status API and returning the appropriate message based on the response.
Next Episode Preview
The author promises to cover security hardening for GPTs and how to publish them to the GPTs store in the upcoming article.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
