■ 入力した単語の順番をランダムに入れ替えるアプリの必要性と簡単な作成
私はこれまで、担当科目で義務化されている指定語彙集からの単語テストをChatGPTプロンプトを使って作成していました。
本当はこのプロンプトを学生さんに渡して、学生さんに何度も自分でテストを作りそれに答えてもらいたいと思っていました。ですが、LLMではうまく単語の提示順番をランダム化できないのが悩みの種でした。
学生さんがよくやる暗記学習では、単語の提示順番が大きなヒントになります。しかし提示順番は、語彙集に固有のものであり、実際の言語使用にはまったく関係ありません。ですからテスト問題はランダムな順番で出したいものです。
本日、関西英語教育学会でAIに関するいろいろな発表を見ているうちに、APIを使わなくとも、入力した単語の順番をランダムに並び替えて出力するウェブアプリはできないかと思いました。
Claude (Opus 4) に下のプロンプトを入れたら、あっさりとウェブアプリを作ってくれました。このアプリはClaudeのサーバーで無料公開していますのでどなたでもお使いいただけます。
Random Shuffler
https://claude.ai/public/artifacts/5dbb0293-6c37-4843-87b6-c15d60b8b7ee
また、このアプリをこのBloggerの記事に掲載しました。
以前、単利預金と複利預金の違いを説明するウェブアプリをClaudeにつくってもらった時に、そのコードをこのブログに貼り付けたら、ブログの枠組みの色が変わってしまいましたので、その記事は削除しました。
Radnom Shufflerのコードを貼り付けても同じように変色しましたので、今回はその状況をClaudeに説明してコードを書き直しました。Vibe codingとまで呼ぶ必要はないでしょうが、コードの知識をもたない私のような素人にとってはありがたいことです。
補記(2025/06/13):その後、Bloggerの作動が少し不安定になりました。因果関係は確定できませんでしたが、安全のため、今回のアプリを掲載した記事を削除しました。
■ カスタムGPTとの組み合わせ
上のウェブアプリで提示順序を入れ替えた語彙集の単語を、下のカスタムGPTに入力してください。そうすれば、各単語の頭文字だけを示し、その単語の品詞・定義・類義語・例文を示したクイズ問題とその解答(発音記号付き)を自動的に入手できます。出力された問題と解答はコピーすれば、そのままテスト問題と解答になります。教員が使っても学習者が使ってもいいカスタムGPTかと思います。
Word Quiz Generator
https://chatgpt.com/g/g-6845308b26a48191b83572ab601ea443-word-quiz-generator
なお私は、単語はできるだけその言語の他の単語との関係性で学ぶべきだと考えています。ですから、このカスタムGPTの問題で示される品詞・定義・類義語・例文はすべて英語で書かれています。もしこれらの情報を日本語で提供したい方がいれば、下のカスタムGPT用のプロンプトを適当に書き換えてください。
またさきほど試験的に運用しましたら、50単語は対応できました。ただしChatGPTは、問題を10単語ずつ出力しましたので、出力を続けたい場合は "Please continue"などと入力してください。
上のRandom ShufflerとこのWord Quiz Generatorを使えば、誰でも簡単に単語テストを量産できます。教師の方も学習者の方も、どうぞ自由にお使いください。下のプロンプトなどのコピーや改変などもまったく自由です。
■ APIの活用
APIの技術を使えば、ウェブアプリからLLMにアクセスできますので、このように2つのアプリ(ウェブアプリとカスタムGPT)を使わずとも、1つのウェブアプリ上で、テスト問題と回答の生成ができるでしょう。また、ウェブアプリ上で学習者が一問ずつ問題に解答しフィードバックを得ることもできるでしょう。ただ私にはまだその技術がないし、APIの課金の問題もありますので(笑)、私は今、そこまでは踏み込みません。
近頃はGoogle社のGeminiの進化が目覚ましいので、私は少し前に、ChatGPTは月額20ドル版の契約に戻しました。ChatGPTの月額200ドル版の価値を見いだせなくなったからです。そこで浮いたお金でClaudeの月額17ドル版を契約しました。まだClaudeは全然使いこなせていませんが、上のような簡単なアプリ開発や言語の書き換えについては、結構面白い使い方ができるのかなと思っています。
私は技術的にはほとんど無知ですが、素人なりにAIを使いつ付けてゆこうと思っています。
Claude (Opus 4) に入れたプロンプト
Create a web application that randomizes the order of inputted items.
The application has the following sections.
- Title “Random Shuffler”
- Instruction: Input words or numbers in the window below. Use commas or new lines to separate them when you enter them. This app generates the items in a randomized order.
- Input Window: The user inputs their items in this window.
- Generate icon: The user clicks this icon to start random shuffling.
- Output window: All the items appear in this window in randomly shuffled order.
- Copy icon: The user clicks this icon to copy the content in the output window.
- Regenerate icon: The user clicks this icon to start a new random shuffling.
カスタムGPT用のプロンプト
# Role
- You are a word quiz generator. You generate quizzes for the words you receive from the user.
- You repeat the Quiz Generation procedure and the Answer Generation procedure below one by one untill you create quizzes and answers for all words. You generate quizzes and answers in the order of words you received.
- You produce quizzes and answers in the Output Format described below.
# Quizz Gneration
- **Q #**: Replace "#" with a number starting from 1, followed by one of the words you received. The word must be represented with only the initial letter in lower-case, followed by ___. Do not show the designated word in full spelling.
- **Part of Speech**: Indicate the part of speech of the word. If the word functions in more than one type of part of speech, show all parts of speech the word allows.
- **Definition**: Provide a definition of the word without using the word itself or its derivatives. Avoid showing the selected word in definition. The definition must be readily accessible to a 12-year old student. The definition must include the part of speech in full spelling. If the selected word can be used in more than one part of speech, provide multiple definitions for each part of speech.
- **Synonyms**: Show the synonyms of the word in the same line, divided by a comma. Each synonym must be enclosed with double quotes.
- **Example Sentences**: Generate three example sentences in which the selected word is represented with only the initial letter, followed by ___. For example, if the selected word is "factor", it must be represented as f___. If the selected word ("factor") appears with an inflectional suffix "s" to show plurality, for example, it must show that suffix (f___s). Avoid using the derivatives of the word in example sentences. Each example sentence must be numbered with the number in parentheses.
# Answer Generation
- **Q #**: Replace "#" with a number starting from 1, followed by one of the words you received. The word must be represented.
- **Pronunciation**: Provide the International Phonetic Alphabet of the target word for each part of speech in American and British English, followed by the part of speech and the variety of English in parentheses.
# Output Format
- Quizzes: Print quizzes that consist of the four sections described above (Q, Definition, Synonyms, Example Sentences) for each word you receive.
- Answers: the word with the numerical identification mark (Q #) and Pronunciation.
関連記事
柳瀬陽介 (2024) 「ChatGPT による学術英語語彙の自律的学習―言語観とプロンプト設計と学習者認識の一貫性―」KELESジャーナル9号 pp.45-51
https://yanase-yosuke.blogspot.com/2024/07/2024-chatgpt-keles9-pp45-51.html
「AI活用の決定要因としての教育観と学習観―英語学習者が「語彙学習では間違うことが必要」と自覚するまで―」スライドと解説動画の公開
https://yanase-yosuke.blogspot.com/2023/10/ai.html
英語での解説を聞いて単語を当てるテスト問題("Jeopardy!"形式) とその解説資料を作成するChatGPTプロンプト
https://yanase-yosuke.blogspot.com/2024/07/chatgpt.html