File size: 9,472 Bytes
ffdff5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
<div class="d3-prompt-evolution">
<svg viewBox="0 0 900 370" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="arrowhead-prompt" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="currentColor" />
</marker>
</defs>
<!-- Stage 1: Raw Text -->
<g class="stage">
<rect x="30" y="40" width="240" height="140" rx="8" class="stage-box stage-1"/>
<text x="150" y="65" text-anchor="middle" class="stage-title">Raw Text</text>
<text x="150" y="85" text-anchor="middle" class="stage-subtitle">Early Models (before 2022)</text>
<foreignObject x="45" y="95" width="210" height="80">
<div xmlns="http://www.w3.org/1999/xhtml" class="code-example">
<div class="code-line">Translate to French:</div>
<div class="code-line">Hello world</div>
</div>
</foreignObject>
</g>
<!-- Arrow 1 -->
<path d="M 270 110 L 320 110" class="arrow" marker-end="url(#arrowhead-prompt)"/>
<text x="295" y="100" text-anchor="middle" class="arrow-label">Evolution</text>
<!-- Stage 2: JSON + Chat Templates -->
<g class="stage">
<rect x="320" y="20" width="260" height="180" rx="8" class="stage-box stage-2"/>
<text x="450" y="45" text-anchor="middle" class="stage-title">Chat Templates (in JSON)</text>
<text x="450" y="65" text-anchor="middle" class="stage-subtitle">Chat Models (2022-2025)</text>
<foreignObject x="335" y="75" width="230" height="120">
<div xmlns="http://www.w3.org/1999/xhtml" class="code-example">
<div class="code-line json-brace">{</div>
<div class="code-line indent">"role": "system",</div>
<div class="code-line indent">"content": "You are..."</div>
<div class="code-line json-brace">},</div>
<div class="code-line json-brace">{</div>
<div class="code-line indent">"role": "user",</div>
<div class="code-line indent">"content": "Hello"</div>
<div class="code-line json-brace">}</div>
</div>
</foreignObject>
</g>
<!-- Arrow 2 -->
<path d="M 580 110 L 630 110" class="arrow" marker-end="url(#arrowhead-prompt)"/>
<text x="605" y="100" text-anchor="middle" class="arrow-label">Evolution</text>
<!-- Stage 3: JSON + XML (Reasoning) -->
<g class="stage">
<rect x="630" y="10" width="240" height="200" rx="8" class="stage-box stage-3"/>
<text x="750" y="35" text-anchor="middle" class="stage-title">JSON + XML</text>
<text x="750" y="55" text-anchor="middle" class="stage-subtitle">Reasoning Models (2025+)</text>
<foreignObject x="645" y="65" width="210" height="140">
<div xmlns="http://www.w3.org/1999/xhtml" class="code-example">
<div class="code-line json-brace">{</div>
<div class="code-line indent">"role": "assistant",</div>
<div class="code-line indent">"content": [</div>
<div class="code-line indent2 xml-tag"><thinking></div>
<div class="code-line indent2">reasoning...</div>
<div class="code-line indent2 xml-tag"></thinking></div>
<div class="code-line indent2 xml-tag"><output></div>
<div class="code-line indent2">response</div>
<div class="code-line indent2 xml-tag"></output></div>
<div class="code-line indent">]</div>
<div class="code-line json-brace">}</div>
</div>
</foreignObject>
</g>
<!-- Key Features Labels -->
<g class="features">
<text x="150" y="200" text-anchor="middle" class="feature-label">• Simple prompts</text>
<text x="150" y="220" text-anchor="middle" class="feature-label">• Generally no structure</text>
<text x="150" y="240" text-anchor="middle" class="feature-label">• Completion-based</text>
</g>
<g class="features">
<text x="450" y="220" text-anchor="middle" class="feature-label">• Role separation</text>
<text x="450" y="240" text-anchor="middle" class="feature-label">• Chat/Turn-based</text>
</g>
<g class="features">
<text x="750" y="230" text-anchor="middle" class="feature-label">• Chat/Turn-based</text>
<text x="750" y="250" text-anchor="middle" class="feature-label">with added tags for control</text>
</g>
<!-- Timeline -->
<line x1="50" y1="320" x2="850" y2="320" class="timeline"/>
<circle cx="150" cy="320" r="6" class="timeline-dot"/>
<circle cx="450" cy="320" r="6" class="timeline-dot"/>
<circle cx="750" cy="320" r="6" class="timeline-dot"/>
<text x="150" y="345" text-anchor="middle" class="timeline-label">Before 2022</text>
<text x="450" y="345" text-anchor="middle" class="timeline-label">2022-2025</text>
<text x="750" y="345" text-anchor="middle" class="timeline-label">2025+</text>
</svg>
</div>
<style>
.d3-prompt-evolution {
position: relative;
width: 100%;
}
.d3-prompt-evolution svg {
display: block;
width: 100%;
height: auto;
}
/* Stage boxes */
.d3-prompt-evolution .stage-box {
stroke-width: 2;
}
.d3-prompt-evolution .stage-1 {
fill: #e3f2fd;
stroke: #1976d2;
}
.d3-prompt-evolution .stage-2 {
fill: #f3e5f5;
stroke: #7b1fa2;
}
.d3-prompt-evolution .stage-3 {
fill: #e8f5e9;
stroke: #388e3c;
}
[data-theme="dark"] .d3-prompt-evolution .stage-1 {
fill: rgba(25, 118, 210, 0.15);
}
[data-theme="dark"] .d3-prompt-evolution .stage-2 {
fill: rgba(123, 31, 162, 0.15);
}
[data-theme="dark"] .d3-prompt-evolution .stage-3 {
fill: rgba(56, 142, 60, 0.15);
}
/* Text styles */
.d3-prompt-evolution .stage-title {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 16px;
font-weight: 700;
fill: var(--text-color, #333);
}
.d3-prompt-evolution .stage-subtitle {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 11px;
fill: var(--muted-color, #666);
}
/* Code examples */
.d3-prompt-evolution .code-example {
font-family: 'Monaco', 'Courier New', monospace;
font-size: 9px;
line-height: 1.4;
color: var(--text-color, #333);
padding: 4px;
}
.d3-prompt-evolution .code-line {
margin: 1px 0;
}
.d3-prompt-evolution .indent {
padding-left: 12px;
}
.d3-prompt-evolution .indent2 {
padding-left: 24px;
}
.d3-prompt-evolution .json-brace {
color: var(--primary-color, #1976d2);
font-weight: 600;
}
.d3-prompt-evolution .xml-tag {
color: #d32f2f;
font-weight: 600;
}
/* Arrows */
.d3-prompt-evolution .arrow {
fill: none;
stroke: var(--muted-color, #999);
stroke-width: 2;
color: var(--muted-color, #999);
}
.d3-prompt-evolution .arrow-label {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 10px;
font-style: italic;
fill: var(--muted-color, #666);
}
/* Feature labels */
.d3-prompt-evolution .feature-label {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 11px;
fill: var(--text-color, #555);
}
/* Timeline */
.d3-prompt-evolution .timeline {
stroke: var(--border-color, #ddd);
stroke-width: 2;
}
.d3-prompt-evolution .timeline-dot {
fill: var(--primary-color, #1976d2);
}
.d3-prompt-evolution .timeline-label {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 12px;
font-weight: 600;
fill: var(--text-color, #333);
}
.d3-prompt-evolution .model-example {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 11px;
font-style: italic;
fill: var(--muted-color, #666);
}
/* Benefits section */
.d3-prompt-evolution .benefits-box {
fill: var(--surface-bg, #fafafa);
stroke: var(--border-color, #e0e0e0);
stroke-width: 1.5;
}
.d3-prompt-evolution .benefits-title {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 13px;
font-weight: 700;
fill: var(--text-color, #333);
}
.d3-prompt-evolution .benefit-text {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 11px;
fill: var(--text-color, #555);
}
[data-theme="dark"] .d3-prompt-evolution .benefits-box {
fill: rgba(255, 255, 255, 0.05);
}
</style>
<script>
(() => {
const bootstrap = () => {
const scriptEl = document.currentScript;
let container = scriptEl ? scriptEl.previousElementSibling : null;
if (!(container && container.classList && container.classList.contains('d3-prompt-evolution'))) {
const candidates = Array.from(document.querySelectorAll('.d3-prompt-evolution'))
.filter((el) => !(el.dataset && el.dataset.mounted === 'true'));
container = candidates[candidates.length - 1] || null;
}
if (!container) return;
if (container.dataset) {
if (container.dataset.mounted === 'true') return;
container.dataset.mounted = 'true';
}
};
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', bootstrap, { once: true });
} else {
bootstrap();
}
})();
</script> |