04. Projects for Practice: Building a Code Assistant
Explanation
Building a specialized assistant requires synthesizing persona, rules, technical context, and strict output formatting.
This project teaches you how to create a "locked-down" environment where the AI stays within a specific technical domain.
By defining negative constraints (e.g., "don't talk about Bootstrap"), you ensure the bot remains useful and focused.
Including formatting rules for code blocks ensures that the results are immediately usable and display correctly in your UI.
This represents the "production-ready" stage of prompt engineering, where you build a tool that users can truly rely on.
Mastery of this level allows you to build sophisticated AI-powered features that behave like professional-grade software.
Example
A system prompt for a Documentation writing bot that only uses Markdown and focuses on API reference style.
Exercise Task
Write a complete System Prompt for an AI bot called 'Tailwind-GPT'. It should only answer questions about Tailwind CSS. If asked about other CSS frameworks, it must politely decline. It should provide code snippets for all answers.
script.js
1
2
3
4
5
6
7
8
9
10
11
12
const tailwindGPTSystemPrompt = `
You are Tailwind-GPT...
Rules:
1. ...
2. ...
Output Format:
...
`;
console.log(tailwindGPTSystemPrompt);
Console
Click "Run" to execute your code...