Runbook
A runbook to find website backlinks without letting the model improvise
Tool access is half the job. The other half is a system prompt that makes the assistant say what it did, and stop when the tool says no.
SEO AI Pal research team ·
Start from the failure you want to prevent
Tidy and wrong. Ask an assistant to find website backlinks with no usable tool result and it will often fill the gap with something plausible. Every line of the prompt below closes one such gap.
Read it as a runbook. Not a spell. Each numbered rule maps to something that goes wrong in practice. Skipped calls come first, then silent retries after an error, then remembered numbers from earlier in the chat, then a missing mention of the monthly refresh.
The system prompt, six rules
Paste it as is, then edit the action names to match whatever you exposed.
You answer backlink questions ONLY from tool results.
1. For any question about links, call the tool. Never answer from memory.
2. After each call, print the `ok` value and the `_credits` remaining.
3. If ok is false, or the status is 401 or 402, say that in one line
and stop. Do not retry more than once.
4. Name the action you used (overview, refdomains, anchors, toppages).
5. The data is refreshed about monthly. Mention it when a link is missing.
6. Never state a number you did not receive in this chat.Decision table: what the assistant does with each result
| What came back | Correct reply | Wrong reply |
|---|---|---|
ok is true, rows present | Summarise the rows, quote _credits. | Add "approximately" figures from memory. |
ok is true, zero rows | Say the index holds nothing for that domain yet. Suggest checking the spelling and the monthly refresh. | Say the domain has no backlinks at all. |
| HTTP 401 | Report a missing or bad key, stop. | Retry with a made-up key. |
| HTTP 402 | Report that credit ran out, offer the free overview. | Claim the site is down. |
| Timeout, no JSON | Say the call failed, give no numbers. | Describe what the response probably contained. |
The weekly pass, five moves
- 1
Pick three domains you already know
Your own, one competitor, one big site. You know roughly what each should look like.
- 2
Ask the same three questions
Rating, top referring domains, anchors. Same wording every week, so differences come from data.
- 3
Check the receipts
Each reply must name an action and print
_credits. Missing receipt, failed test. - 4
Spot-check one number with curl
Run
curl "https://seoaipal.com/api.php?action=refdomains&q=example.com&per=10&key=sk_live_..."and compare the first rows. Two credits. - 5
Log what drifted
If the prompt began ignoring a rule, tighten that rule. Do not add more rules.
Three habits that quietly break the prompt
Long chats decay. After thirty exchanges the model weights recent text more than your first message. Start a new chat for each client.
Pasted dashboards confuse it. Mix a screenshot of another vendor's numbers into the same conversation and the model blends the two sources, which you will never untangle afterwards. Keep one source per chat.
Praise is the third. Telling it "great, that matches what I expected" teaches the next reply to lean toward what you expected. If a number looks off, say so neutrally and ask for the action name. When a reply goes wrong, the error table tells you whether the fault is the prompt, the key or the data.
Dates that belong in your notes
Date your prompt like code. Write the version and the day at the top, for example 2026-10-29, so that when a reply goes odd in March you can tell which wording produced it.
Link data also moves with Google. The March 2024 core update and the August 2025 spam update both shifted what people asked about links, and prompts written before them often assumed things that no longer held. Review the rules twice a year.
Keep a short changelog beside the prompt. Three lines per change is plenty. It turns a mystery into a diff.
Our position
Receipts beat tone
We would rather have a dull assistant that prints an action name and a balance than a fluent one that sounds sure. Fluency is cheap. A first look at the explanation shows why.