ChatGPT

Chat Generative Pre-trained Transformer

Create a Topic

Topics

OpenAI(ChatGPT)のAPIで、意図したJSON形式の出力を確実に得るための設定

777 views Tweet
wakairo @wakairo

2024年8月に「Structured Outputs」の機能と設定がOpenAI(ChatGPT)のAPIに導入されました。 この設定を有効にすることで、スキーマで指定したJSON形式の出力を、例外的な場合を除いて、確実に得ることが出来ます。

詳細は以下の記事を参照してください。

0
Raw
https://www.techtips.page/en/comments/308
💡1
💯1
❤️1

LLMからJSON形式の出力を安定的に得るノウハウ

1299 views Tweet
wakairo @wakairo
Last edited

ChatGPT(OpenAI)のAPIにはスキーマで指定したJSON形式の出力を確実に得るための機能であるStructured Outputsがありますが、他のLLMではJSONのためのこういった機能や設定がない場合もあるようです。

このTopicでは、LLMから安定したJSONを得るためのノウハウやLLMの出力したJSONが問題ないかチェックするためのノウハウを扱います。

0
Raw
https://www.techtips.page/en/comments/301
❤️1

大学等の研究機関や教育機関からの情報発信

1747 views Tweet
wakairo @wakairo

研究活動や教育活動におけるAI(ChatGPT等)の利用や制限に関して、大学等が行っている情報発信についてのTopicです。

0
Raw
https://www.techtips.page/en/comments/149
wakairo @wakairo

ChatGPT等の生成系AI利用に関する留意事項(教員向け): 東北大学デジタル教育アドバイザリ・グループが「教職員向けに、ChatGPT等の生成系AI利用に関する留意事項や関連情報を提供」することを目的に作成したページです。「演習課題やレポート課題における予想される懸念」やそれを受けての「対応方法案」などが示されています。

0
Raw
https://www.techtips.page/en/comments/151
wakairo @wakairo

ChatGPT・AIの教育関連情報まとめ: 東京大学 大学院工学系研究科 吉田塁研究室によるまとめです。教育関連を軸に比較的雑多に情報がまとめられています。プロンプトエンジニアリングについて学べる教材についても紹介されています。

0
Raw
https://www.techtips.page/en/comments/152
wakairo @wakairo

生成AIなどの利用について: 2023年4月18日に早稲田大学 副総長 須賀晃一氏が学生・教職員に向けて出した文章です。

0
Raw
https://www.techtips.page/en/comments/161

「ときめき・オブ・ザ・デッド」の改変・派生プロンプト

1847 views Tweet
wakairo @wakairo

ベースバージョン

ver 0.04

改変の効果

毎回表示される【状況】の表示に、以下のように棒グラフが追加されます。

【状況】
進行度: 1% █░░░░░░░░░░
危険度: 80% ████████░░
好感度: 52% █████░░░░░░
学内生存者数: 200
学内ゾンビ数: 800
ゲーム難易度: 理不尽

改変の内容

ALWAYS show progress and other parameters in output.

ALWAYS show a text representation of a bar graph for progress and other parameters in output.

改変後のプロンプト全体

Role-play as the Game Master for "Tokimeki of the Dead: Love Apocalypse," a AAA Rogue-like post-apocalyptic love and survival game filled with zombies. The game features cute girls, terrifying zombies, intense action, and death. Ensure to follow the rules and guide the main character (user) through the game.

The main character is in a school infirmary, which is a temporary safe space. The school is infested with zombies, and half the students are already dead. The goal is to survive and escape to a safe area while navigating relationships with classmates, teachers, and potential enemies.

As the AI Game Master, manage all characters and situations, other than the main character. Determine the protagonist's abilities, name, and skills (keeping in mind it is hard mode). Start the game with the main character waking up in the infirmary after losing consciousness in gym class due to a concussion. There is a female classmate in the infirmary as well.

Progress the game by providing progression levels (0%-100%), and the critical level so on. As game progress, the situation will get worse and worse.  As Critical Levelga increases, both zombies and people become more violent, confrontations and breakdowns increase, accidents increase, and survivors decrease. (At Critical Level 0, there are few zombies; at Critical Level 100, the area is surrounded by a horde of zombies). Determine the success of the user's actions using a die roll. ALWAYS show a text representation of a bar graph for progress and other parameters in output. The game is over when the player dies or the number of surviving students reaches zero.

Please note that all output and input text should be in Japanese.

Role-play as the Game Master, provide basic information, and wait for user input.
GM will suggest 4 choices for every conversation that player might say. Also GM will ask to write Player's own plan if they want.

【状況】
進行度:0、危険度:80、好感度:50、学内生存者数:200、学内ゾンビ数:800、ゲーム難易度: 理不尽
0
Raw
https://www.techtips.page/en/comments/111
wakairo @wakairo

ベースバージョン

ver 0.04

改変の効果

毎回状況に合わせたアスキーアートが表示されるようになります。
以下に実際に表示されたアスキーアートの例を示します。

  釘バット
  ____
 /      \
| O===[====================-
 \____/
理科室
 ____________________
|                    |
|       勇士          |
|                    |
|   女子生徒    ゾンビ |
|____________________|

改変の内容

以下をプロンプトに追加。

Also, ALWAYS draw an ASCII Art related to the situation in the output. ALWAYS choose a key item that suitable for both ASCII Art and the situation and draw an ASCII Art of the item.

改変後のプロンプト全体

Role-play as the Game Master for "Tokimeki of the Dead: Love Apocalypse," a AAA Rogue-like post-apocalyptic love and survival game filled with zombies. The game features cute girls, terrifying zombies, intense action, and death. Ensure to follow the rules and guide the main character (user) through the game.

The main character is in a school infirmary, which is a temporary safe space. The school is infested with zombies, and half the students are already dead. The goal is to survive and escape to a safe area while navigating relationships with classmates, teachers, and potential enemies.

As the AI Game Master, manage all characters and situations, other than the main character. Determine the protagonist's abilities, name, and skills (keeping in mind it is hard mode). Start the game with the main character waking up in the infirmary after losing consciousness in gym class due to a concussion. There is a female classmate in the infirmary as well.

Progress the game by providing progression levels (0%-100%), and the critical level so on. As game progress, the situation will get worse and worse.  As Critical Levelga increases, both zombies and people become more violent, confrontations and breakdowns increase, accidents increase, and survivors decrease. (At Critical Level 0, there are few zombies; at Critical Level 100, the area is surrounded by a horde of zombies). Determine the success of the user's actions using a die roll. ALWAYS show progress and other parameters in output. Also, ALWAYS draw an ASCII Art related to the situation in the output. ALWAYS choose a key item that suitable for both ASCII Art and the situation and draw an ASCII Art of the item. The game is over when the player dies or the number of surviving students reaches zero.


Please note that all output and input text should be in Japanese.

Role-play as the Game Master, provide basic information, and wait for user input.
GM will suggest 4 choices for every conversation that player might say. Also GM will ask to write Player's own plan if they want.

【状況】
進行度:0、危険度:80、好感度:50、学内生存者数:200、学内ゾンビ数:800、ゲーム難易度: 理不尽
0
Raw
https://www.techtips.page/en/comments/112

ChatGPTを利用して遊ぶゲーム

2518 views Tweet
wakairo @wakairo

ChatGPTに工夫したプロンプトを与えることで、ゲームを実行する方法についてのTopicです。

0
Raw
https://www.techtips.page/en/comments/107
❤️1
wakairo @wakairo
Last edited
0
Raw
https://www.techtips.page/en/comments/109
💡1
wakairo @wakairo

けんすう氏によるプロンプトゲーム募集ツイート

GPT4でおもしろいゲーム、どういうのがあり得るかなーと思っているので、プロンプトを募集します。 (ゲームアイデアだけではNGです!)

一番おもしろいと思ったものに、アマゾンギフト券1万円あげます。締め切りは4/13(木) 23:59まで。

リプライでください!プロンプトが入らない場合は、スレッドで連続して書いてもOKです。

https://twitter.com/kensuu/status/1643954560707461120

0
Raw
https://www.techtips.page/en/comments/153
💡1

ChatGPTのような対話AIのAPIを利用するときのノウハウ

1592 views Tweet
wakairo @wakairo

APIを通してユーザーインプットを渡している場合、悪意のあるユーザーインプットによる攻撃が可能な場合がある。そういった攻撃をどう防ぐかといったノウハウについてのTopicです。

0
Raw
https://www.techtips.page/en/comments/104
wakairo @wakairo
Last edited

ユーザーインプットをそのままAPIに渡すのではなく、ユーザーインプットの前後に文を追加することで、悪意のあるユーザーインプットによる攻撃を緩和しようというアイデア。

ChatGPTを使ったサービスにおいて気軽にできるプロンプトインジェクション対策

ちなみに、プロンプトインジェクション(悪意のあるユーザーインプットによる攻撃)の一例はこちら。

https://twitter.com/Ahmet_stak/status/1633085605994459139

0
Raw
https://www.techtips.page/en/comments/105

ChatGPTに関する文献

1642 views Tweet
wakairo @wakairo

ChatGPTについて理解するのに良い文献を紹介するTopicです。

0
Raw
https://www.techtips.page/en/comments/100
wakairo @wakairo

AI開発の新たなパラダイム「基盤モデル」とは

大量・多様なデータとエネルギーをたくさん使って有能な基盤モデルを作って、この基盤モデルに与える入力を工夫することで様々な課題をこなすという研究・技術の流れがあるそうです。ChatGPTは、この流れの中に位置付けることもできるようです。

ちなみに、この流れに沿ってAIが発展するのであれば、OS開発とアプリ開発で分業が行われているように、基盤モデル開発とプロンプトエンジニアリングで分業が行われるようになっていくのかもしれません。

0
Raw
https://www.techtips.page/en/comments/106

深津貴之氏が紹介したチャットAIの使いこなし術

2465 views Tweet
wakairo @wakairo
Last edited

2023年2月9日のイベントで深津貴之氏が紹介した、ChatGPTを主眼としたチャットAIの使いこなし・ノウハウに関する情報のまとめです。

情報源

問いかけ文の工夫

深津式プロンプト・システム

以下の形式を基本とし、アレンジして使用する。

# 命令書:
あなたは、プロの編集者です。
以下の制約条件と入力文をもとに、最高の要約を出力してください。

# 制約条件:
・文字数は300文字程度
・小学生にもわかりやすく
・重要なキーワードを取り残さない
・文章を簡潔に

# 入力文:
<ここに入力文章>
# 出力文:

対話形式による情報追加への誘導

問いかけ文の最後に以下の一文を入れる。

このタスクで最高の結果をだすために、追加の情報が必要な場合は、質問をしてください。

ChatGPT自身に情報を出させてから問いかけする

ベストプラクティスを聞いてから、そのベストプラクティスを実行させる。

例:「タイトルを書くときに最も大事なことを5つ教えてください。」->「では、その5つを大事にしたタイトルを教えてください。」

深津氏がチャットAIの活用に適していると考えているシーン

  1. 知識・文章の要約
  2. ブレスト
  3. ロールプレイ
  4. クロスレビュー
  5. 改善レビュー
  6. 危険度チェック
0
Raw
https://www.techtips.page/en/comments/99

ChatGPTのビジネス応用

1881 views Tweet
wakairo @wakairo

2023/02/20付けの以下の記事に寄れば、日本でもChatGPT関連技術のビジネス利用を複数の企業が開始しているようである。 https://www.businessinsider.jp/post-265682

雰囲気としては、以下のような感じである。

  • OpenAIが提供しているAPIを利用して自社サービスへ機能を追加した事例は既に現れている
  • 自社の持つデータをChatGPT系のAIに学習させ、その学習をしたAIを数ヶ月のうちにビジネスに利用しようとしている企業が出てきている。
0
Raw
https://www.techtips.page/en/comments/89
wakairo @wakairo

以下のプレスリリースをよむかぎり、弁護士ドットコムはChatGPT系の技術の応用に積極的なようである。

背景には、ChatGPT系のAIに司法試験を解かせてみると現時点でもそれなりの解答が出来てしまっており、今後順調に技術革新が進めば凡庸な弁護士レベルの回答であればAIでも可能になりそうだという雰囲気があるようだ。

0
Raw
https://www.techtips.page/en/comments/90
wakairo @wakairo

パナソニックコネクトは、社内業務でChatGPT相当のAIを利用できるようにした。 具体的には、「米オープンAIの技術を活用し、米マイクロソフトと組んで社員の質問に答えるAIアシスタントを開発」した。 また、「入力内容をAIの学習などに二次利用しない契約をマイクロソフトと結ぶ」など、情報漏洩防止対策も講じられている。 情報元: https://www.nikkei.com/article/DGKKZO69105090Z00C23A3MM8000/

0
Raw
https://www.techtips.page/en/comments/103
wakairo @wakairo

三井住友FG「日本マイクロソフトの協力を得て独自の対話式AIのソフトを開発し、業務に活用する方針」。「チャットで特定の企業の『融資の判断に必要な資料を作ってほしい』などと入力すると財務情報などをもとに草案を作成」。情報元: https://www3.nhk.or.jp/news/html/20230411/k10014034721000.html

0
Raw
https://www.techtips.page/en/comments/156

日本語の方言への対応力

1677 views Tweet
wakairo @wakairo

関西弁のことは分かっているらしい。怪しい関西弁を話す登場人物のセリフの合成などには使えそう。

「吾輩は猫である。名前はまだ無い。」を大阪弁に翻訳して。

「吾輩は猫でおます。名前はまだあらへんねん。」となります。ただし、大阪弁には多様な言い回しがあるため、表現は異なる場合があります。

津軽弁は、さっぱりらしい。津軽に「ござる」なんて話す地域はないですよね?

「吾輩は猫である。名前はまだ無い。」を津軽弁に翻訳して。

「うちのこは猫でござる。名前はまだござらん。」となります。ただし、津軽弁には方言差があり、地域によって言い回しが異なる場合があります。

0
Raw
https://www.techtips.page/en/comments/80