Back to Build Logs

    Build Log

    The build was the easy part

    Built a grounded policy chatbot in about an hour, and learned the build was the easy half; trust, governance, and the human handoff were the real work.

    May 24, 2026Field Notes

    Problem

    A connection in my network asked if I'd help co-host a workshop showing people they could build a chatbot for a global mobility policy: upload the policy, let employees ask questions, get accurate answers back. I said yes. We put an hour on the calendar with Ferzeen Chhapgar from Alma, an immigration legal services firm, and decided to actually build the thing before we tried to teach it.

    We made one decision that taught me more than the build itself: we'd build it twice. Once in Google AI Studio, once in Lovable. Not everyone can get Lovable through procurement, and a Google-native tool is sometimes easier to get a corporate "yes" on, so if Google AI Studio could do the job, it might be the more accessible recommendation.

    What I Built

    I built a working policy chatbot in about an hour. Backend, authentication, document upload, a retrieval system that grounds every answer in the document you give it, an admin portal with chat logs. Functional. Deployable. Roughly four prompts.

    I'm not telling you that to impress you. It's the least interesting thing about this build, and almost every "look what I built with AI" post stops exactly there: at the speed. The speed is real. The speed is also a trap.

    How It Works

    I didn't write the technical spec myself. I described what I wanted to Gemini in plain English (a chat window, an admin area, document upload, a chat log) and asked it to write the kickoff prompt for the build platform. What came back specified things I'd never have thought to ask for: a proper data model, row-level security so regular users can't reach admin data, a chunk-and-embed pipeline so the bot answers from the document instead of making things up. That's the move worth stealing: you don't need to know how to write the prompt, you need to know how to describe what you want and let a capable model translate intent into the technical version.

    Lovable took that prompt and had something functional almost immediately. Google AI Studio was a slog: it can do backend work, but wiring up the pieces took far more effort, the interface was rough, and I couldn't get it working during the live call. We tested both on the clock and the decision made itself.

    The follow-up prompts are where the real work was, and not one was about making the bot talk better. They were about making it trustworthy: killing the open sign-up, restricting access to invited admins, adding password reset. And a pattern I kept reaching for: let people see the source. Let an admin download the exact document they uploaded, and let an employee download the specific document an answer came from. For a policy chatbot, the difference between a good tool and a liability is whether the human can check the AI's work.

    Lessons Learned

    The app ingests a document and answers from it. That's the feature, and it's also the entire risk. A global mobility or immigration policy isn't a benefits FAQ: the questions sit on top of the most sensitive data an employee has. So three things are non-negotiable, and none are technical: scrub the document before you upload it (policy language, not individual cases); know where the document lives (uploaded files leave your control, which is a data-governance decision to make before you deploy); and hold the line that this bot triages, it does not advise. It explains what the policy says; it does not counsel a person on their specific situation. An AI that confidently improvises immigration guidance isn't a feature, it's a lawsuit.

    That's the part you can't prompt your way to, and it's why Alma is in the room. The technology can reliably tell you what a policy says. It cannot tell a person what they should do. I bring the build; they own the advice layer. That division isn't a limitation of the tool. It is the design. The speed is the easy half. The half that takes a practitioner (what you upload, where it lives, and where the machine has to stop and a human has to start) is the half nobody's posting about.