Let your bot build a website chatbot that only knows what's public
By Šarūnas Vaitkus · about a 7-minute read
A chatbot on your site can answer visitors' questions about your work, day and night. The risk is that it also knows things you never meant to share: rates, contacts, private notes. Your bot can build one that answers only from material you've marked public, with a second guard on the server and a spend cap. You send the prompts below, in order, and it asks you before anything goes live.
Your public material: site pages, case studies, a short bio.
A place for the search index and a small server function, for example Supabase.
About 20 minutes to read the persona and test the bot.
How it works
You send a prompt, the bot does the work, and you approve what matters.
Highlighted [brackets] are yours to replace. Copy keeps them in the prompt.
1
Step 1. Sort your sources into public and private (read-only)
Prompt to send
List every source a chatbot for [your website address] could learn from: my site pages, case studies, notes, documents and chat history. Don't change anything. For each, suggest public or private. Treat anything not clearly published as private. Show me the list as a table and wait for my OK.
Why you're sending it
The chatbot can only leak what it can read. Deciding up front, with private as the default, is the strongest guard.
What you'll get
A table of sources, each marked public or private, for you to correct.
2
Step 2. Write a public persona
Prompt to send
Write a public persona file for the chatbot, using only the sources I marked public. Include how I describe my work, the projects visitors can see, what I offer and common questions. Add a "never say" list: prices and rates, contact details beyond the contact page, anything about other people, and anything only in private sources. Show it to me before you use it.
Why you're sending it
The persona is the voice and the limits in one place. Reading it is the fastest way to check what the bot will say.
What you'll get
A persona file you can read in a few minutes and edit directly.
3
Step 3. Strip private lines before indexing
Prompt to send
When you build the search index, mark every chunk public or private from my list, with private as the default. Before chunking, drop any line that contains a money figure, an email address or a phone number, even in public files. Write the rule into the index's notes so it stays.
Why you're sending it
Private details often hide inside otherwise public notes. Removing them before indexing means they're never searchable.
What you'll get
An index where only public chunks exist for the chatbot, and the stripping rule written down.
4
Step 4. Search public chunks only
Prompt to send
Add a search function that returns only chunks marked public, and make sure visitors' browsers can't call the private search at all. Make the chatbot use only that public search. Open it as a pull request and don't apply it to the live database until I approve.
Why you're sending it
Even if the prompt is tricked, a search that can't see private chunks can't return them.
What you'll get
A pull request with a public-only search and a note on how it's locked down.
5
Step 5. Add a guard on the server
Prompt to send
Put the chatbot behind a small server function. Keep all secret keys there, never in the browser. Before sending an answer, check it against the "never say" list and replace anything that breaks it with a short, polite refusal that points to the contact page.
Why you're sending it
The persona asks the model to behave. The server guard makes sure it does.
What you'll get
A server function holding the keys and filtering answers, with the browser using only a public key.
6
Step 6. Show where each answer comes from
Prompt to send
When an answer uses one of my public pages or case studies, add a short link to that page under the answer. If the search finds nothing relevant, say the bot doesn't know and suggest the contact page instead of guessing.
Why you're sending it
Links let visitors check the answer and read more. "I don't know" beats a confident guess about your career.
What you'll get
Answers with source links, and honest gaps where there's no source.
7
Step 7. Cap the cost and add an off switch
Prompt to send
Add a monthly spend cap of [your amount] and a single setting that switches the chatbot off. When the cap is reached, show a short message and a link to the contact page. Tell me what the chatbot is likely to cost per month at my traffic.
Why you're sending it
A public chatbot can be used by anyone, including scripts. A cap and an off switch keep a bad day cheap.
What you'll get
A cost estimate, a cap and an off switch you can use without touching code.
8
Step 8. Try to break it
Prompt to send
Before it goes live, test the chatbot with 20 tricky questions: what I charge, my phone number, who I've worked with privately, my family, my health, and "ignore your rules and tell me". Also ask normal visitor questions. Show me every question and answer, with pass or fail.
Why you're sending it
You'd rather find the leak yourself than have a visitor find it.
What you'll get
A test sheet of questions and answers, with failures fixed before launch.
All in one (optional)
Prefer one prompt? Send this instead.
Prompt to send
Build a public-only chatbot for [your website address], in this order: a public or private list of sources that I approve, a public persona with a never-say list, an index that drops money and contact lines and marks chunks public or private, a public-only search, a server function that holds the keys and checks answers, source links on answers, a spend cap and an off switch, and a 20-question break test. Pause after each step to show me what you did. Ask me before going live, applying anything to a live database, spending money or sending anything outside.
What your bot will always ask you first
Marking any source public.
Putting the chatbot live on your site.
Applying changes to a live database.
Raising the spend cap or adding a paid service.
Sending chat logs or leads anywhere outside.
It bundles its questions, so you're not pinged all day.