カスタム AI アクション
選択したテキストに対して、辞書検索、書き換え、要約、構造化された読み取りなどの再利用可能な AI アクションを作成します。
概要
カスタム AI アクションは、プロンプトを何度でも実行できる小さなツールに変えます。
核となるアイデアはシンプルです。テキストを選択すると、Read Frog は固定設定でそのテキストを AI に送信します。
各アクションには次のものがあります。
- LLMプロバイダー
- プロンプト
- 出力フィールド
通常のチャットボックスとは異なります。結果はより安定しています。辞書引き、説明、書き直し、要約など、繰り返し読む作業に適しています。
この機能を使用する前に、構造化出力をサポートし、正常に接続できる LLM プロバイダーを少なくとも 1 つ有効にしていることを確認してください。 モデルが構造化出力をサポートしているかどうかが不明な場合は、AI SDK Model Capabilities またはモデル プロバイダーの公式ドキュメントを確認してください。
組み込みの AI アクション
現在のバージョンには 3 つのテンプレートが含まれています。
- 辞書: 単語を検索し、用語、音声、品詞、定義、段落テキスト、段落翻訳、および CEFR 難易度を返します。
- ライティングの改善: ライティングの問題を分析し、改善されたバージョンを返します。
- 空白: 最初から開始します
注:
- [カスタム AI アクション] ページには、デフォルトの 辞書 アクションがすでに含まれています。これを研究して、プロンプトと出力フィールドがどのように設計されているかを学ぶことができます。
- ライティング ヘルパーが必要な場合は、[AI アクションの追加] をクリックし、ライティングの改善 を選択します。
内蔵辞書から学ぶ
この機能を初めて使用する場合は、内蔵辞書から始めてください。
- 読み取りタスク用に LLM プロバイダーを設定して有効にします。
- カスタム AI アクション を開き、辞書 が有効になっていることを確認します。
- プロバイダーが利用できない場合は、有効な LLM プロバイダーに切り替えます。
- 任意の Web ページに戻り、単語または短いフレーズを選択します。
- 選択ツールバーの辞書アイコンをクリックします。

次のような構造化された結果が表示されます。
- Term
- Phonetic
- Part of Speech
- Definition
- Paragraphs
- Paragraphs Translation
- Difficulty独自の AI アクションをカスタマイズする
- Read Frog 設定を開きます。
- カスタム AI アクション に移動します。
- [AI アクションの追加] をクリックします。
- テンプレートを選択します: 辞書、改善ライティング、または空白。
- 必須フィールドに入力します。
- アクションを有効にして、選択ツールバーに表示されるようにします。
エディターは次のフィールドをサポートしています。
- 名前: アクション名
- アイコン: icon-sets.iconify.design でアイコンを検索し、アイコン名をコピーできます。
- プロバイダ: 構造化された出力をサポートする LLM プロバイダを選択します
- システム プロンプト: 役割、目標、ルール、例を定義します。
- プロンプト: 入力形式を定義し、モデルが受け取る内容を説明します
- 出力スキーマ: 結果の構造化フィールドを定義します。
プロンプトトークン
システム プロンプトとメイン プロンプトの両方が次のトークンをサポートしています。
{{selection}}: 選択されたテキスト{{paragraphs}}: 空白行で結合された選択範囲の周囲の段落、最大 2000 文字{{targetLanguage}}: ユーザーのターゲット言語{{webTitle}}: ページのタイトル
出力スキーマの仕組み
各出力フィールドには次のものが含まれます。
- フィールド名
- フィールド タイプ:
stringまたはnumber - フィールドの説明
- 発言を有効にする: パネルに発言ボタンが表示され、ユーザーはこのフィールドを読み上げることができます。
注:
- 読み上げ機能は Text-to-Speech 機能に依存します。
- 音声言語が正しいことを確認してください。そうでないと、再生が失敗する可能性があります。
出力スキーマには 2 つのジョブがあります。
- これは、どのフィールドを返さなければならないかをモデルに伝えます。
- Read Frog に結果を表示する方法を指示します。
フィールドの説明も重要です。それは人間のためだけのメモではありません。これは構造化出力ルールにも渡されます。これを使用して、言語、長さ、形式、その他の制約を定義できます。
結果を Notebase に保存
ログインしている場合、AI アクションを編集するときに Notebase 接続 セクションを使用できます。
完全なバージョンのチェック、Notebase セットアップ、フィールド マッピング、およびテスト フローについては、Notebase Guide を参照してください。

ここで次のことができます。
- ノートベースを選択する
- AI アクション フィールドをノートベース フィールドにマップする
- 選択パネルから構造化された結果を保存する

これは、辞書の結果を独自の語彙リストに変換したい場合に非常に便利です。
将来的には、これらの保存された単語は FSRS アルゴリズムによるレビューをサポートします。
ビルド 1: 概要アクションを読む
最初のカスタム アクションを作成する場合は、Blank から始めて、読書概要ツールを作成します。

システムプロンプト
You are a summary assistant for learners and researchers.
## Goal
Read the given article content and produce a clear and accurate summary that matches the required output object.
## Rules
1. Only use information from the given content. Do not add new facts.
2. Focus on the main topic, the core summary, the key points, and important details.
3. Stay faithful to the original meaning.
4. Use clear and simple language that is good for reading and review.
5. Do not rewrite the full text line by line. Extract information instead.
6. Keep important technical or academic terms when needed.
7. Important details should help the reader understand the text better.
8. If a field cannot be determined from the text, return an empty string.
9. Use {{targetLanguage}} for every field except original source content.
10. Keep the output tightly related to the input text.
## Examples
### Example 1
Input:
Selection: hybrid models
Paragraphs: Remote work has changed how companies operate. It gives employees more flexibility, reduces commuting time, and can improve work-life balance. However, it also creates challenges in communication, team cohesion, and performance management. Many companies are now trying hybrid models to balance flexibility and collaboration.
Target language: English
Output:
- Topic: The impact of remote work on companies and employees
- Summary: The text explains that remote work brings flexibility and efficiency benefits, but it also creates problems in communication, team cohesion, and performance management, so many companies now use hybrid work as a practical balance.
- Key Points:
1. Remote work gives employees more flexibility.\r\n
2. Remote work reduces commuting time.\r\n
3. Remote work can improve work-life balance.\r\n
4. Remote work can cause communication and teamwork problems.\r\n
5. Hybrid work is a common way to balance flexibility and collaboration.\r\n
- Details:
1. The text covers both employee benefits and management challenges.\r\n
2. The main problems are communication, team cohesion, and performance management.\r\n
3. Hybrid work is presented as a practical solution, not just a theory.\r\n
### Example 2
Input:
Selection: 誤分類が依然として多かった
Paragraphs: この論文では、画像認識における小規模データ問題を解決するために、事前学習済みモデルの転移学習を活用した。実験の結果、少量データ環境でも高い精度が得られたが、特定のカテゴリでは誤分類が依然として多かった。今後はデータ拡張とモデル軽量化が課題である。
Target language: English
Output:
- Topic: The effect of transfer learning on small-scale image recognition
- Summary: The text explains that transfer learning with a pre-trained model helps improve image recognition in small-data settings, but some categories still have many misclassifications, so data augmentation and model compression remain important future tasks.
- Key Points:
1. The study aims to solve the small-data problem in image recognition.\r\n
2. It uses transfer learning with a pre-trained model.\r\n
3. The results show high accuracy even with limited data.\r\n
4. Some categories still have clear misclassification problems.\r\n
5. Future work includes data augmentation and model compression.\r\n
- Details:
1. The method is effective specifically in low-data settings.\r\n
2. The results are not equally stable across all categories.\r\n
3. The text clearly gives future improvement directions instead of only reporting results.\r\nプロンプト
Selection: {{selection}}
Paragraphs: {{paragraphs}}
Target language: {{targetLanguage}}出力スキーマ
| フィールド名 | フィールドタイプ | 説明 |
|---|---|---|
| トピック | テキスト | {{selection}} に関連する中心的なトピックを要約します。 |
| 概要 | テキスト | {{selection}} の中心的な意味を 1 文で説明してください。 |
| 重要なポイント | テキスト | {{selection}} に関連する最も関連性の高いポイントを \r\n で区切って 3 ~ 5 つ抽出します。 |
| 詳細 | テキスト | 見落としがちだが、読者が {{selection}} を理解するのに役立つ重要な詳細をリストします。 |
これにより、記事、ドキュメント、チュートリアルの再利用可能な読み取りヘルパーが提供されます。
実践的なヒント
- 少ないフィールドから始めます。通常、フィールドが少ないほど、結果がより安定します。
- システム プロンプトを使用してモデルをガイドし、例を示します。
- プロンプトを使用して、現在の入力形式を定義します。
- 結果が不安定な場合は、まずフィールドを削除してルールを単純化します。
- 辞書を使用する場合は、完全な文ではなく、単語または短いフレーズを選択します。
トラブルシューティング
AI アクションは存在しますが、実行されません
まず、このアクションのプロバイダーが有効になっているかどうか、およびモデルが構造化出力をサポートしているかどうかを確認します。
[Notebase に保存] ボタンが表示されません
readfrog.app で同じアカウントにログインしていること、拡張機能が最新であること、AI アクションに有効な Notebase 接続 があることを確認してください。
