{"id":13467,"date":"2026-11-03T14:55:50","date_gmt":"2026-11-03T14:55:50","guid":{"rendered":"https:\/\/rewirenow.com\/?p=13467"},"modified":"2026-11-03T14:58:00","modified_gmt":"2026-11-03T14:58:00","slug":"should-you-write-your-prompts-in-xml-we-measured-it","status":"publish","type":"post","link":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/","title":{"rendered":"Should you write your prompts in XML? We measured it"},"content":{"rendered":"\n\n<div class=\"at-spacer at-spacer--6aeb98673049b\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb98673049b {\n    height: 80px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb98673049b {\n        height: 80px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb98673049b {\n        height: 60px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb98673049b {\n        height: 40px;\n    }\n}\n<\/style>\n<\/div>\n\n\n<section class=\"container-block   \"  style=\"\" >\r\n        <div class=\"block  container  container--default  width-under--mobile width-under--tablet width-under--laptop  wysiwyg\">\r\n        \n\n<p>By <em>Mirte Pruppers, project leader at Rewire. <\/em><\/p>\n\n\n\n<p><strong>In short:<\/strong> we gave two OpenAI models the same instructions in six formats, from plain English to XML. XML made each request about 16% larger and 11\u201312% more expensive than Markdown, without a measurable gain in accuracy. The difficulty of the task mattered far more than the format.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb9867307ef\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb9867307ef {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb9867307ef {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb9867307ef {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb9867307ef {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why we looked into prompt format<\/h2>\n\n\n\n<p>Open almost any production prompt that has grown beyond a few lines and you will find structure: XML tags around the rules, YAML blocks for the policy, JSON for the reference data. The common advice is that complex prompts belong in a structured format, and many teams follow it without a second thought.<\/p>\n\n\n\n<p>We review a lot of prompts, and the same question keeps coming up: <strong>does the format of a system prompt actually change what an LLM costs or how well it answers?<\/strong> A second question usually follows. Does wrapping inserted content in XML tags, Markdown headings or JSON help a model keep data apart from instructions, especially when that data contains instructions of its own?<\/p>\n\n\n\n<p>We didn&#8217;t have a firm answer ourselves, so we set up a controlled test to see what happens in one realistic setting.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb9867309e6\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb9867309e6 {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb9867309e6 {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb9867309e6 {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb9867309e6 {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How we tested it<\/h2>\n\n\n\n<p>We took a task many companies automate: <strong>checking expense claims against a written expense policy.<\/strong> We then wrote the same instructions in six formats: plain English, Markdown, XML, YAML, JSON and simple key-value pairs.<\/p>\n\n\n\n<p><strong>Only the format changed.<\/strong> A program generated all six versions from one source and checked that every rule, amount and name was identical. Everything else the model saw was exactly the same.<\/p>\n\n\n\n<p><strong>Easy and hard tasks.<\/strong> We built ten tasks, from a single approve-or-reject verdict to auditing batches of expenses and spotting unusual spending. The hard versions added the detail real policies have: around two dozen rules, foreign currencies, deadlines and exceptions.<\/p>\n\n\n\n<p><strong>A known right answer for every case.<\/strong> A program computed the correct answer for each example, so we could score the models objectively, including borderline cases such as exactly $500 versus $500.01.<\/p>\n\n\n\n<p><strong>Two OpenAI models, about 6,300 requests.<\/strong> Most went to the smaller, cheaper gpt-4o-mini (5,600 requests). We also ran the larger gpt-4.1 on a smaller sample (728 requests) to see whether the picture held.<\/p>\n\n\n\n<p><strong>Fair comparisons.<\/strong> Every example went through all six formats, so we compared the same question in six versions rather than different questions. And we scored &#8220;is the answer right?&#8221; separately from &#8220;is the output neatly formatted?&#8221;, because a strict format check can make a correct answer look wrong.<\/p>\n\n\n\n<p>Costs are based on the token counts the provider reported and its list prices.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb986730be0\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986730be0 {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986730be0 {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986730be0 {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986730be0 {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">In our test, XML used about 16% more input tokens<\/h2>\n\n\n\n<p>This is the clearest result, because token counts are exact. <strong>The same instructions written in XML made each request about 16% larger than in Markdown.<\/strong><\/p>\n\n\n\n<!-- Paste this whole block into a WordPress \"Custom HTML\" block. -->\n<style>\n  .rw-table-wrap {\n    width: 100%;\n    margin: 1.5em 0;\n    overflow-x: auto;\n    -webkit-overflow-scrolling: touch;\n  }\n  .rw-table {\n    width: 100%;\n    min-width: 520px;\n    border-collapse: collapse;\n    border-spacing: 0;\n    font-family: inherit;\n    font-size: 0.95em;\n    line-height: 1.4;\n    color: inherit;\n  }\n  .rw-table th,\n  .rw-table td {\n    padding: 0.6em 0.8em;\n    border: 1px solid rgba(128, 128, 128, 0.45);\n    text-align: left;\n    vertical-align: top;\n    background: transparent;\n  }\n  .rw-table thead th {\n    font-weight: 600;\n    background: rgba(128, 128, 128, 0.12);\n  }\n  .rw-table tbody th {\n    font-weight: 400;\n  }\n  .rw-table th:nth-child(n+2),\n  .rw-table td:nth-child(n+2) {\n    text-align: right;\n    font-variant-numeric: tabular-nums;\n  }\n  .rw-table-note {\n    margin: 0.6em 0 0;\n    font-size: 0.85em;\n    font-style: italic;\n  }\n  @media (max-width: 600px) {\n    .rw-table { font-size: 0.9em; }\n    .rw-table th,\n    .rw-table td { padding: 0.5em 0.6em; }\n  }\n<\/style>\n\n<div class=\"rw-table-wrap\" role=\"region\" aria-label=\"Input size and cost per million requests by prompt format\" tabindex=\"0\">\n  <table class=\"rw-table\">\n    <thead>\n      <tr>\n        <th scope=\"col\">Format<\/th>\n        <th scope=\"col\">Input size vs Markdown<\/th>\n        <th scope=\"col\">Cost per 1M requests, gpt-4o-mini<\/th>\n        <th scope=\"col\">Cost per 1M requests, gpt-4.1<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody>\n      <tr>\n        <th scope=\"row\">English<\/th>\n        <td>\u22128.7%<\/td>\n        <td>$184<\/td>\n        <td>$2,491<\/td>\n      <\/tr>\n      <tr>\n        <th scope=\"row\">YAML<\/th>\n        <td>\u22124.5%<\/td>\n        <td>$189<\/td>\n        <td>$2,589<\/td>\n      <\/tr>\n      <tr>\n        <th scope=\"row\">Key-value<\/th>\n        <td>\u22123.7%<\/td>\n        <td>$192<\/td>\n        <td>$2,619<\/td>\n      <\/tr>\n      <tr>\n        <th scope=\"row\">Markdown<\/th>\n        <td>reference<\/td>\n        <td>$195<\/td>\n        <td>$2,660<\/td>\n      <\/tr>\n      <tr>\n        <th scope=\"row\">JSON<\/th>\n        <td>+4.0%<\/td>\n        <td>$200<\/td>\n        <td>$2,760<\/td>\n      <\/tr>\n      <tr>\n        <th scope=\"row\">XML<\/th>\n        <td>+15.8%<\/td>\n        <td>$216<\/td>\n        <td>$2,972<\/td>\n      <\/tr>\n    <\/tbody>\n  <\/table>\n  <p class=\"rw-table-note\">Costs are averaged over the eight main tasks, at list price, without prompt caching.<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"609\" src=\"https:\/\/rewirenow.com\/app\/uploads\/2026\/11\/image.gif\" alt=\"\" class=\"wp-image-13468\"\/><\/figure>\n\n\n\n<p><em>Input size and cost per format compared with Markdown, averaged over the eight main tasks. The lighter cost bars assume prompt caching and are not part of our conclusions.<\/em><\/p>\n\n\n\n<p><strong>In money, the gap is real but modest.<\/strong> Moving from Markdown to XML adds about $21 per million requests on gpt-4o-mini and $312 on gpt-4.1, an increase of 11 to 12%. For a small application that is negligible; at high volume or on a more expensive model it becomes noticeable. Plain English was the cheapest format in our test.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb986732058\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986732058 {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986732058 {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986732058 {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986732058 {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">We found no format that improved correctness<\/h2>\n\n\n\n<p>So XML costs more. Does it buy better answers? <strong>On our tasks, we saw no measurable improvement from XML or from any other format.<\/strong><\/p>\n\n\n\n<p>With gpt-4o-mini, Markdown and XML both answered 71% of cases correctly. YAML scored 70%, and plain English, key-value and JSON 69%. Every format landed within about 2 percentage points of Markdown.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"442\" src=\"https:\/\/rewirenow.com\/app\/uploads\/2026\/11\/image-2.gif\" alt=\"\" class=\"wp-image-13472\"\/><\/figure>\n\n\n\n<p><em>gpt-4o-mini, 800 examples per format. The vertical bars show the range the true score plausibly lies in; all formats overlap with Markdown.<\/em><\/p>\n\n\n\n<p><strong>None of these differences is larger than chance could explain<\/strong>. Here is what we can, and can&#8217;t, conclude from that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Our data rule out an XML advantage above roughly 2 points<\/strong> for this model. If XML helps at all here, the effect is smaller than that.<\/li>\n\n\n\n<li><strong>Markdown was never measurably worse than any other format.<\/strong> That doesn&#8217;t mean Markdown improves answers. It means that in our test, choosing it cost nothing measurable.<\/li>\n<\/ul>\n\n\n\n<p>The larger gpt-4.1, tested on a smaller sample, showed the same picture: every format within about 2 points of Markdown.<\/p>\n\n\n\n<p><strong>Format compliance was not an issue either.<\/strong> Both models returned output in exactly the requested form 100% of the time, in every format, even under strict scoring.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb986732662\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986732662 {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986732662 {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986732662 {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986732662 {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">In our test, task difficulty mattered far more than format<\/h2>\n\n\n\n<p>In our results, the task made a much bigger difference than the syntax. <strong>Depending on the task, gpt-4o-mini scored anywhere from roughly 50% (the hardest anomaly task) to 81% (the simplest classification).<\/strong> On any single task, the spread between formats was about \u00b12 points.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"863\" height=\"533\" src=\"https:\/\/rewirenow.com\/app\/uploads\/2026\/11\/image-1.gif\" alt=\"\" class=\"wp-image-13469\"\/><\/figure>\n\n\n\n<p><em>gpt-4o-mini, correctness per task. The differences between tasks are far larger than the differences between formats within a task.<\/em><\/p>\n\n\n\n<p>A few individual combinations of task and format did look different, but in no consistent direction. That is what chance alone would produce across this many comparisons.<\/p>\n\n\n\n<p>One more observation for anyone building audit-style applications: <strong>models often reach the right verdict but cite different rule IDs.<\/strong> On the policy tasks, the cited rule IDs matched exactly only 27% of the time. If your application depends on the model explaining <em>why<\/em>, test that separately.<\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb986732a0c\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986732a0c {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986732a0c {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986732a0c {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986732a0c {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Delimiters: no difference in correctness, and only a hint on injections<\/h2>\n\n\n\n<p>The second question was about inserted content. We wrapped the data in XML tags, Markdown headings, JSON, or nothing at all. In half of the examples, we hid an instruction-like text inside the data, such as &#8220;ignore previous instructions&#8221;. It also asked the model to include a secret code word, so we could detect when the model obeyed.<\/p>\n\n\n\n<p><strong>Correctness was the same with every delimiter<\/strong> for gpt-4o-mini, with differences of 1 point or less.<\/p>\n\n\n\n<p><strong>Injections occasionally worked in the batch-audit task.<\/strong> The model obeyed the injected instruction in 17 of 176 injected batches (9.7%): 11% with XML, 11% with Markdown, 2% with JSON and 14% with no delimiter.<\/p>\n\n\n\n<p>JSON looked best here, but the numbers are small (1 case out of 44, against 6 out of 44 without a delimiter), and we only noticed the pattern afterwards. <strong>Treat it as a hint worth testing, not as protection you can rely on.<\/strong><\/p>\n\n\n\n<p>In a second, simpler task, the model never followed an injected instruction, whatever the format.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"876\" src=\"https:\/\/rewirenow.com\/app\/uploads\/2026\/11\/image-3.gif\" alt=\"\" class=\"wp-image-13474\"\/><\/figure>\n\n\n\n<p><em>gpt-4o-mini. Top: correctness per delimiter. Bottom: how often the model followed the hidden instruction. The wide bars reflect the small number of injected cases.<\/em><\/p>\n\n\n<div class=\"at-spacer at-spacer--6aeb986732daa\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986732daa {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986732daa {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986732daa {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986732daa {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What we would try next<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Consider Markdown or plain English as a starting point.<\/strong> In our test they were among the cheapest formats, and no format did better on correctness.<\/li>\n\n\n\n<li><strong>Don&#8217;t switch to XML or YAML only because a prompt is complex.<\/strong> We saw no accuracy gain from it; clearer rules may help more than different syntax.<\/li>\n\n\n\n<li><strong>Use structured formats where a machine reads the result.<\/strong> When the output must be parsed, ask for JSON. That is a different job from decorating the input.<\/li>\n\n\n\n<li><strong>Test on your own task with gold answers.<\/strong> Our results come from one setting. A few hundred examples with known correct answers will show what holds for yours.<\/li>\n<\/ol>\n\n\n<div class=\"at-spacer at-spacer--6aeb986732f4f\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb986732f4f {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb986732f4f {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb986732f4f {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb986732f4f {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Limitations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Two OpenAI models only.<\/strong> Other model families may behave differently, and we have not checked.<\/li>\n\n\n\n<li><strong>&#8220;No difference found&#8221; is not &#8220;proven equal&#8221;.<\/strong> For gpt-4o-mini, any real difference is likely smaller than about 2 percentage points. The gpt-4.1 sample was small, so its results are less precise.<\/li>\n\n\n\n<li><strong>Our own tasks.<\/strong> We used synthetic expense-audit tasks designed for this test. Results on your tasks may differ.<\/li>\n\n\n\n<li><strong>A small injection test.<\/strong> Each format had only a small number of manipulated cases.<\/li>\n\n\n\n<li><strong>Token counts depend on the model.<\/strong> Compare formats within one model, not across models.<\/li>\n<\/ul>\n\n\n<div class=\"at-spacer at-spacer--6aeb98673312c\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb98673312c {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb98673312c {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb98673312c {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb98673312c {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What we take from it<\/h2>\n\n\n\n<p>This was one test, on our own tasks and two OpenAI models. It doesn&#8217;t show that XML is bad or that format never matters. It shows that here, XML used more tokens without a measurable gain in correctness.<\/p>\n\n\n\n<p><strong>In our test, the extra tokens didn&#8217;t buy extra accuracy. Until your own data says otherwise, simple seems a sensible default.<\/strong><\/p>\n\n\n\n<p>Wondering whether your prompts, models or evaluation set-up hold up on your own tasks? Let&#8217;s find the answers for your situation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div class=\"at-spacer at-spacer--6aeb9867332f1\" style=\"background-color: transparent\">\n<style>\n\/* Ultrawide *\/\n.at-spacer--6aeb9867332f1 {\n    height: 30px;\n}\n\n\/* Desktop *\/\n@media (max-width: 1920px) {\n    .at-spacer--6aeb9867332f1 {\n        height: 30px;\n    }\n}\n\n\/* Laptop *\/\n@media (max-width: 1024px) {\n    .at-spacer--6aeb9867332f1 {\n        height: 30px;\n    }\n}\n\n\/* Mobile *\/\n@media (max-width: 767px) {\n    .at-spacer--6aeb9867332f1 {\n        height: 30px;\n    }\n}\n<\/style>\n<\/div>\n\n\n\n<section class=\"cta-box-block  js-cta-box  block\" >\n    <div class=\"container\">\n        <div class=\"cta-box\" style=\"background: linear-gradient(25deg, rgba(255,244,0, 0.13), rgba(37,206,206, 0.13));\">\n                            <figure class=\"cta-box__image\">\n                        <span class=\"cta-box__img\" data-lazy style=\"background-color: #f1f1f1;\">\r\n        \r\n                    <img data-lazy-full=\"https:\/\/rewirenow.com\/app\/uploads\/2024\/02\/data-foundations-bg-980x600.jpg\" alt=\"\" data-is-lazy>\r\n            <\/span>\r\n\r\n                <\/figure>\n                        <div class=\"cta-box__content\">\n                                    <h4 class=\"cta-box__title\">Agents reward organisations that ask harder questions first.<\/h4>\n                                                    <p class=\"cta-box__description\">The organisations getting compounding value from agentic AI share one trait: they invested in getting the foundations right before scaling. <br \/>\r\n<br \/>\r\nWe&#8217;ve built agent systems across financial services, energy, telecom, and public sector, from early proofs of concept to production systems running at scale. We&#8217;ve seen what separates the deployments that deliver from the ones that don&#8217;t.<\/p>\n                                                    <a class=\"cta-box__link btn btn--next\" href=\"https:\/\/rewirenow.com\/en\/contact\/\" target=\"_blank\" aria-label=\"Let's find the answers for your situation\">Let&#8217;s find the answers for your situation<\/a>\n                            <\/div>\n        <\/div>\n    <\/div>\n<\/section>\n\r\n    <\/div>\r\n<\/section>","protected":false},"excerpt":{"rendered":"<p>Does the format of a system prompt actually change what an LLM costs or how well it answers? We ran 6,300 requests through six prompt formats to find out.<\/p>\n","protected":false},"author":4,"featured_media":13285,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[178,174],"tags":[146,147,188],"class_list":["post-13467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-agentic-ai-genai","category-engineering","tag-ai","tag-artificial-intelligence","tag-prompt-engineering"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy\" \/>\n<meta property=\"og:description\" content=\"Does the format of a system prompt actually change what an LLM costs or how well it answers? We ran 6,300 requests through six prompt formats to find out.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\" \/>\n<meta property=\"og:site_name\" content=\"Rewire | Data &amp; AI Consultancy\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-03T14:55:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-03T14:58:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"alexgevers\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"alexgevers\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\"},\"author\":{\"name\":\"alexgevers\",\"@id\":\"https:\/\/rewirenow.com\/en\/#\/schema\/person\/0d620038fdcaeafad7e2d6dbba026cf9\"},\"headline\":\"Should you write your prompts in XML? We measured it\",\"datePublished\":\"2026-11-03T14:55:50+00:00\",\"dateModified\":\"2026-11-03T14:58:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\"},\"wordCount\":1425,\"publisher\":{\"@id\":\"https:\/\/rewirenow.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg\",\"keywords\":[\"AI\",\"Artificial Intelligence\",\"prompt engineering\"],\"articleSection\":[\"Agentic AI &amp; GenAI\",\"Engineering\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\",\"url\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\",\"name\":\"Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy\",\"isPartOf\":{\"@id\":\"https:\/\/rewirenow.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg\",\"datePublished\":\"2026-11-03T14:55:50+00:00\",\"dateModified\":\"2026-11-03T14:58:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage\",\"url\":\"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg\",\"contentUrl\":\"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"Photo by Natalia Y. on Unsplash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rewirenow.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Should you write your prompts in XML? We measured it\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rewirenow.com\/en\/#website\",\"url\":\"https:\/\/rewirenow.com\/en\/\",\"name\":\"Rewire | Data & AI Consultancy\",\"description\":\"Impossible No More\",\"publisher\":{\"@id\":\"https:\/\/rewirenow.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rewirenow.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rewirenow.com\/en\/#organization\",\"name\":\"Rewire | Data & AI Consultancy\",\"url\":\"https:\/\/rewirenow.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rewirenow.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rewirenow.com\/app\/uploads\/2024\/03\/Rewire-Logo.png\",\"contentUrl\":\"https:\/\/rewirenow.com\/app\/uploads\/2024\/03\/Rewire-Logo.png\",\"width\":1080,\"height\":1080,\"caption\":\"Rewire | Data & AI Consultancy\"},\"image\":{\"@id\":\"https:\/\/rewirenow.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/rewirenow.com\/en\/#\/schema\/person\/0d620038fdcaeafad7e2d6dbba026cf9\",\"name\":\"alexgevers\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rewirenow.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/45bda2da2c45b46eb8c68e0b0d01470d4237455a2216ed690d29423ede05f71d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/45bda2da2c45b46eb8c68e0b0d01470d4237455a2216ed690d29423ede05f71d?s=96&d=mm&r=g\",\"caption\":\"alexgevers\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/","og_locale":"en_US","og_type":"article","og_title":"Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy","og_description":"Does the format of a system prompt actually change what an LLM costs or how well it answers? We ran 6,300 requests through six prompt formats to find out.","og_url":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/","og_site_name":"Rewire | Data &amp; AI Consultancy","article_published_time":"2026-11-03T14:55:50+00:00","article_modified_time":"2026-11-03T14:58:00+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg","type":"image\/jpeg"}],"author":"alexgevers","twitter_card":"summary_large_image","twitter_misc":{"Written by":"alexgevers","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#article","isPartOf":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/"},"author":{"name":"alexgevers","@id":"https:\/\/rewirenow.com\/en\/#\/schema\/person\/0d620038fdcaeafad7e2d6dbba026cf9"},"headline":"Should you write your prompts in XML? We measured it","datePublished":"2026-11-03T14:55:50+00:00","dateModified":"2026-11-03T14:58:00+00:00","mainEntityOfPage":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/"},"wordCount":1425,"publisher":{"@id":"https:\/\/rewirenow.com\/en\/#organization"},"image":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage"},"thumbnailUrl":"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg","keywords":["AI","Artificial Intelligence","prompt engineering"],"articleSection":["Agentic AI &amp; GenAI","Engineering"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/","url":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/","name":"Should you write your prompts in XML? We measured it | Rewire | Data &amp; AI Consultancy","isPartOf":{"@id":"https:\/\/rewirenow.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage"},"image":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage"},"thumbnailUrl":"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg","datePublished":"2026-11-03T14:55:50+00:00","dateModified":"2026-11-03T14:58:00+00:00","breadcrumb":{"@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#primaryimage","url":"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg","contentUrl":"https:\/\/rewirenow.com\/app\/uploads\/2026\/09\/natalia-y-Oxl_KBNqxGA-unsplash.jpg","width":1920,"height":1080,"caption":"Photo by Natalia Y. on Unsplash"},{"@type":"BreadcrumbList","@id":"https:\/\/rewirenow.com\/en\/resources\/blog\/should-you-write-your-prompts-in-xml-we-measured-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rewirenow.com\/en\/"},{"@type":"ListItem","position":2,"name":"Should you write your prompts in XML? We measured it"}]},{"@type":"WebSite","@id":"https:\/\/rewirenow.com\/en\/#website","url":"https:\/\/rewirenow.com\/en\/","name":"Rewire | Data & AI Consultancy","description":"Impossible No More","publisher":{"@id":"https:\/\/rewirenow.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rewirenow.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rewirenow.com\/en\/#organization","name":"Rewire | Data & AI Consultancy","url":"https:\/\/rewirenow.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rewirenow.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/rewirenow.com\/app\/uploads\/2024\/03\/Rewire-Logo.png","contentUrl":"https:\/\/rewirenow.com\/app\/uploads\/2024\/03\/Rewire-Logo.png","width":1080,"height":1080,"caption":"Rewire | Data & AI Consultancy"},"image":{"@id":"https:\/\/rewirenow.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/rewirenow.com\/en\/#\/schema\/person\/0d620038fdcaeafad7e2d6dbba026cf9","name":"alexgevers","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rewirenow.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/45bda2da2c45b46eb8c68e0b0d01470d4237455a2216ed690d29423ede05f71d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/45bda2da2c45b46eb8c68e0b0d01470d4237455a2216ed690d29423ede05f71d?s=96&d=mm&r=g","caption":"alexgevers"}}]}},"_links":{"self":[{"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/posts\/13467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/comments?post=13467"}],"version-history":[{"count":10,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/posts\/13467\/revisions"}],"predecessor-version":[{"id":13487,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/posts\/13467\/revisions\/13487"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/media\/13285"}],"wp:attachment":[{"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/media?parent=13467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/categories?post=13467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rewirenow.com\/en\/wp-json\/wp\/v2\/tags?post=13467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}