Last month I needed to generate 500 unique multiple‑choice questions for a client’s compliance training module. The deadline was tight, the subject matter was niche, and copying questions from old PDFs felt like a soul‑sucking grind. I decided to see if I could automate the whole thing with an AI question generator built from no‑code pieces and a few API calls.
What follows is the exact workflow I ended up with, the places where it tripped, and the tweaks that made it stable enough to run unattended for weeks. If you’d rather skip the build and deploy a working version in an afternoon, we’ve packaged this workflow as a blueprint at deepusecase.com/vault.
What most guides get wrong about AI question generation
Most tutorials tell you to drop a single prompt into ChatGPT and hope for the best. They show you a cute example like “Give me ten quiz questions about solar power” and then call it a day. In practice that approach produces repetitive phrasing, factual drift, and answers that are often wrong or ambiguous. The hidden cost is the time you spend manually filtering and rewriting each output.
What they skip is the need for a structured pipeline: a source of topics, a prompt that forces a specific JSON schema, a validation step that checks for duplicate stems, and a fallback that re‑asks the model when the output fails schema validation. Without those pieces you end up with a brittle demo, not a production tool.
Scenario‑led build: from idea to first run
I started with a simple Airtable base called “Question Bank”. It has three tables: Topics, Prompts, and Outputs. The Topics table holds the niche compliance areas (e.g., “HIPAA data breach notification”, “OSHA lockout‑tagout”). Each record includes a short description and a difficulty tag.
Next I created a Make scenario that watches the Topics table for new records. When a topic is added, the scenario pulls the description, injects it into a carefully crafted prompt, sends it to the OpenAI API, and writes the raw response back to the Prompts table for logging.
The prompt itself is where most people get stuck. Here’s the version that finally gave me clean, usable JSON:
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a quiz Writer.com. Output ONLY valid JSON that matches the schema: {\"question\": string, \"options\": [string, string, string, string], \"answer\": integer (0‑3)}. Do not add any explanation."
},
{
"role": "user",
"content": "Generate one multiple‑choice question about {{topic.description}} suitable for {{topic.difficulty}} learners. Make sure the question is factual, the options are plausible, and exactly one option is correct."
}
],
"temperature": 0.7
}
I bolded OpenAI on first mention; subsequent references stay plain. The scenario uses the Make HTTP module to POST this JSON to https://api.openai.com/v1/chat/completions.
After the API call, the scenario parses the returned text, validates that it is valid JSON and that the answer index is within the options array. If validation fails, the scenario routes the request to a retry path that asks the model again with a slightly higher temperature and a reminder to output only JSON.
If validation passes, the record is moved to the Outputs table, where a human reviewer can glance at it, approve, or kick it back for another attempt. Approved records get a status flag and are ready for export to CSV or direct import into a learning‑management system.
