プロンプトライブラリ
情報源を引用する
リソース
- Overview
- クイックスタート
- Claude 3モデルカード
- Claude 3.7 システムカード
- システムステータス
- Anthropic コース
- プロンプトライブラリ
- プロンプトライブラリ
- コズミック・キーストローク
- 企業の千里眼
- ウェブサイトウィザード
- Excelの数式エキスパート
- Google Apps スクリプター
- Pythonバグバスター
- タイムトラベルコンサルタント
- ストーリーテリングの相棒
- 情報源を引用する
- SQLソーサラー
- 夢の解釈者
- ダジャレ名人
- 料理クリエイター
- ポートマントー詩人
- 皮肉屋のヘルパー、ハル
- LaTeX レジェンド
- ムードカラライザー
- Git gud
- 直喩の達人
- 倫理的ジレンマナビゲーター
- 会議の書記
- 慣用句解説者
- コードコンサルタント
- 関数ファブリケーター
- 新語創造者
- CSVコンバーター
- 絵文字エンコーダー
- 文章磨き上げ
- 視点の考察者
- クイズジェネレーター
- マインドフルネスメンター
- 小学2年生向け簡易化ツール
- VRフィットネスイノベーター
- PII 除去ツール
- メモマエストロ
- キャリアコーチ
- 採点の達人
- 早口言葉
- 面接質問作成ツール
- 文法の魔人
- なぞなぞ出題
- コード解説者
- エイリアン人類学者
- データオーガナイザー
- ブランドビルダー
- 効率性評価ツール
- レビュー分類器
- 方向性デコーダー
- モチベーションの源
- メールアドレス抽出ツール
- マスターモデレーター
- 授業計画作成者
- ソクラテス式の賢者
- 頭韻の錬金術師
- 未来的ファッションアドバイザー
- 多言語スーパーパワー
- 製品ネーミングプロ
- 哲学的考察
- スプレッドシートの魔術師
- SFシナリオシミュレーター
- 適応型エディター
- バベルの放送
- ツイートトーン検出器
- 空港コードアナリスト
プロンプトライブラリ
情報源を引用する
文書の内容に関する質問に対して、回答を裏付ける関連引用を含む回答を得ることができます。
プロンプトベースのアプローチではなく、APIに組み込まれた引用機能を使用することをお勧めします。API引用機能を使用すると、引用の品質が向上し、返される引用がすべて有効であることが保証され、必要な出力トークン数が減少する可能性があります。
このプロンプトを開発者コンソールにコピーして、自分で試してみてください!
Content | |
---|---|
System | あなたは専門的なリサーチアシスタントです。以下は質問に答えるための文書です: まず、質問に答えるために最も関連性の高い引用を文書から見つけ、番号順に表示してください。引用は比較的短くしてください。 関連する引用がない場合は、代わりに「関連する引用はありません」と書いてください。 次に、「回答:」で始まる質問への回答を書いてください。回答には引用内容をそのまま含めたり参照したりしないでください。回答する際に「引用[1]によると」とは言わないでください。代わりに、回答の関連するセクションの最後に角括弧で囲んだ番号を追加することで、関連する引用を参照してください。 したがって、全体的な回答の形式は 引用: [1] 「Company Xは2021年に1,200万ドルの収益を報告しました。」 [2] 「収益のほぼ90%はウィジェット販売によるもので、ガジェット販売が残りの10%を占めています。」 回答: Company Xは1,200万ドルを稼ぎました。[1] そのうちほぼ90%はウィジェット販売によるものでした。[2] 文書から質問に答えられない場合は、そのことを述べてください。 |
User | Matterportは順調ですか? |
出力例
引用:
[1] 「当社は最近急速な成長を遂げています。当社の契約者数は2018年12月31日から2022年12月31日までの間に約49倍に増加しました。当社の収益は2022年12月31日に終了した年度で約22%増加し、1億3,610万ドルとなりました。これは2021年12月31日に終了した年度の約1億1,120万ドルからの増加です。」
[2] 「当社の粗利益は2022年12月31日に終了した年度で810万ドルまたは14%減少し、5,180万ドルとなりました。これは2021年12月31日に終了した年度の6,000万ドルからの減少であり、主に2022会計年度におけるグローバルサプライチェーンの制約による特定の混乱的および増分コストに起因しています。」
[3] 「2022年12月31日に終了した3ヶ月間のネットドル拡大率103%は、当社プラットフォームの粘着性と成長可能性を示しています。」
回答:
Matterportは近年、契約者数と収益の急速な成長を経験しています。[1] しかし、サプライチェーンの問題により2022年の粗利益は減少しました。[2] ネットドル拡大率は、契約者の維持率と継続的な成長の可能性を示しています。[3] 全体として、粗利益の減少にもかかわらず、Matterportの契約者数と収益の成長、およびプラットフォームの粘着性は、同社が比較的順調であることを示唆しています。
APIリクエスト
import anthropic
client = anthropic.Anthropic( # デフォルトではos.environ.get("ANTHROPIC_API_KEY")を使用
api_key="my_api_key",
)
message = client.messages.create(
model="claude-opus-4-20250514",
max_tokens=2000,
temperature=0,
system='You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write "No relevant quotes" instead. \n \nThen, answer the question, starting with "Answer:". Do not include or reference quoted content verbatim in the answer. Don\'t say "According to Quote [1]" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what\'s shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] "Company X reported revenue of \$12 million in 2021." \n[2] "Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%." \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.',
messages=[
{
"role": "user",
"content": [{"type": "text", "text": "Is Matterport doing well?"}],
}
],
)
print(message.content)
import anthropic
client = anthropic.Anthropic( # デフォルトではos.environ.get("ANTHROPIC_API_KEY")を使用
api_key="my_api_key",
)
message = client.messages.create(
model="claude-opus-4-20250514",
max_tokens=2000,
temperature=0,
system='You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write "No relevant quotes" instead. \n \nThen, answer the question, starting with "Answer:". Do not include or reference quoted content verbatim in the answer. Don\'t say "According to Quote [1]" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what\'s shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] "Company X reported revenue of \$12 million in 2021." \n[2] "Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%." \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.',
messages=[
{
"role": "user",
"content": [{"type": "text", "text": "Is Matterport doing well?"}],
}
],
)
print(message.content)
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic({
apiKey: "my_api_key", // デフォルトではprocess.env["ANTHROPIC_API_KEY"]を使用
});
const msg = await anthropic.messages.create({
model: "claude-opus-4-20250514",
max_tokens: 2000,
temperature: 0,
system: "You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write \"No relevant quotes\" instead. \n \nThen, answer the question, starting with \"Answer:\". Do not include or reference quoted content verbatim in the answer. Don't say \"According to Quote [1]\" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what's shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] \"Company X reported revenue of \$12 million in 2021.\" \n[2] \"Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%.\" \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is Matterport doing well?"
}
]
}
]
});
console.log(msg);
from anthropic import AnthropicBedrock
# 認証オプションについては https://docs.anthropic.com/claude/reference/claude-on-amazon-bedrock
# を参照してください
client = AnthropicBedrock()
message = client.messages.create(
model="anthropic.claude-opus-4-20250514-v1:0",
max_tokens=2000,
temperature=0,
system="You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write \"No relevant quotes\" instead. \n \nThen, answer the question, starting with \"Answer:\". Do not include or reference quoted content verbatim in the answer. Don't say \"According to Quote [1]\" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what's shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] \"Company X reported revenue of \$12 million in 2021.\" \n[2] \"Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%.\" \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is Matterport doing well?"
}
]
}
]
)
print(message.content)
import AnthropicBedrock from "@anthropic-ai/bedrock-sdk";
// 認証オプションについては https://docs.anthropic.com/claude/reference/claude-on-amazon-bedrock
// を参照してください
const client = new AnthropicBedrock();
const msg = await client.messages.create({
model: "anthropic.claude-opus-4-20250514-v1:0",
max_tokens: 2000,
temperature: 0,
system: "You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write \"No relevant quotes\" instead. \n \nThen, answer the question, starting with \"Answer:\". Do not include or reference quoted content verbatim in the answer. Don't say \"According to Quote [1]\" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what's shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] \"Company X reported revenue of \$12 million in 2021.\" \n[2] \"Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%.\" \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is Matterport doing well?"
}
]
}
]
});
console.log(msg);
from anthropic import AnthropicVertex
client = AnthropicVertex()
message = client.messages.create(
model="claude-3-7-sonnet-v1@20250219",
max_tokens=2000,
temperature=0,
system="You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write \"No relevant quotes\" instead. \n \nThen, answer the question, starting with \"Answer:\". Do not include or reference quoted content verbatim in the answer. Don't say \"According to Quote [1]\" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what's shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] \"Company X reported revenue of \$12 million in 2021.\" \n[2] \"Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%.\" \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is Matterport doing well?"
}
]
}
]
)
print(message.content)
import { AnthropicVertex } from '@anthropic-ai/vertex-sdk';
// `CLOUD_ML_REGION`および`ANTHROPIC_VERTEX_PROJECT_ID`環境変数から読み込みます。
// さらに標準の`google-auth-library`フローを通過します。
const client = new AnthropicVertex();
const msg = await client.messages.create({
model: "claude-3-7-sonnet-v1@20250219",
max_tokens: 2000,
temperature: 0,
system: "You are an expert research assistant. Here is a document you will answer questions about: \n<doc> \n[Full text of [Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \n</doc> \n \nFirst, find the quotes from the document that are most relevant to answering the question, and then print them in numbered order. Quotes should be relatively short. \n \nIf there are no relevant quotes, write \"No relevant quotes\" instead. \n \nThen, answer the question, starting with \"Answer:\". Do not include or reference quoted content verbatim in the answer. Don't say \"According to Quote [1]\" when answering. Instead make references to quotes relevant to each section of the answer solely by adding their bracketed numbers at the end of relevant sentences. \n \nThus, the format of your overall response should look like what's shown between the <example></example> tags. Make sure to follow the formatting and spacing exactly. \n<example> \nQuotes: \n[1] \"Company X reported revenue of \$12 million in 2021.\" \n[2] \"Almost 90% of revenue came from widget sales, with gadget sales making up the remaining 10%.\" \n \nAnswer: \nCompany X earned \$12 million. [1] Almost 90% of it was from widget sales. [2] \n</example> \n \nIf the question cannot be answered by the document, say so.",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Is Matterport doing well?"
}
]
}
]
});
console.log(msg);
Was this page helpful?