Open17
プロンプト

プロンプトについてメモ

Many typical best practices
- providing context examples
- making instructions as specific and clear as possible
- inducing planning via prompting to maximize model intelligence.

we recommend including three key types of reminders in all agent prompts
- Persistence
- Tool-calling
- Planning [optional]

基本戦略5つ:
- 具体的で明確な指示を与える
- エージェント機能には3つの重要指示を含める
- 長文脈では指示の配置に細心の注意を払う
- 思考連鎖(CoT)プロンプトで段階的思考を促す
- 構造化されたプロンプトテンプレートを活用する
プロンプト成功の鍵:具体的な例の提供、明確な役割と目標設定、適切な区切り文字の使用

エージェントプロンプトの黄金律:3つの必須要素
- タスク完了まで中断させない
- 推測せず、確認させる
- 思考プロセスの可視化

特にモデルの性能が向上する分野:
- 構造化された文書の解析
- 情報の再ランク付け
- 関連情報と無関係なコンテキストの区別
- コンテキストを使用した多段階推論
長文脈の場合、指示の配置がパフォーマンスに大きく影響します:
- 最適配置: 指示をコンテキストの前と後の両方に置く(最も効果的)
- 次善策: 指示を一か所だけにする場合は、コンテキストの前が効果的
- 避けるべき配置: コンテキストの後だけに指示を置くと効果が薄い
# 指示
[詳細な指示をここに...]
# 外部コンテキスト
[長い外部コンテキストをここに...]
# 指示の繰り返し(重要ポイントを強調)
[主要な指示の要約または繰り返しをここに...]

# 推論戦略
1. クエリ分析:
- 質問を細分化し、何が求められているかを明確にする
- あいまいな情報は提供されたコンテキストを参照して明確化する
- 質問の意図と範囲を特定する
2. コンテキスト分析:
- 潜在的に関連するドキュメントを広く選択(見落としを防ぐ)
- 各ドキュメントについて:
a. 関連性分析: クエリへの回答にどう関連するか詳細に分析
b. 関連性評価: [高、中、低、なし]の4段階で評価
3. 情報統合:
- 関連性が「中」以上のすべてのドキュメントを要約
- なぜそれらが最も関連性が高いのかを説明
- 情報間の矛盾や補完関係を分析
ステップを結構細かく指示するのか

GPT-4.1での一般的な失敗パターンとその回避法:
- 「必ず〜しなければならない」は時に逆効果
- サンプルフレーズの過剰使用
- 過剰説明

効果的なプロンプト構造の基本形
# 役割と目的
[モデルが担う役割と達成すべき目標を明確に定義]
# 指示
[全体的なガイダンスと主要な指示]
## サブカテゴリ1
[特定分野の詳細指示]
## サブカテゴリ2
[別の分野の詳細指示]
# 推論ステップ
[問題解決や回答作成の段階的なプロセス]
# 出力フォーマット
[期待される回答の構造と形式]
# 例
## 例1
[入力と期待される出力の具体例]
# コンテキスト
[関連する背景情報や参照資料]
# 最終指示
[ステップバイステップの思考を促す最後の指示]

boltのガイド

prompt enhanceボタンいいな。そのためだけに使ってみるのもアリ。
-
simple example of a 'good' prompt?
- You need to keep reminding it of important details!
- Being specific makes all the difference
- You need to be clear about:
- What you want users to do
- How it should feel
- What success looks like
- Break big changes into smaller pieces
- Think of AI as a helpful but forgetful assistant
- Success = Clear Communication + Understanding
- When stuck, ask yourself:
- Have I explained which part I'm changing?
- Am I assuming the AI remembers something?
- Have I described the end result I want?
Direct the model to focus on certain files or functions rather than the entire codebase
CursorとかVSCode拡張系と違って、全部見えるのがデフォルトだから、いかに範囲を絞るかみたいな話をしてる?

template
“I need a [type] application with:
Tech Stack:
- Frontend: React with TypeScript
- Styling: Tailwind CSS
- Auth: Firebase
- Database: [choice]
Core Features:
1. User authentication
2. [Main feature]
3. [Secondary features]
Start with the main page containing:
[Detailed page requirements]”
- Core Prompting Strategies
- Start with the Big Picture:
- Break Down into Pieces
- Design and Component Strategies
- Adapting Designs You Love
- 好きなデザインの画像を貼る
- Style Pattern Library
- Adapting Designs You Love
↑プロンプトサンプル(Cursor)

- Avoid Repeated Automated Error “Fix” Attempts
- Add Error Handling To Your Project
- console.log入れまくってAIに読ませろってこと?
- Leverage the Rollback Functionality
- boltってgitないの?
- Crawl, Walk, Run
- Use Specific and Focused Prompts
- Reduce the Size of your project
- マイクロサービスとかFE/BFFとかは有効ってことね
- ADVANCED USERS ONLY: .bolt/ignore
- Advanced Strategy: Reset the AI Context Window
- ん…?forkとかしないと全部一つの会話になるってこと?

tips
ピンクの象