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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<title>Model Choice: Fact or Fiction</title>
|
6 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
7 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap" rel="stylesheet">
|
8 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9 |
+
<style>
|
10 |
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
11 |
+
:root {
|
12 |
+
--bg1:#c9e8ff; --bg2:#fde2ff; --ink:#222; --ink-sub:#555;
|
13 |
+
--brand:#2563eb; --brand-2:#22c55e; --good:#16a34a; --bad:#dc2626;
|
14 |
+
--card:#ffffffcc;
|
15 |
+
}
|
16 |
+
body {
|
17 |
+
font-family: 'Poppins', sans-serif;
|
18 |
+
background: radial-gradient(1200px 600px at 20% 0%, var(--bg1), transparent 60%),
|
19 |
+
radial-gradient(1200px 600px at 80% 0%, var(--bg2), transparent 60%),
|
20 |
+
#f6f7fb;
|
21 |
+
min-height: 100vh;
|
22 |
+
display: flex;
|
23 |
+
flex-direction: column;
|
24 |
+
align-items: center;
|
25 |
+
justify-content: flex-start;
|
26 |
+
padding: 2rem 1rem;
|
27 |
+
color: var(--ink);
|
28 |
+
}
|
29 |
+
h1 { text-align: center; margin-bottom: .25rem; font-weight: 600; font-size: 2.2rem; }
|
30 |
+
#subtitle { text-align:center; margin-bottom:1rem; color: var(--ink-sub); }
|
31 |
+
#source-link { text-align: center; margin-bottom: 1.25rem; font-size: .95rem; }
|
32 |
+
#source-link a { color: var(--ink); text-decoration: underline; }
|
33 |
+
#game-container {
|
34 |
+
background: var(--card);
|
35 |
+
width: 100%; max-width: 820px;
|
36 |
+
padding: 2rem; border-radius: 16px;
|
37 |
+
box-shadow: 0 10px 24px rgba(0,0,0,.15);
|
38 |
+
display: flex; flex-direction: column; align-items: center;
|
39 |
+
}
|
40 |
+
.progress-container {
|
41 |
+
width: 100%; background:#ececec; border-radius: 999px; overflow: hidden; margin-bottom: 1rem;
|
42 |
+
}
|
43 |
+
.progress-bar { height: 14px; width:0%; background: linear-gradient(90deg,var(--brand),var(--brand-2)); transition: width .3s ease; }
|
44 |
+
#statement {
|
45 |
+
font-size: 1.25rem; line-height: 1.5; text-align: center; color: #333;
|
46 |
+
min-height: 84px; margin: .75rem 0 1rem;
|
47 |
+
}
|
48 |
+
.btn-group { display:flex; gap:.75rem; flex-wrap:wrap; justify-content:center; margin: .25rem 0 1rem; }
|
49 |
+
button {
|
50 |
+
padding: .75rem 1.25rem; border: none; border-radius: 999px; cursor: pointer;
|
51 |
+
background: var(--brand); color: #fff; font-weight: 600; letter-spacing:.2px;
|
52 |
+
transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
|
53 |
+
}
|
54 |
+
button.secondary { background:#111827; }
|
55 |
+
button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.15); }
|
56 |
+
#result {
|
57 |
+
margin-top: .5rem; padding: .75rem 1rem; border-radius: 10px; font-weight: 700; text-align: center; display:none;
|
58 |
+
}
|
59 |
+
#result.correct { display:block; background:#dcfce7; color:#14532d; }
|
60 |
+
#result.incorrect { display:block; background:#fee2e2; color:#7f1d1d; }
|
61 |
+
#explanation {
|
62 |
+
margin-top: .75rem; padding: 1rem; background:#f9fafb; color:#374151; border-radius:12px; display:none;
|
63 |
+
}
|
64 |
+
#score { margin-top: .75rem; font-weight: 700; }
|
65 |
+
#controls { display:flex; gap:.5rem; margin-top:.5rem; }
|
66 |
+
#controls button { background:#0f766e; }
|
67 |
+
#restart-btn { background:#6b21a8; }
|
68 |
+
</style>
|
69 |
+
</head>
|
70 |
+
<body>
|
71 |
+
<h1>Model Choice: Fact or Fiction</h1>
|
72 |
+
<div id="subtitle">Test your instincts on selecting models in Azure AI Foundry</div>
|
73 |
+
<div id="source-link">
|
74 |
+
Source: <a href="https://learn.microsoft.com/en-us/training/modules/explore-models-azure-ai-studio/2-select-model" target="_blank" rel="noopener">
|
75 |
+
Explore the model catalog → Select a model (Microsoft Learn)
|
76 |
+
</a>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<div id="game-container">
|
80 |
+
<div class="progress-container"><div class="progress-bar" id="progress-bar"></div></div>
|
81 |
+
<div id="statement">Loading statement...</div>
|
82 |
+
|
83 |
+
<div class="btn-group">
|
84 |
+
<button onclick="guess(true)">Fact</button>
|
85 |
+
<button class="secondary" onclick="guess(false)">Fiction</button>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<div id="result"></div>
|
89 |
+
<div id="explanation"></div>
|
90 |
+
|
91 |
+
<div id="controls">
|
92 |
+
<button id="next-btn" style="display:none;" onclick="nextStatement()">Next</button>
|
93 |
+
<button id="restart-btn" style="display:none;" onclick="startGame()">Restart</button>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<div id="score"></div>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<script>
|
100 |
+
// Grounded statements from Microsoft Learn page (Select a model)
|
101 |
+
// https://learn.microsoft.com/en-us/training/modules/explore-models-azure-ai-studio/2-select-model
|
102 |
+
const statements = [
|
103 |
+
{
|
104 |
+
text: "Azure AI Foundry’s model catalog is a central place to browse models for your use case.",
|
105 |
+
isFact: true,
|
106 |
+
explanation: "The unit states the catalog provides a central repository to find the right model for your generative AI use case."
|
107 |
+
},
|
108 |
+
{
|
109 |
+
text: "You can explore models via Hugging Face, GitHub, and Azure AI Foundry; Foundry makes exploration and deployment easiest.",
|
110 |
+
isFact: true,
|
111 |
+
explanation: "The page lists all three catalogs and notes Foundry eases exploring and deploying a prototype."
|
112 |
+
},
|
113 |
+
{
|
114 |
+
text: "Small Language Models (SLMs) like Phi‑3 or Llama 3 8B are efficient and suitable for edge or lower-end hardware.",
|
115 |
+
isFact: true,
|
116 |
+
explanation: "SLMs are described as cost‑effective and great when cost/speed matter more than model complexity."
|
117 |
+
},
|
118 |
+
{
|
119 |
+
text: "Large Language Models (LLMs) such as GPT‑4, Mistral Large, Llama 3 70B, and Command R+ excel at deep reasoning and complex generation.",
|
120 |
+
isFact: true,
|
121 |
+
explanation: "The unit explicitly calls out these LLMs for deep reasoning and complex content."
|
122 |
+
},
|
123 |
+
{
|
124 |
+
text: "Reasoning models like DeepSeek‑R1 and o1 are suggested for tougher tasks in math, coding, science, strategy, and logistics.",
|
125 |
+
isFact: true,
|
126 |
+
explanation: "Reasoning models are highlighted for higher performance in complex tasks."
|
127 |
+
},
|
128 |
+
{
|
129 |
+
text: "Multimodal models like GPT‑4o and Phi‑3‑Vision handle both text and images.",
|
130 |
+
isFact: true,
|
131 |
+
explanation: "The page explains these models can analyze and generate across modalities."
|
132 |
+
},
|
133 |
+
{
|
134 |
+
text: "DALL·E 3 and Stability AI are text‑to‑image generators for creating visuals.",
|
135 |
+
isFact: true,
|
136 |
+
explanation: "They’re listed as tools for generating realistic images from prompts."
|
137 |
+
},
|
138 |
+
{
|
139 |
+
text: "Embedding models like Ada and Cohere are mainly for semantic search and RAG.",
|
140 |
+
isFact: true,
|
141 |
+
explanation: "They convert text to vectors to power search and recommendation; RAG is a common scenario."
|
142 |
+
},
|
143 |
+
{
|
144 |
+
text: "Function calling and JSON support help models call APIs and handle structured data.",
|
145 |
+
isFact: true,
|
146 |
+
explanation: "The unit notes these capabilities for dynamic tool use and structured outputs."
|
147 |
+
},
|
148 |
+
{
|
149 |
+
text: "Regional/domain models (e.g., Core42 JAIS for Arabic, Nixtla TimeGEN‑1 for time series) can outperform general models in their niches.",
|
150 |
+
isFact: true,
|
151 |
+
explanation: "The page gives these examples and recommends them when you have specific needs."
|
152 |
+
},
|
153 |
+
{
|
154 |
+
text: "Open‑source models aren’t available in Azure AI Foundry’s catalog.",
|
155 |
+
isFact: false,
|
156 |
+
explanation: "Fiction. The page says there are hundreds of open models in the catalog from multiple providers."
|
157 |
+
},
|
158 |
+
{
|
159 |
+
text: "Proprietary models emphasize enterprise security/support; open models emphasize flexibility and fine‑tuning control.",
|
160 |
+
isFact: true,
|
161 |
+
explanation: "The unit contrasts these trade‑offs directly."
|
162 |
+
},
|
163 |
+
{
|
164 |
+
text: "Suggested filter criteria include task type, precision, openness, and deployment.",
|
165 |
+
isFact: true,
|
166 |
+
explanation: "These four characteristics are listed as selection filters."
|
167 |
+
},
|
168 |
+
{
|
169 |
+
text: "In this context, precision is the proportion of true positives among generated outputs.",
|
170 |
+
isFact: true,
|
171 |
+
explanation: "The page defines precision exactly that way for generative AI evaluation."
|
172 |
+
},
|
173 |
+
{
|
174 |
+
text: "Fine‑tuned models can boost precision for specific domains compared to a base model plus prompt engineering alone.",
|
175 |
+
isFact: true,
|
176 |
+
explanation: "The unit contrasts base vs. fine‑tuned models for domain precision."
|
177 |
+
},
|
178 |
+
{
|
179 |
+
text: "Public model benchmarks fully reflect your app’s real‑world performance, so you can skip any custom evaluation.",
|
180 |
+
isFact: false,
|
181 |
+
explanation: "Fiction. Benchmarks help early exploration but give little info about your specific use case."
|
182 |
+
},
|
183 |
+
{
|
184 |
+
text: "Leaderboards/benchmarks track metrics like accuracy, coherence, fluency, groundedness, GPT similarity, quality index, and cost.",
|
185 |
+
isFact: true,
|
186 |
+
explanation: "These metrics are enumerated on the page for comparing models."
|
187 |
+
},
|
188 |
+
{
|
189 |
+
text: "Evaluations can be manual or automated; automated ones can use precision, recall, and F1 with your ground truth.",
|
190 |
+
isFact: true,
|
191 |
+
explanation: "The page recommends starting manual then using automated metrics for scalable comparisons."
|
192 |
+
},
|
193 |
+
{
|
194 |
+
text: "Scaling considerations include deployment location, monitoring/optimization, prompt management, and a GenAIOps lifecycle.",
|
195 |
+
isFact: true,
|
196 |
+
explanation: "All four are listed under ‘Can I scale for real‑world workloads?’"
|
197 |
+
}
|
198 |
+
];
|
199 |
+
|
200 |
+
// Game logic (same polished flow as your original)
|
201 |
+
let currentIndex = 0, score = 0, answered = false;
|
202 |
+
|
203 |
+
function shuffle(arr) {
|
204 |
+
for (let i = arr.length - 1; i > 0; i--) {
|
205 |
+
const j = Math.floor(Math.random() * (i + 1));
|
206 |
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
function startGame() {
|
211 |
+
shuffle(statements);
|
212 |
+
currentIndex = 0; score = 0; answered = false;
|
213 |
+
document.getElementById('restart-btn').style.display = 'none';
|
214 |
+
loadStatement(); updateScore();
|
215 |
+
}
|
216 |
+
|
217 |
+
function loadStatement() {
|
218 |
+
if (currentIndex >= statements.length) return endGame();
|
219 |
+
const s = statements[currentIndex];
|
220 |
+
document.getElementById('statement').textContent = s.text;
|
221 |
+
document.getElementById('result').style.display = 'none';
|
222 |
+
document.getElementById('explanation').style.display = 'none';
|
223 |
+
document.getElementById('next-btn').style.display = 'none';
|
224 |
+
answered = false; updateProgress();
|
225 |
+
}
|
226 |
+
|
227 |
+
function guess(isFactGuess) {
|
228 |
+
if (answered) return;
|
229 |
+
answered = true;
|
230 |
+
const correct = statements[currentIndex].isFact;
|
231 |
+
const resultEl = document.getElementById('result');
|
232 |
+
if (isFactGuess === correct) {
|
233 |
+
resultEl.textContent = 'Correct!';
|
234 |
+
resultEl.className = 'correct';
|
235 |
+
score++;
|
236 |
+
} else {
|
237 |
+
resultEl.textContent = 'Incorrect!';
|
238 |
+
resultEl.className = 'incorrect';
|
239 |
+
}
|
240 |
+
resultEl.style.display = 'block';
|
241 |
+
const expEl = document.getElementById('explanation');
|
242 |
+
expEl.textContent = statements[currentIndex].explanation + " (See source link above.)";
|
243 |
+
expEl.style.display = 'block';
|
244 |
+
document.getElementById('next-btn').style.display = 'inline-block';
|
245 |
+
updateScore();
|
246 |
+
}
|
247 |
+
|
248 |
+
function nextStatement() {
|
249 |
+
currentIndex++;
|
250 |
+
if (currentIndex < statements.length) loadStatement();
|
251 |
+
else endGame();
|
252 |
+
}
|
253 |
+
|
254 |
+
function updateScore() {
|
255 |
+
document.getElementById('score').textContent = `Score: ${score} / ${statements.length}`;
|
256 |
+
}
|
257 |
+
|
258 |
+
function updateProgress() {
|
259 |
+
document.getElementById('progress-bar').style.width = `${(currentIndex / statements.length) * 100}%`;
|
260 |
+
}
|
261 |
+
|
262 |
+
function endGame() {
|
263 |
+
const pct = Math.round((score / statements.length) * 100);
|
264 |
+
document.getElementById('statement').textContent =
|
265 |
+
`Game Over! You scored ${score} of ${statements.length} (${pct}%).`;
|
266 |
+
document.getElementById('result').style.display = 'none';
|
267 |
+
document.getElementById('explanation').style.display = 'none';
|
268 |
+
document.getElementById('next-btn').style.display = 'none';
|
269 |
+
document.getElementById('restart-btn').style.display = 'inline-block';
|
270 |
+
document.getElementById('progress-bar').style.width = '100%';
|
271 |
+
}
|
272 |
+
|
273 |
+
startGame();
|
274 |
+
</script>
|
275 |
+
</body>
|
276 |
</html>
|