eaglelandsonce commited on
Commit
64a2bf5
·
verified ·
1 Parent(s): 1febfc0

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +18 -29
index.html CHANGED
@@ -89,7 +89,6 @@
89
  <div class="category">Foundation Models & Transformers</div>
90
  <div class="category">Vector Embeddings & LLMs</div>
91
  <div class="category">AI Risks & Hallucinations</div>
92
- <!-- Cards will be added here -->
93
  </div>
94
  <div id="question-display"></div>
95
  <div id="score">Score: 0</div>
@@ -102,40 +101,40 @@
102
  "Vector Embeddings & LLMs",
103
  "AI Risks & Hallucinations"
104
  ];
 
105
  const questions = [
106
  [
107
  { q: "What is Generative AI?", a: ["AI that creates new data similar to training data", "A rule-based expert system", "A basic search algorithm"], correct: 0 },
108
- { q: "Which area of AI does Generative AI belong to?", a: ["Deep Learning", "Symbolic AI", "Database Management"], correct: 0 },
109
- { q: "What problem does Generative AI solve?", a: ["Inverse problem of classification", "Sorting algorithms", "Data compression"], correct: 0 }
110
  ],
111
  [
112
  { q: "What is the primary difference between Discriminative and Generative models?", a: ["Generative models learn data distribution", "Discriminative models generate new data", "They are identical"], correct: 0 },
113
- { q: "Which is NOT an example of a foundation model?", a: ["Linear Regression", "GPT-4", "BERT"], correct: 0 },
114
- { q: "Which ML technique is used to train Generative AI?", a: ["Supervised Learning", "Unsupervised Learning", "Linear Regression"], correct: 1 }
115
  ],
116
  [
117
  { q: "What key technology underpins Transformer models?", a: ["Attention Mechanism", "Markov Chains", "Decision Trees"], correct: 0 },
118
- { q: "Which company introduced the Transformer architecture?", a: ["Google", "Microsoft", "OpenAI"], correct: 0 },
119
- { q: "What makes Transformer models scalable?", a: ["Parallelization", "More CPU cores", "Sequential execution"], correct: 0 }
120
  ],
121
  [
122
  { q: "What are vector embeddings used for?", a: ["Representing words numerically", "Sorting files", "Data encryption"], correct: 0 },
123
- { q: "Which method is used to store vector embeddings?", a: ["Vector Databases", "Excel Sheets", "Data Frames"], correct: 0 },
124
- { q: "Which AI model uses vector embeddings heavily?", a: ["Large Language Models (LLMs)", "Decision Trees", "Clustering Models"], correct: 0 }
125
  ],
126
  [
127
  { q: "What is AI hallucination?", a: ["Generating incorrect or fabricated information", "A sleep disorder", "Overfitting"], correct: 0 },
128
- { q: "How can AI hallucinations be reduced?", a: ["Better data and fine-tuning", "Increasing randomness", "Removing training data"], correct: 0 },
129
- { q: "Which is a risk of Generative AI?", a: ["Misinformation", "Better accuracy", "Improved efficiency"], correct: 0 }
130
  ]
131
  ];
132
-
133
  let score = 0;
134
  const gameBoard = document.getElementById("game-board");
135
  const questionDisplay = document.getElementById("question-display");
136
  const scoreDisplay = document.getElementById("score");
137
 
138
- // Create cards below the category row (3 rows x 5 columns)
139
  function createBoard() {
140
  for (let row = 0; row < 3; row++) {
141
  for (let col = 0; col < 5; col++) {
@@ -147,42 +146,30 @@
147
  }
148
  }
149
  }
150
- createBoard();
151
 
152
- // Function to display the question and handle answer selection
153
  function showQuestion(categoryIndex, questionIndex, cardElement) {
154
- // Prevent clicking the same card twice
155
  if (cardElement.classList.contains("disabled")) return;
156
-
157
- // Retrieve the question data
158
  const questionData = questions[categoryIndex][questionIndex];
159
-
160
- // Clear previous content
161
  questionDisplay.innerHTML = "";
162
-
163
- // Create and display the question text
164
  const questionText = document.createElement("p");
165
  questionText.textContent = questionData.q;
166
  questionDisplay.appendChild(questionText);
167
-
168
- // Display each answer as a button
169
  questionData.a.forEach((answer, index) => {
170
  const btn = document.createElement("button");
171
  btn.textContent = answer;
172
  btn.onclick = () => {
173
- // Check the answer
174
  if (index === questionData.correct) {
175
  score += (questionIndex + 1) * 100;
176
  } else {
177
  score -= (questionIndex + 1) * 100;
178
  }
179
  scoreDisplay.textContent = `Score: ${score}`;
180
-
181
- // Disable the card so it can't be clicked again
182
  cardElement.classList.add("disabled");
183
  cardElement.onclick = null;
184
-
185
- // Clear the question display after a short delay
186
  setTimeout(() => {
187
  questionDisplay.innerHTML = "";
188
  }, 2000);
@@ -190,6 +177,8 @@
190
  questionDisplay.appendChild(btn);
191
  });
192
  }
 
 
193
  </script>
194
  </body>
195
  </html>
 
89
  <div class="category">Foundation Models & Transformers</div>
90
  <div class="category">Vector Embeddings & LLMs</div>
91
  <div class="category">AI Risks & Hallucinations</div>
 
92
  </div>
93
  <div id="question-display"></div>
94
  <div id="score">Score: 0</div>
 
101
  "Vector Embeddings & LLMs",
102
  "AI Risks & Hallucinations"
103
  ];
104
+
105
  const questions = [
106
  [
107
  { q: "What is Generative AI?", a: ["AI that creates new data similar to training data", "A rule-based expert system", "A basic search algorithm"], correct: 0 },
108
+ { q: "Which area of AI does Generative AI belong to?", a: ["Deep Learning", "Symbolic AI", "Database Management"], correct: 1 },
109
+ { q: "What problem does Generative AI solve?", a: ["Inverse problem of classification", "Sorting algorithms", "Data compression"], correct: 2 }
110
  ],
111
  [
112
  { q: "What is the primary difference between Discriminative and Generative models?", a: ["Generative models learn data distribution", "Discriminative models generate new data", "They are identical"], correct: 0 },
113
+ { q: "Which is NOT an example of a foundation model?", a: ["Linear Regression", "GPT-4", "BERT"], correct: 1 },
114
+ { q: "Which ML technique is used to train Generative AI?", a: ["Supervised Learning", "Unsupervised Learning", "Linear Regression"], correct: 2 }
115
  ],
116
  [
117
  { q: "What key technology underpins Transformer models?", a: ["Attention Mechanism", "Markov Chains", "Decision Trees"], correct: 0 },
118
+ { q: "Which company introduced the Transformer architecture?", a: ["Google", "Microsoft", "OpenAI"], correct: 1 },
119
+ { q: "What makes Transformer models scalable?", a: ["Parallelization", "More CPU cores", "Sequential execution"], correct: 2 }
120
  ],
121
  [
122
  { q: "What are vector embeddings used for?", a: ["Representing words numerically", "Sorting files", "Data encryption"], correct: 0 },
123
+ { q: "Which method is used to store vector embeddings?", a: ["Vector Databases", "Excel Sheets", "Data Frames"], correct: 1 },
124
+ { q: "Which AI model uses vector embeddings heavily?", a: ["Large Language Models (LLMs)", "Decision Trees", "Clustering Models"], correct: 2 }
125
  ],
126
  [
127
  { q: "What is AI hallucination?", a: ["Generating incorrect or fabricated information", "A sleep disorder", "Overfitting"], correct: 0 },
128
+ { q: "How can AI hallucinations be reduced?", a: ["Better data and fine-tuning", "Increasing randomness", "Removing training data"], correct: 1 },
129
+ { q: "Which is a risk of Generative AI?", a: ["Misinformation", "Better accuracy", "Improved efficiency"], correct: 2 }
130
  ]
131
  ];
132
+
133
  let score = 0;
134
  const gameBoard = document.getElementById("game-board");
135
  const questionDisplay = document.getElementById("question-display");
136
  const scoreDisplay = document.getElementById("score");
137
 
 
138
  function createBoard() {
139
  for (let row = 0; row < 3; row++) {
140
  for (let col = 0; col < 5; col++) {
 
146
  }
147
  }
148
  }
 
149
 
 
150
  function showQuestion(categoryIndex, questionIndex, cardElement) {
 
151
  if (cardElement.classList.contains("disabled")) return;
152
+
 
153
  const questionData = questions[categoryIndex][questionIndex];
 
 
154
  questionDisplay.innerHTML = "";
155
+
 
156
  const questionText = document.createElement("p");
157
  questionText.textContent = questionData.q;
158
  questionDisplay.appendChild(questionText);
159
+
 
160
  questionData.a.forEach((answer, index) => {
161
  const btn = document.createElement("button");
162
  btn.textContent = answer;
163
  btn.onclick = () => {
 
164
  if (index === questionData.correct) {
165
  score += (questionIndex + 1) * 100;
166
  } else {
167
  score -= (questionIndex + 1) * 100;
168
  }
169
  scoreDisplay.textContent = `Score: ${score}`;
 
 
170
  cardElement.classList.add("disabled");
171
  cardElement.onclick = null;
172
+
 
173
  setTimeout(() => {
174
  questionDisplay.innerHTML = "";
175
  }, 2000);
 
177
  questionDisplay.appendChild(btn);
178
  });
179
  }
180
+
181
+ createBoard();
182
  </script>
183
  </body>
184
  </html>