Bài kiểm tra có liên kết hướng dẫn · Dễ dàng Cấp độ
Thẻ XML và dấu phân cách trong câu hỏi nhắc nhở
Kiểm tra xem bạn hiểu rõ lý do tại sao dấu phân cách tách hướng dẫn khỏi nội dung, cách thẻ làm cho đầu ra có thể phân tích được và tại sao thẻ không bảo mật.
Câu hỏi 1 của 8
What is the main reason delimiters make prompts more reliable?
Xem trước mọi câu hỏi8 câu hỏi
Câu trả lời và giải thích xuất hiện khi bạn làm bài kiểm tra.
- What is the main reason delimiters make prompts more reliable?
- They make the prompt shorter
- The model can tell where each part of the prompt starts and ends
- They switch the model into a special mode
- They reduce the price per token
- Do you have to use specific official tag names like <document>?
- Yes, only names from the provider's official list work
- Yes, and tags must be valid strict XML
- No, there is no official list, but you should use names consistently and refer to them
- No, and tag names should change on every request
- Are XML tags a reliable security boundary against prompt injection?
- No, text inside tags can still contain injection attempts that may succeed
- Yes, models ignore everything inside tags
- Yes, but only if tags are nested
- Only with the <secure> tag
- Why ask the model to put its final result inside <answer> tags?
- It makes the answer more accurate by default
- It lowers the cost of output tokens
- It hides the answer from the user
- It gives your code a reliable place to extract the result
- For prompts with long documents, where has Anthropic suggested placing the question?
- Before the documents
- At the end, after the documents
- Only in the system prompt
- Split across several messages
- What should you do if user-supplied text contains your own closing tag, such as </document>?
- Leave it, since models ignore it
- Delete the entire user input
- Escape or remove it so the input cannot break out of its section
- Add more opening tags
- Which delimiters does OpenAI's prompting guidance suggest, according to the guide?
- Triple quotes, Markdown headings or XML
- Only emoji markers
- Only JSON
- Line numbers
- How do tags express hierarchy, such as several documents that each have a source?
- By using capital letters
- By numbering each line
- By writing everything on one line
- By nesting, for example <document> elements inside <documents>