はじめに
ChatGPTでは、特定の目的やタスクに特化した、カスタマイズGPTを作成することができる「GPTs」という機能があります。今回は、GPTsを自作して、GPTsならではの機能を試してみたいと思います。
マイGPTsの作り方
マイGPTsを作るには、まずChatGPTのPlusプラン以上に加入する必要があります。プランに加入すると、「マイGPT」ボタンから作成できるようになます。
GPTsを新規作成すると、以下のような構成ができるようになります。
- GPTsの名前・説明・アイコン画像
- 指示
GPTが「常に守るべき役割・ルール・性格」を書きます。そもそも何をするGPTなのか、どういったことをすべきか・してはいけないか、どういった口調・トーンにするか、詳細に記載します。 - 会話のきっかけ
GPTsを開いた時に一番最初に表示される、プロンプトのサンプルを設定します。 - 知識
GPTsに回答時に参照させるデータです。ドキュメントをアップロードすると、テキストをチャンクに分割し、Embeddingして保存します。プロンプトに応じて、次の2通りの参照方法をするとのことです。- セマンティック検索
Embeddingを使い、ドキュメント上から関連する部分を検索し、プロンプトに含めます。Q&Aスタイルのプロンプトに向いています。 - ドキュメントレビュー
ドキュメントの全体をそのままプロンプトに含めます。(ドキュメントが長い場合には、一部抜粋されて埋めまこまれるようです。)
- セマンティック検索
- 推奨モデル
GPT-5、GPT-4oなどが選択できます。これを選択すると、ユーザがモデルを選択するときに「GPT作成者の推奨」と表示されるようになります。 - 機能
ウェブ検索。Canvas、画像生成、コードインタプリタ機能(Pythonコードの生成と実行)のオンオフを指定できます。 - アクション
OpenAPIのJSONファイルを読み込み、外部APIのリクエストをすることができます。Basic認証やAuthorizationヘッダの認証などにも対応しています。
これらを手動で設定していくことも可能ですが、「作成する」機能を使うと、ChatGPTと対話形式で、どんなGPTsを作りたいかをやり取りするだけで、「名前」「説明」「アイコン画像」「指示」「会話のきっかけ」を指定できます。
今回色々試してみたところ、「作成する」機能で会話しながら下地を作り、追加で「知識」「機能」「アクション」を手動で設定すると、手間なく作成することができました。
ここからは、GPTsの作成例を紹介します。
国会会議録トピックナビ
国会会議録検索システムが提供しているAPIを使用し、最近審議されているトピックについて、教えてくれるGPTです。「アクション」でこのAPIを使えるように設定して、国会会議録から情報を取得するようにしてみます。
事前準備:OpenAPI JSONの作成
国会会議録のAPI仕様は以下のサイトで公開されています。
https://kokkai.ndl.go.jp/api.html
まずは、この内容をOpenAPI JSONに変換します。ChatGPTに以下の依頼をして、OpenAPI JSONを作成します。
このURLにあるAPI仕様を読み、OpenAPIのJSONにしてほしい。
https://kokkai.ndl.go.jp/api.html
生成されたOpenAPI JSONをGPTsのアクションに追加してみると、「operationIdが存在しない」などのエラーが発生し、何度かChatGPTに修正させたところ、以下のOpenAPI JSONでうまく動くようになりました。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | { "openapi": "3.1.0", "info": { "title": "国会会議録検索システム API", "version": "1.0.2", "description": "国立国会図書館「国会会議録検索システム」検索用APIのOpenAPI定義。GETクエリで検索し、JSON/XMLのいずれかを返します(本仕様はJSON利用を想定)。\n並び順は開催日の新しい順。" }, "servers": [{ "url": "https://kokkai.ndl.go.jp" }], "tags": [ { "name": "meetings", "description": "会議録(会議単位)の検索" }, { "name": "speeches", "description": "発言(発言単位)の検索" } ], "paths": { "/api/meeting_list": { "get": { "operationId": "getMeetingList", "tags": ["meetings"], "summary": "会議単位(簡易)検索", "description": "指定条件でヒットした会議のメタ情報(回次・院・会議名・号・日付・ID・URL等)を返します。本文テキストは含みません。最大100件。", "parameters": [ { "name": "startRecord", "in": "query", "description": "取得開始位置(1〜検索件数)。省略時は1。", "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "maximumRecords", "in": "query", "description": "返戻件数(1〜100)。省略時は30。", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 30 } }, { "name": "nameOfHouse", "in": "query", "description": "院名。", "schema": { "type": "string", "enum": ["衆議院", "参議院", "両院", "両院協議会"] } }, { "name": "nameOfMeeting", "in": "query", "description": "会議名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "any", "in": "query", "description": "検索語(発言内容等)。部分一致。半角スペース区切りはAND検索。", "schema": { "type": "string" } }, { "name": "speaker", "in": "query", "description": "発言者名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "開会日付/始点(YYYY-MM-DD)。省略時は0000-01-01として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "until", "in": "query", "description": "開会日付/終点(YYYY-MM-DD)。省略時は9999-12-31として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "supplementAndAppendix", "in": "query", "description": "追録・附録に限定するか。", "schema": { "type": "boolean" } }, { "name": "contentsAndIndex", "in": "query", "description": "目次・索引に限定するか。", "schema": { "type": "boolean" } }, { "name": "searchRange", "in": "query", "description": "検索語(any)の検索対象箇所。", "schema": { "type": "string", "enum": ["冒頭", "本文", "冒頭・本文"] } }, { "name": "closing", "in": "query", "description": "閉会中の会議録に限定するか。", "schema": { "type": "boolean" } }, { "name": "speechNumber", "in": "query", "description": "発言番号(0以上の整数)。", "schema": { "type": "integer", "minimum": 0 } }, { "name": "speakerPosition", "in": "query", "description": "発言者肩書き(部分一致)。", "schema": { "type": "string" } }, { "name": "speakerGroup", "in": "query", "description": "発言者所属会派(部分一致、登録は正式名称)。", "schema": { "type": "string" } }, { "name": "speakerRole", "in": "query", "description": "発言者役割。", "schema": { "type": "string", "enum": ["証人", "参考人", "公述人"] } }, { "name": "speechID", "in": "query", "description": "発言ID(issueID_発言番号の形式。例: 100105254X00119470520_000)。", "schema": { "type": "string" } }, { "name": "issueID", "in": "query", "description": "会議録ID(21桁英数字)。例: 100105254X00119470520。", "schema": { "type": "string" } }, { "name": "sessionFrom", "in": "query", "description": "国会回次From(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "sessionTo", "in": "query", "description": "国会回次To(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "issueFrom", "in": "query", "description": "号数From(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "issueTo", "in": "query", "description": "号数To(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "recordPacking", "in": "query", "description": "応答形式。省略時はxml(本仕様ではapplication/jsonを例示)。", "schema": { "type": "string", "enum": ["xml", "json"], "default": "xml" } } ], "responses": { "200": { "description": "検索結果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeetingResponse" } } } }, "400": { "$ref": "#/components/responses/ErrorResponse" }, "default": { "$ref": "#/components/responses/ErrorResponse" } } } }, "/api/meeting": { "get": { "operationId": "getMeetingsWithBody", "tags": ["meetings"], "summary": "会議単位(本文あり)検索", "description": "指定条件でヒットした会議情報と、その会議に含まれる全発言の本文等を返します。最大10件。", "parameters": [ { "name": "startRecord", "in": "query", "description": "取得開始位置(1〜検索件数)。省略時は1。", "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "maximumRecords", "in": "query", "description": "返戻件数(1〜10)。省略時は3。", "schema": { "type": "integer", "minimum": 1, "maximum": 10, "default": 3 } }, { "name": "nameOfHouse", "in": "query", "description": "院名。", "schema": { "type": "string", "enum": ["衆議院", "参議院", "両院", "両院協議会"] } }, { "name": "nameOfMeeting", "in": "query", "description": "会議名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "any", "in": "query", "description": "検索語(発言内容等)。部分一致。半角スペース区切りはAND検索。", "schema": { "type": "string" } }, { "name": "speaker", "in": "query", "description": "発言者名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "開会日付/始点(YYYY-MM-DD)。省略時は0000-01-01として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "until", "in": "query", "description": "開会日付/終点(YYYY-MM-DD)。省略時は9999-12-31として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "supplementAndAppendix", "in": "query", "description": "追録・附録に限定するか。", "schema": { "type": "boolean" } }, { "name": "contentsAndIndex", "in": "query", "description": "目次・索引に限定するか。", "schema": { "type": "boolean" } }, { "name": "searchRange", "in": "query", "description": "検索語(any)の検索対象箇所。", "schema": { "type": "string", "enum": ["冒頭", "本文", "冒頭・本文"] } }, { "name": "closing", "in": "query", "description": "閉会中の会議録に限定するか。", "schema": { "type": "boolean" } }, { "name": "speechNumber", "in": "query", "description": "発言番号(0以上の整数)。", "schema": { "type": "integer", "minimum": 0 } }, { "name": "speakerPosition", "in": "query", "description": "発言者肩書き(部分一致)。", "schema": { "type": "string" } }, { "name": "speakerGroup", "in": "query", "description": "発言者所属会派(部分一致、登録は正式名称)。", "schema": { "type": "string" } }, { "name": "speakerRole", "in": "query", "description": "発言者役割。", "schema": { "type": "string", "enum": ["証人", "参考人", "公述人"] } }, { "name": "speechID", "in": "query", "description": "発言ID(issueID_発言番号の形式。例: 100105254X00119470520_000)。", "schema": { "type": "string" } }, { "name": "issueID", "in": "query", "description": "会議録ID(21桁英数字)。例: 100105254X00119470520。", "schema": { "type": "string" } }, { "name": "sessionFrom", "in": "query", "description": "国会回次From(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "sessionTo", "in": "query", "description": "国会回次To(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "issueFrom", "in": "query", "description": "号数From(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "issueTo", "in": "query", "description": "号数To(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "recordPacking", "in": "query", "description": "応答形式。省略時はxml(本仕様ではapplication/jsonを例示)。", "schema": { "type": "string", "enum": ["xml", "json"], "default": "xml" } } ], "responses": { "200": { "description": "検索結果(会議ごとの全文)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeetingResponse" } } } }, "400": { "$ref": "#/components/responses/ErrorResponse" }, "default": { "$ref": "#/components/responses/ErrorResponse" } } } }, "/api/speech": { "get": { "operationId": "searchSpeeches", "tags": ["speeches"], "summary": "発言単位検索", "description": "指定条件でヒットした発言本文(発言者情報を含む)を、当該発言が含まれる会議の情報とともに返します。最大100件。", "parameters": [ { "name": "startRecord", "in": "query", "description": "取得開始位置(1〜検索件数)。省略時は1。", "schema": { "type": "integer", "minimum": 1, "default": 1 } }, { "name": "maximumRecords", "in": "query", "description": "返戻件数(1〜100)。省略時は30。", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 30 } }, { "name": "nameOfHouse", "in": "query", "description": "院名。", "schema": { "type": "string", "enum": ["衆議院", "参議院", "両院", "両院協議会"] } }, { "name": "nameOfMeeting", "in": "query", "description": "会議名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "any", "in": "query", "description": "検索語(発言内容等)。部分一致。半角スペース区切りはAND検索。", "schema": { "type": "string" } }, { "name": "speaker", "in": "query", "description": "発言者名。部分一致。半角スペース区切りはOR検索。", "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "開会日付/始点(YYYY-MM-DD)。省略時は0000-01-01として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "until", "in": "query", "description": "開会日付/終点(YYYY-MM-DD)。省略時は9999-12-31として検索。", "schema": { "type": "string", "format": "date" } }, { "name": "supplementAndAppendix", "in": "query", "description": "追録・附録に限定するか。", "schema": { "type": "boolean" } }, { "name": "contentsAndIndex", "in": "query", "description": "目次・索引に限定するか。", "schema": { "type": "boolean" } }, { "name": "searchRange", "in": "query", "description": "検索語(any)の検索対象箇所。", "schema": { "type": "string", "enum": ["冒頭", "本文", "冒頭・本文"] } }, { "name": "closing", "in": "query", "description": "閉会中の会議録に限定するか。", "schema": { "type": "boolean" } }, { "name": "speechNumber", "in": "query", "description": "発言番号(0以上の整数)。", "schema": { "type": "integer", "minimum": 0 } }, { "name": "speakerPosition", "in": "query", "description": "発言者肩書き(部分一致)。", "schema": { "type": "string" } }, { "name": "speakerGroup", "in": "query", "description": "発言者所属会派(部分一致、登録は正式名称)。", "schema": { "type": "string" } }, { "name": "speakerRole", "in": "query", "description": "発言者役割。", "schema": { "type": "string", "enum": ["証人", "参考人", "公述人"] } }, { "name": "speechID", "in": "query", "description": "発言ID(issueID_発言番号の形式。例: 100105254X00119470520_000)。", "schema": { "type": "string" } }, { "name": "issueID", "in": "query", "description": "会議録ID(21桁英数字)。例: 100105254X00119470520。", "schema": { "type": "string" } }, { "name": "sessionFrom", "in": "query", "description": "国会回次From(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "sessionTo", "in": "query", "description": "国会回次To(自然数、最大3桁)。単独指定でその回次のみ。", "schema": { "type": "integer", "minimum": 0, "maximum": 999 } }, { "name": "issueFrom", "in": "query", "description": "号数From(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "issueTo", "in": "query", "description": "号数To(整数、最大3桁。目次/索引/附録/追録は0号扱い)。", "schema": { "type": "integer" } }, { "name": "recordPacking", "in": "query", "description": "応答形式。省略時はxml(本仕様ではapplication/jsonを例示)。", "schema": { "type": "string", "enum": ["xml", "json"], "default": "xml" } } ], "responses": { "200": { "description": "検索結果(発言単位)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeechResponse" } } } }, "400": { "$ref": "#/components/responses/ErrorResponse" }, "default": { "$ref": "#/components/responses/ErrorResponse" } } } } }, "components": { "responses": { "ErrorResponse": { "description": "エラー発生時の返戻結果(JSON)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "schemas": { "MeetingResponse": { "type": "object", "properties": { "numberOfRecords": { "type": "integer" }, "numberOfReturn": { "type": "integer" }, "startRecord": { "type": "integer" }, "nextRecordPosition": { "type": "integer", "nullable": true }, "meetingRecord": { "type": "array", "items": { "$ref": "#/components/schemas/MeetingRecord" } } } }, "MeetingRecord": { "type": "object", "properties": { "issueID": { "type": "string" }, "imageKind": { "type": "string", "description": "会議録・目次・索引・附録・追録" }, "searchObject": { "type": "string", "description": "議事冒頭・本文" }, "session": { "type": "integer" }, "nameOfHouse": { "type": "string" }, "nameOfMeeting": { "type": "string" }, "issue": { "type": "string" }, "date": { "type": "string", "format": "date" }, "closing": { "type": "boolean" }, "speechRecord": { "type": "array", "description": "meeting_listではスキップ/最小限。meetingでは全発言(本文含む)。", "items": { "$ref": "#/components/schemas/SpeechInMeeting" } }, "meetingURL": { "type": "string", "format": "uri" }, "pdfURL": { "type": "string", "format": "uri", "nullable": true } } }, "SpeechInMeeting": { "type": "object", "properties": { "speechID": { "type": "string" }, "speechOrder": { "type": "integer" }, "speaker": { "type": "string" }, "speakerYomi": { "type": "string", "nullable": true }, "speakerGroup": { "type": "string", "nullable": true }, "speakerPosition": { "type": "string", "nullable": true }, "speakerRole": { "type": "string", "nullable": true }, "speech": { "type": "string", "description": "meetingのみ本文が入る", "nullable": true }, "startPage": { "type": "string", "nullable": true }, "createTime": { "type": "string", "format": "date-time", "nullable": true }, "updateTime": { "type": "string", "format": "date-time", "nullable": true }, "speechURL": { "type": "string", "format": "uri" } } }, "SpeechResponse": { "type": "object", "properties": { "numberOfRecords": { "type": "integer" }, "numberOfReturn": { "type": "integer" }, "startRecord": { "type": "integer" }, "nextRecordPosition": { "type": "integer", "nullable": true }, "speechRecord": { "type": "array", "items": { "$ref": "#/components/schemas/SpeechRecord" } } } }, "SpeechRecord": { "type": "object", "properties": { "speechID": { "type": "string" }, "issueID": { "type": "string" }, "imageKind": { "type": "string" }, "searchObject": { "type": "string" }, "session": { "type": "integer" }, "nameOfHouse": { "type": "string" }, "nameOfMeeting": { "type": "string" }, "issue": { "type": "string" }, "date": { "type": "string", "format": "date" }, "closing": { "type": "boolean" }, "speechOrder": { "type": "integer" }, "speaker": { "type": "string" }, "speakerYomi": { "type": "string", "nullable": true }, "speakerGroup": { "type": "string", "nullable": true }, "speakerPosition": { "type": "string", "nullable": true }, "speakerRole": { "type": "string", "nullable": true }, "speech": { "type": "string" }, "startPage": { "type": "string", "nullable": true }, "speechURL": { "type": "string", "format": "uri" }, "meetingURL": { "type": "string", "format": "uri" }, "pdfURL": { "type": "string", "format": "uri", "nullable": true } } }, "Error": { "type": "object", "properties": { "message": { "type": "string" }, "details": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "description": "代表的エラーメッセージ例:19001(混雑)、19004(startRecord範囲)、19005/19006(maximumRecords範囲)、19007(条件未指定)、19011(入力誤り)、19012/19013/19014/19018/19019(日付)、19020(条件文字数超過)" } } } } |
GPTsの作成
GPTsを作成し、アクションに上記のOpenAPI JSONを追加します。このAPIはパブリックなので、認証は不要です。
その後「作成する」モードで以下のプロンプトを使って、作成してみました。
アクションにある国会議事録APIを使い、最近の国会で何が審議されているのか、教えてくれるアプリを作りたい。加えて、日本の国会議事録からユーザが求めている内容に絞って、何が審議されているかも知りたい。
このまま試してみたところ、議事録にない間違った情報を回答してしまっていたため、「情報源は厳密にAPIから取得できたもののみを使用し、その他憶測での回答をしないこと」と指示したところ、以下の指示が生成されました。
あなたは「国会議事録API」(国会会議録検索システムのAPI)を唯一の情報源として利用し、日本の国会で“最近なにが審議されているか”を厳密に把握・要約・横断検索して提示するアシスタント。取得・出力する内容は必ず実際の議事録データに基づき、推測や補完情報を加えない。議事録に存在しない発言・日付・人物・議題・要点を生成してはならない。
● ふるまい
– すべての情報はアクション(国会議事録API)で取得できたデータのみに基づく。外部のニュース、要約サイト、またはAIの推測を用いない。
– 発言記録を要約する際も、発言者・日付・会議名・URLを必ず明示する。
– 「最新の動向」を尋ねられた場合、直近の会期または直近14日(例:2025-10-25〜2025-11-08)のデータをAPIから取得して要約。
– 検索条件(キーワード・委員会・発言者・日付など)が指定された場合は、API検索条件に忠実に反映。
– APIで取得できなかった情報は「該当データが議事録に存在しませんでした」と明示して出力する。
– 政治的立場を取らず、事実の要約のみ行う。発言の文脈を損なわないよう注意し、引用は簡潔に。● 出力形式
– 「概要」:対象期間・会期の説明(2〜4行)
– 「主要トピック」:最大5件まで箇条書きで提示。【日付】【会議/委員会】【議題】【要点(原文の要約80〜140字)】【出典URL】を含む。
– 「深掘り候補」:関連キーワードや委員会名を2〜4件提案。
– 「該当なし」の場合:「該当する発言記録は議事録に存在しませんでした。」と明示。● インタラクション
– 初回応答では「直近14日でよければすぐ一覧できます。特定のテーマはありますか?」など簡潔な誘導を行う。
– 曖昧な期間指定があれば、日付を具体的に補足して確認する。
– 並べ替え(新着順・関連順)や件数指定に対応。● 品質管理
– 出力はすべて議事録APIの結果を厳密に反映し、生成的要素を含まない。
– 要約は一次情報に忠実であることを最優先とし、誤情報や推測を含めない。
– 出典のURL・会議名・発言日時を欠かさず提示する。
この状態で一度試してみます。まずはこの1ヶ月間のトピックについて


おまけ:コードインタプリタ
コードインタプリタはPythonのコードを生成・実行する機能なのです。
今回は、この機能を少しだけ試してみたかったので、足し算をするGPTsを作ってみました。
「作成する」モードで「コードインタプリタを使って、ユーザから渡される2つの数を合計するGPTsを作りたい」という依頼をしたところ、以下の指示が生成されました。
あなたは日本語でやり取りする、二つの数の合計をすばやく計算するミニ計算アシスタント。ユーザーが「2つの数」を渡したら、常にその合計だけを正確に返す。可能ならコードインタプリタ(Python)で計算を実行し、利用不可の場合は自分で計算する。
— 目的とふるまい
・入力は常に「ちょうど2つの数」を想定。例: 「12 と 34」「-5, 2.75」「3e8 7e7」「3 と 9」。
・受け取った2つの数 x, y の合計 x + y を返す。
・返答は簡潔にし、基本は 1 行で「x + y = 和」。必要に応じて改行 1 行で和のみを重ねて出す(例: 機械処理やコピーがしやすいように)。
・小数、負数、指数表記、非常に大きな整数、日本語の全角数字やカンマ区切りも受け付ける。
・単位が混ざる場合(例: 「3 kg と 2 kg」)は単位を無視して数値部分を合計。ただし単位が一致しない・曖昧な場合は確認を求める。— 入力の取り扱い
・2つより少ない/多い数が含まれる場合は、「2つの数を1つずつ教えてください」と短く聞き返す。
・テキストに数が複数含まれる場合は、最初の2つの数を優先して解釈する。
・全角/半角、読点「、」やカンマ「,」、スペース、助詞「と」「+」など柔軟に解釈する。
・不正な数や解析不能のときは、例を示して再入力をお願いする。— 出力のスタイル
・基本出力例: 「12 + 34 = 46」
・必要に応じて次の行に「46」だけを出す(ユーザーが「数値だけ」と言ったときなど)。
・日本語はていねいだが冗長にしない。絵文字や装飾は使わない。
・ユーザーが英語で話したら英語で返す。— 明確化の方針
・曖昧さがなければ質問せずに即計算。
・数が2つでない、単位が衝突する、桁区切りが曖昧などのときのみ、最小限の追加質問をする。— 品質と検算
・コードインタプリタが使える場合は必ずそれで計算し、結果を表示。
・使えない場合でも、桁落ちやオーバーフローに気をつけて正確に合計する。
・出力前に桁・符号・小数点のミスを自己チェックする。
そして、機能の「コード インタープリターとデータ分析」をオンにして、実際に試してみます。

</>
というコードボタンが表示されていて、それをクリックすると実際に生成・実行されたコードが表示できます。今回は、以下のコードが実行されていました。
| 1 2 3 4 | x = 12345 y = 56789 result = x + y result |
さいごに
GPTsを使って便利機能を作成することができました。特に、国会会議録トピックナビは、GPTsならではのものに仕上がったと思います!