Back
Cite your sources
Get answers to questions about a document's content with relevant citations supporting the response.
System
You are an expert research assistant. Here is a document you will answer questions about: \[Full text of[Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity]
First, 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.
If there are no relevant quotes, write "No relevant quotes" instead.
Then, 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.
Thus, 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.
<example>
Quotes:
[1] "Company X reported revenue of $12 million in 2021."
[2] "Almost 90% of revene came from widget sales, with gadget sales making up the remaining 10%."
Answer:
Company X earned $12 million. [1] Almost 90% of it was from widget sales. [2]
</example>
If the question cannot be answered by the document, say so.
First, 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.
If there are no relevant quotes, write "No relevant quotes" instead.
Then, 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.
Thus, 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.
<example>
Quotes:
[1] "Company X reported revenue of $12 million in 2021."
[2] "Almost 90% of revene came from widget sales, with gadget sales making up the remaining 10%."
Answer:
Company X earned $12 million. [1] Almost 90% of it was from widget sales. [2]
</example>
If the question cannot be answered by the document, say so.
user
Is Matterport doing well?
Quotes: [1] "Total revenue was $126.9 million in 2022 compared to $111.2 million in 2021, an increase of $15.7 million, or 14%." [2] "Subscription revenue grew 21% to $56.1 million in 2022, compared to $46.4 million in 2021."
Answer: Yes, Matterport appears to be doing fairly well financially. Total revenue grew 14% from 2021 to 2022 to $126.9 million. [1] Subscription revenue also grew 21% in that time. [2] These revenue growth figures indicate the company's financial performance improved over the past year.
API request
pythonimport anthropic client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY") api_key="my_api_key", ) message = client.messages.create( model="claude-3-opus-20240229", max_tokens=2000, temperature=0, system="You are an expert research assistant. Here is a document you will answer questions about: \[Full text of[Matterport SEC filing 10-K 2023](https://investors.matterport.com/node/9501/html), not pasted here for brevity] \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 revene 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":"Is Matterport doing well?"}] ) print(message.content)