Bottom line (TL;DR): A Reddit user shared a long prompt that makes an AI coding assistant build a business-specific chatbot with no LLM inside it. The chatbot runs on classical ML and a local SQLite database. The prompt does one step at a time and asks you questions along the way.
What the prompt actually does
It’s an unusual setup. You use an LLM to write the code, but the finished chatbot never calls one. It’s built on a runtime called DynaJS, with classical machine learning for intent detection and rule-based English replies. Everything is stored in SQLite: chat history, search, session state, human escalations, and a review queue for the model’s weak spots. That review queue matters more than it sounds. Every time the bot isn’t sure what a customer meant, the message lands in a list you can read, label, and feed back into training later. The bot gets better from your real traffic, not from guesses.
The prompt is built around a few ideas:
One step at a time. The AI is told not to design, code, train, and test in a single pass. It finishes a step, runs a verify check, and gives itself a confidence score. In a single-turn chat it stops and waits for you to reply CONTINUE. That keeps long builds from falling apart halfway through. It also gives you a natural place to catch a wrong turn early. If the confidence score comes back low, you know exactly which step to look at instead of digging through a pile of finished code.
Ask, don’t guess. The AI is encouraged to pause and ask about your business domain, terminology, escalation rules, and unclear intents at any step. It doesn’t invent business logic. For example, if you run a repair shop, it should ask whether “ready for pickup” and “done” mean the same thing to your customers, and when a person should take over instead of the bot.
Domain first. It finds out your exact business before writing anything. The goal is a chatbot built for one domain, not a generic multi-tenant framework. A narrow bot is easier to test, easier to trust, and far less likely to wander off topic.
Hard constraints. The prompt bans LLM imports and external AI calls. It limits the AI to the runtime’s own APIs, and it spells out resource cleanup rules so native memory gets closed properly. Rules like these are cheap to write and expensive to skip, because a model will happily reach for a familiar library if nobody tells it not to.
Offline data prep. Dataset downloading and paraphrase augmentation happen in separate setup scripts. Live request handlers never make outside HTTP calls. Train and test data must not overlap, and unrelated utterances go into a fallback class. That last rule is a quiet win. A bot with a proper “none of the above” bucket can say “let me get a person” instead of forcing a bad match.
A pinned database schema. The prompt includes full SQLite settings and table definitions, such as a sessions table with states like IDLE and AWAITING_SLOT. Nothing is left for the AI to improvise. Fixed state names also make debugging simple, since you can open the database and see exactly where a conversation got stuck.
Why this is worth studying
The domain is niche, but the structure works for almost any big build prompt. Gates between steps, permission to ask questions, a hard list of what’s forbidden, and exact specs for the risky parts all cut down on drift. If you’ve ever watched an AI confidently build the wrong thing, these are the guardrails you want.
A practical way to borrow this: pick the one part of your project where mistakes would hurt most, such as payments, data storage, or user permissions, and write that part as an exact spec inside the prompt. Leave the easy parts loose. You get precision where it counts without writing a novel.
Use cases 🧰
- A support bot for a clinic, repair shop, or local service that answers a fixed set of questions, like opening hours, pricing ranges, and appointment rules
- A bot for regulated fields where you need predictable, auditable replies, since every answer traces back to a rule and a logged intent
- Any big AI coding task where you want staged output and checkpoints instead of one giant dump, such as a data migration, an internal dashboard, or a multi-file refactor
A fair caveat
The post is only a link to a gist, and it had no comments when I read it. I couldn’t see the author’s test results. This approach also relies on a niche runtime, so you’d need to be comfortable with it before copying the setup. Rule-based replies can also feel stiff next to what a modern LLM produces, so expect trade-offs in tone. Treat the prompt as a template for how to structure a build, not as a proven recipe.
Prompt of the Day
Here’s a short version of the staging pattern you can reuse on any project:
“Act as a senior engineer. First, ask me up to five questions about my business and constraints. Then work strictly one step at a time. After each step, run a verification check, give a confidence score, and stop until I reply CONTINUE.”
If you want it stricter, add one line telling the AI to list what it did not verify at the end of each step. That small addition surfaces blind spots you’d otherwise find in production.
Call to action
Take one project you’ve been dreading, add a stop-and-verify rule to your prompt, and see how the output changes. If you want the full original, search for the gist by user corporatepiyush and adapt the parts that fit your stack.
Complete Prompt for LLM free chatbot for any business domain
by u/RatioPractical in PromptEngineering