Developers are advised to use XML tags instead of JSON to delimit retrieved documents within prompts for large language models like OpenAI's GPT-4.1 and Anthropic's Claude. Research from these companies indicates that JSON formatting performs poorly, leading to models struggling to differentiate sources and instructions. Using XML tags, or a similar distinct delimiter, helps models better parse complex inputs, improving accuracy and reducing source confusion. AI
IMPACT Improves RAG system accuracy by guiding developers on optimal prompt formatting for LLMs.
RANK_REASON The item provides practical advice on using LLMs, specifically regarding prompt engineering for RAG systems, citing recommendations from major LLM providers.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →