Most internal AI tools don’t need a cleverer model — they need clearer instructions. These patterns make outputs more consistent, easier to check and safer to automate.
When an internal AI tool gives inconsistent results, the instinct is to reach for a bigger model. More often the fix is in the instructions. A well-structured prompt makes behaviour predictable, and predictable behaviour is what lets people trust — and automate — the output.
Separate instructions from data
Put the task, the rules and the input material in clearly marked sections. It helps the model tell what it is being asked to do from what it is being asked to work on — and makes it harder for text inside a document to be mistaken for an instruction.
You are a support assistant for our internal HR portal. <rules>- Answer only from the policy excerpts provided.- If the answer is not in the excerpts, say so and suggest contacting HR.- Keep answers under 120 words.</rules> <policy_excerpts>{{retrieved_policies}}</policy_excerpts> <question>{{employee_question}}</question>Show, don’t just tell
Two or three examples of good output teach format and tone faster than paragraphs of description. Choose examples that differ from each other, so the model learns the pattern rather than copying a single answer.
Ask for structured output
If another system will consume the result, request JSON that follows a defined schema and validate it before use. Many model APIs now offer structured output modes that guarantee the shape of the response — use them when they are available.
Note
Give the model a way out. Explicitly allowing “I don’t have enough information to answer” reduces invented answers far more than telling it not to guess.
Version and test your prompts
- Keep prompts in source control, not pasted into dashboards.
- Run a fixed set of test inputs whenever a prompt or model changes.
- Log prompts and outputs, with sensitive data removed, so issues can be reproduced.
“A prompt is code. Review it, test it and version it like code.”
Written by
Devant Data & AI
Data engineering and applied AI
Data engineers and applied AI specialists who take models and analytics from prototype to dependable production systems.




