Q3: Steps to Enable and Fill the Textarea
Run console commands to enable the hidden textarea and fill it with the required JSON
Important
Make sure to follow these steps ONLY on the exam portal page, not on any other website.
Select Address Fields
Choose which fields to include in the generated addresses
1
Open Developer ToolsONLY ON THE EXAM PORTAL PAGE
- Press F12 or Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac)
- Click on the Console tab at the top of the Developer Tools panel
2
Enable Pasting (if needed)- If you see a paste error, type allow pasting in the console first
- This will enable pasting code into the console
3
Copy and Paste the CodeCopy the code below and paste it directly into the console:
const textarea = document.getElementById('q-generate-addresses-with-llms');
textarea.style.visibility = 'visible';
textarea.style.opacity = '1';
textarea.style.display = 'block';
textarea.removeAttribute('disabled');
// Step 2: Pre-fill the textarea with the correct JSON structure for generating addresses
const defaultJson = JSON.stringify({
model: "gpt-4o-mini",
messages: [
{
role: "system",
content: "Respond in JSON"
},
{
role: "user",
content: "Generate 10 random addresses in the US"
}
],
response_format: {
type: "json_schema",
json_schema: {
name: "address_response",
strict: true,
schema: {
type: "object",
properties: {
addresses: {
type: "array",
items: {
type: "object",
properties: {
"state": { "type": "string" },
"zip": { "type": "number" },
"latitude": { "type": "number" }
},
required: ["state","zip","latitude"],
additionalProperties: false
}
}
},
required: ["addresses"],
additionalProperties: false
}
}
}
}, null, 2);
// Set the default JSON structure in the textarea
textarea.value = defaultJson;4
Run the Code and Submit- After pasting, press Enter to run the code
- Note: You won't see any textbox appear on the page - the code works behind the scenes
- Do not look for any textbox - simply click the "Check" button on the exam portal to submit your answer
- The answer is automatically submitted when you click "Check"