我們建議使用 API 中內建的引用功能,而非基於提示的方法。使用 API 引用功能將改善引用質量,確保所有返回的引用都是有效的,並可能減少所需的輸出標記數量。

將此提示複製到我們的開發者控制台中,親自嘗試!

內容
System你是一位專家研究助理。以下是你將回答問題的文件:
[完整的 Matterport SEC 10-K 2023 申報文件,為簡潔起見此處未貼上全文]

首先,找出文件中與回答問題最相關的引述,然後按順序編號列出。引述應相對簡短。

如果沒有相關引述,請寫「沒有相關引述」。

然後,以「回答:」開頭回答問題。不要在答案中逐字包含或引用引述內容。回答時不要說「根據引述[1]」。相反,僅通過在相關句子末尾添加方括號編號來引用與答案各部分相關的引述。

因此,你的整體回應格式應如 標籤之間所示。確保嚴格遵循格式和間距。
引述:
[1] 「X 公司在 2021 年報告收入為 1200 萬美元。」
[2] 「近 90% 的收入來自小部件銷售,而小工具銷售佔剩餘的 10%。」

回答:
X 公司賺取了 1200 萬美元。[1] 其中近 90% 來自小部件銷售。[2]


如果文件無法回答該問題,請說明。
UserMatterport 的表現好嗎?

範例輸出

引述:
[1] 「我們最近經歷了快速增長。從 2018 年 12 月 31 日到 2022 年 12 月 31 日,我們的訂閱用戶增長了約 49 倍。我們的收入在截至 2022 年 12 月 31 日的年度增加了約 22%,達到 1.361 億美元,而截至 2021 年 12 月 31 日的年度約為 1.112 億美元。」
[2] 「我們的毛利潤從 2021 年 12 月 31 日止年度的 6000 萬美元減少了 810 萬美元或 14%,降至 2022 年 12 月 31 日止年度的 5180 萬美元,主要歸因於 2022 財年全球供應鏈限制造成的某些破壞性和增量成本。」
[3] 「我們截至 2022 年 12 月 31 日的三個月期間的淨美元擴張率為 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)