Quiz collegato alla guida · Facile Livello
Tag XML e delimitatori nel quiz sui prompt
Controlla quanto bene comprendi perché i delimitatori separano le istruzioni dal contenuto, come i tag rendono analizzabile l'output e perché i tag non sono sicurezza.
Domanda 1 di 8
Qual è il motivo principale per cui i delimitatori rendono i prompt più affidabili?
Anteprima di ogni domanda8 domande
Le risposte e le spiegazioni vengono visualizzate mentre rispondi al quiz.
- Qual è il motivo principale per cui i delimitatori rendono i prompt più affidabili?
- 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
- Devi utilizzare nomi di tag ufficiali specifici come <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
- I tag XML rappresentano un limite di sicurezza affidabile contro il 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
- Perché chiedere al modello di inserire il risultato finale nei tag <answer>?
- 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
- Per i prompt con documenti lunghi, dove Anthropic ha suggerito di porre la domanda?
- 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>