AI-Driven Rapid Development: A Practical Guide to Shipping in Three Hours
This article walks through a real three-hour delivery of a usable online exam system built with AI-assisted development. It covers why a local offline model setup failed, why dirty data rather than code became the real bottleneck, how to constrain model output with a strict schema and programmatic validation, a minute-by-minute time-box breakdown, and the engineering baselines that must be met before launch. Readers will get a reusable formula for stable output: tightly scoped requirements, structured prompts, programmatic checks, and a clear acceptance checklist.
1. The Scenario: An “Impossible” Deadline
At 8:00 a.m., the requester dropped off a messy question bank and asked for a ready-to-use online exam system by 11:00 a.m. The first instinct was to refuse: clarifying requirements, structuring the data, building the pages and grading logic, then deploying and integration testing all within three hours seemed nearly impossible. But this kind of urgent request is exactly the best sample for testing AI-assisted development capability—it forces you to upgrade from “being able to write code” to “being able to break down a problem and verify the result.”
One conclusion needs stating up front: what three hours can deliver is not a “perfect system” but a “minimum viable version with clear boundaries.” Keeping the scope under control is the precondition for all efficiency.
2. Postmortem: Why the Local Offline Approach Fell Apart
I initially chose a locally deployed open-source AI coding tool, on the grounds that it was free, controllable, and kept data inside the internal network. I gave it up voluntarily half an hour later, for three reasons:
- The small local model was not stable enough at long-context understanding and structured output (strict JSON); the generated grading logic frequently had misaligned fields.
- The UI and interaction code quality was poor—unresponsive buttons, out-of-sync state—so usability was too bad to deliver.
- Debugging costs overtook the benefits. Errors in AI-generated code still needed a human backstop, and the time to investigate unfamiliar code was far greater than writing it yourself.
The real lesson: the capability gap between free and paid models cannot be closed by “practiced operation.” When the deadline is tight, tool selection is itself risk management.
3. The Real Bottleneck: Data, Not Code
Work formally started at 4:00 p.m., and the first wall was not the framework but the table exported from a PDF: merged cells, newline pollution, options crammed into one cell, missing question-type labels, and an answer column that was sometimes there and sometimes not.
AI writes business code fast, but dirty data stalls the entire pipeline. The workable approach is to hand the cleaning to AI as well, and constrain it in a “verifiable” way:
# Make the model output a strict structure; reject the whole batch if any record is invalidimport json, reSCHEMA_PROMPT = """Extract the questions into a JSON array with fixed fields:{id:int, type:"single|multiple|judge", stem:str,options:[{key:str,text:str}], answer:[str], score:int}Requirement: do not guess missing answers; if missing, set answer to empty and mark need_review=true.Output JSON only, no explanation."""def load_and_validate(raw_text):data = json.loads(raw_text)bad = [q["id"] for q in dataif q["type"] != "judge" and len(q["options"]) < 2or not q["answer"] and not q.get("need_review")]return data, bad # if bad is non-empty, confirm manually before storing
The key point: do not let the model “improvise freely”; make it output a machine-verifiable structure, then let the program perform hard validation. This step moves uncertainty from runtime forward to build time.
4. Breaking Down the Three-Hour Time Box
- 0–20 minutes: converge requirements. Confirm five items—candidate side, admin side, question bank import, automatic grading, score export—and cut everything else.
- 20–60 minutes: data cleaning and structuring, producing the validated question bank JSON above.
- 60–140 minutes: generative development. Describe the data model and APIs in natural language, and let the tool produce the scaffold, pages, and grading logic.
- 140–170 minutes: integration and bug fixing. Fix only blocking issues; log styling issues as to-dos.
- 170–180 minutes: deployment and smoke testing, delivering a usable URL.
The accompanying prompt should be “small and hard,” for example:
Tech stack: single-page frontend + lightweight backend + relational databaseAPIs: POST /api/paper, POST /api/submit, GET /api/resultConstraints: grading done on the server; submissions idempotent; each request returns within 2 secondsOutput: complete runnable code + table creation statements + startup instructions
5. Deflated by a Single Question
After delivery, I was about to show off the result when my high-school son took one look and asked: can this system prevent cheating? What about switching tabs, searching for answers, or multiple people answering on someone’s behalf?
That one line hit the weak spot: what I had optimized was “development speed,” but what users actually care about is “exam credibility.” Technical self-congratulation often comes from misaligned metrics.
6. Engineering Baselines That Must Be Met Before Launch
- Identity and permissions: bind candidate identity reliably; use strong passwords and least privilege on the admin side; authenticate at the API level rather than only hiding things in the frontend.
- Integrity and anti-cheating: store questions and answers separately; never send correct answers to the client; keep audit logs for key operations; where necessary, add tab-switch detection, question shuffling, and timed submission.
- Data reliability: make the submission API idempotent; support resuming after an abnormal network drop; back up the database regularly; run score export as an asynchronous task.
- Observability: connect logging services and monitoring alerts, with thresholds for submission failure rate and API latency.
- Elasticity and cost: put static assets and attachments in object storage; use a message queue to smooth peak submission traffic; run on a container platform for elastic scaling.
- Compliance: minimize collection of personal information; define data retention periods and access scope.
7. A Reusable Methodology
AI compressed coding time by an order of magnitude, but the share of requirement clarification, data governance, and quality acceptance actually went up. The formula for stable output is: strictly bounded scope + structured prompts + programmatic validation + a clear acceptance checklist. If sensitive data is involved, a privately deployed solution can be preferred, or general capabilities from a compliant cloud platform such as Baidu AI Cloud (object storage, logging services, monitoring alerts, container platform) can carry the engineering work.
Next time a “ship in three hours” request arrives, don’t first ask whether AI can do it—first ask yourself: is the scope cut cleanly, is the data cleaned, are the acceptance criteria written down. Once those three questions are answered, efficiency follows.
