Question 1easymultiple choice
Read the full Prompting and Context Engineering explanation →CCAO-F Prompting and Context Engineering • Complete Question Bank
Complete CCAO-F Prompting and Context Engineering question bank — all 0 questions with answers and detailed explanations.
{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<documents>\n<doc index='1'>The fiscal year ends in June.</doc>\n<doc index='2'>The budget is $5M.</doc>\n</documents>\nAnswer the question using the docs: When does the year end?"
}
]
}
]
}{
"tools": [
{
"name": "get_stock_price",
"description": "Retrieve current stock price",
"input_schema": {
"type": "object",
"properties": {
"ticker": {"type": "string"}
},
"required": ["ticker"]
}
}
],
"tool_choice": {"type": "auto"}
}{"error": "Invalid request: system prompt must be provided as a string"}SYSTEM: You are a helpful assistant. USER: What is 2+2? ASSISTANT: 4 USER: And what is the capital of France? ASSISTANT: Paris USER: What was my first question?
{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 1024,
"system": "You are a data analyst.",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Analyze this CSV: <data>id,val\n1,10\n2,20</data>",
"cache_control": {"type": "ephemeral"}
},
{
"type": "text",
"text": "What is the average value?"
}
]
}
]
}{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 200,
"messages": [
{
"role": "user",
"content": "Extract the user's name from this email: <email>From: John Doe <jdoe@example.com>...</email>"
},
{
"role": "assistant",
"content": "{ "name": ""
}
]
}{
"model": "claude-3-5-sonnet-20240620",
"system": "You are a data analyst.",
"messages": [
{"role": "user", "content": "Summarize the following: <data>...</data>"}
],
"max_tokens": 1024,
"temperature": 0.7
}