How I built an AU small business AI advisor with Gemini 2.0 Flash (and why Australian context changes everything)
Source: Dev.to
Most AI tools give Australian small businesses American advice. An Aussie tradie running Xero does not need to hear about QuickBooks. A cafe owner with three casual staff has Fair Work Act obligations that no generic “automate your business” tool will surface. I built AppZ AU Business Advisor to fix this — a free tool powered by Gemini 2.0 Flash that generates personalised automation blueprints with real Australian business context. This post covers the technical decisions, the prompt engineering approach, and why the AU-specific scaffold makes all the difference. When you ask a general AI “how should I automate my business?”, the training data skews heavily American. You get advice about QuickBooks, not Xero. About W-9 forms, not BAS lodgement. About 401k, not superannuation. For an Australian sole trader approaching the $75k GST registration threshold, this is not just unhelpful — it is actively misleading. The compliance obligations are different. The software ecosystem is different. The pain points are different. Instead of injecting “you are talking to an Australian business” as a keyword, I built a reasoning scaffold — a structured context block the model uses as a knowledge foundation: AUSTRALIAN BUSINESS CONTEXT:
- GST: 10%, mandatory registration at $75k annual turnover
- BAS: lodged quarterly (or monthly for large businesses) to the ATO
- Superannuation: 11.5% employer contribution, paid per payroll from July 2026
- ATO tools: STP Phase 2 mandatory for all employers
- Dominant accounting platforms: Xero, MYOB, Reckon (not QuickBooks)
- Fair Work Act: award rates, leave entitlements, payslip requirements
- Key software by vertical: ServiceM8 (trades), Deputy (hospitality), Cliniko (health)
This is not a keyword list — it is a reasoning foundation. When a tradesperson mentions “invoicing problems”, the model now reasons about Xero integrations, GST-inclusive invoicing, and BAS categorisation, not generic invoice templates. The key technical decision was using Gemini’s structured JSON output mode. Instead of asking for “a recommendation in JSON format” (which requires a parsing fallback), I use responseMimeType: “application/json” with a defined schema: const result = await model.generateContent({ contents: [{ role: ‘user’, parts: [{ text: prompt }] }], generationConfig: { responseMimeType: ‘application/json’, }, });
This returns clean, schema-conforming JSON directly — no markdown code fences to strip, no parsing errors to handle. The React components can render it immediately.
The output schema I defined:
type AdvisorOutput = {
summary: string; // 2-3 sentences, AU-specific
auContext: string; // Key AU compliance note for this business type
recommendations: Array;
implementationPlan: string; // 30-day steps with AU context
estimatedTimeSaved: string;
dollarsPerWeekSaved: string; // Calculated from optional hourly rate input
nextStep: string;
};
One addition that makes the output tangible: an optional hourly rate input. When provided, the model calculates dollar value of time saved rather than just “8-12 hours/week”: dollarsPerWeekSaved: “calculate: hours saved x $150/hr = $1,200-$1,800/week in recovered capacity”
This is much more compelling for a business owner than an abstract hours figure. Next.js 15 App Router with TypeScript Google AI SDK (@google/generative-ai) for Gemini calls Vercel for deployment (two serverless routes: /api/advisor and /api/email-capture) Fully stateless — no database, no auth, no data retained The app is live at gemini-xprize.vercel.app and the full source is on GitHub. It is a submission to the Gemini XPRIZE (Small Business Services category) but I built it as a real, useful tool first. The main shortcut for speed-to-competition: the product recommendations come from a hardcoded catalog rather than a live API. A production version would pull from Xero’s App Marketplace API or MYOB’s partner directory to give genuinely current recommendations. The Gemini side would stay the same — the AU context scaffold is the core value. If you are building something similar, the key lesson is: domain-specific reasoning scaffolds outperform keyword injection. Telling Gemini “you are talking to an Australian business” is much weaker than giving it a structured knowledge foundation about what that actually means operationally. Happy to discuss the prompt structure or the structured output approach in the comments.