The promptsPromptThe text you give a model to work on, from a short question to long instructions with a role, context, examples and a required format. The quality of the output follows the clarity of the prompt more than its length. you write shape how AIArtificial intelligence (AI)A field that builds programs doing tasks that used to need a human mind, such as understanding language, recognising images and making decisions. Large language models are one small part of it, not all of it. behaves. A well-crafted prompt can educate, assist, and empower. A careless one can deceive, discriminate, or cause harm. As prompt engineers, we're not just users—we're designers of AI behavior, and that comes with real responsibility.
This chapter isn't about rules imposed from above. It's about understanding the impact of our choices and building habits that lead to AI use we can be proud of.
Ethical Foundations
Every decision in prompt engineering connects to a few core principles:
Honesty
Don't use AI to deceive people or create misleading content
Fairness
Actively work to avoid perpetuating biases and stereotypes
Transparency
Be clear about AI involvement when it matters
Privacy
Protect personal information in prompts and outputs
Safety
Design prompts that prevent harmful outputs
Accountability
Take responsibility for what your prompts produce
The Prompt Engineer's Role
You have more influence than you might realize:
- What AI produces: Your prompts determine the content, tone, and quality of outputs
- How AI interacts: Your system prompts shape personality, boundaries, and user experience
- What safeguards exist: Your design choices determine what the AI will and won't do
- How mistakes are handled: Your error handling determines whether failures are graceful or harmful
Avoiding Harmful Outputs
The most fundamental ethical obligation is preventing your prompts from causing harm.
Categories of Harmful Content
Violence & Harm
Instructions that could lead to physical harm
Illegal Activities
Content that facilitates breaking laws
Harassment & Hate
Content targeting individuals or groups
Misinformation
Deliberately false or misleading content
Privacy Violations
Exposing or exploiting personal information
Exploitation
Content that exploits vulnerable individuals
Building Safety Into Prompts
When building AI systems, include explicit safety guidelines:
A template for building safety guidelines into your AI systems.
Only the prompt in the box is sent to that site, nothing from your projects.
The Intent vs. Impact Framework
Not every sensitive request is malicious. Use this frameworkFrameworkA ready structure for building a kind of app, deciding for you how files are organised and how a request flows, while you fill in the parts, such as Next.js for the web. It differs from a library: you call a library, a framework calls your code. for ambiguous cases:
Work through ambiguous requests to determine the appropriate response.
Only the prompt in the box is sent to that site, nothing from your projects.
Addressing Bias
AI models inherit biases from their trainingTrainingThe stage where a model learns from huge amounts of data, ending at a certain date. What happened after that, the model knows only if it is given in the context. data—historical inequities, representation gaps, cultural assumptionsAssumptionA decision made for you when you do not know the answer, such as choosing "I don't know, suggest for me" in Talqeen's interview. Assumptions are gathered for you to review and confirm before the plan is built on them., and linguistic patterns. As prompt engineers, we can either amplify these biases or actively counteract them.
How Bias Manifests
Default Assumptions
The model assumes certain demographics for roles
Stereotyping
Reinforcing cultural stereotypes in descriptions
Representation Gaps
Some groups are underrepresented or misrepresented
Western-Centric Views
Perspectives skewed toward Western culture and values
Testing for Bias
Use this to test your prompts for potential bias issues.
Only the prompt in the box is sent to that site, nothing from your projects.
Mitigating Bias in Practice
Bias-prone prompt
Describe a typical CEO.
Bias-aware prompt
Describe a CEO. Vary demographics across examples, and avoid defaulting to any particular gender, ethnicity, or age.
Transparency and Disclosure
When should you tell people AI was involved? The answer depends on context—but the trend is toward more disclosure, not less.
When Disclosure Matters
Published Content
Articles, posts, or content shared publicly
Consequential Decisions
When AI outputs affect people's lives
Trust Contexts
Where authenticity is expected or valued
Professional Settings
Workplace or academic environments
How to Disclose Appropriately
Hidden AI involvement
Here's my analysis of the market trends...
Transparent disclosure
I used AI tools to help analyze the data and draft this report. All conclusions have been verified and edited by me.
Common disclosure phrases that work well:
- "Written with AI assistance"
- "AI-generated first draft, human edited"
- "Analysis performed using AI toolsTool useA model asking to run a function the app describes to it, such as a search or reading a file, with structured arguments. The app runs it and returns the result; the model runs nothing itself."
- "Created with AI, reviewed and approved by [name]"
Privacy Considerations
Every prompt you send contains data. Understanding where that data goes—and what shouldn't be in it—is essential.
What Never Belongs in Prompts
Personal Identifiers
Names, addresses, phone numbers, SSNs
Financial Data
Account numbers, credit cards, income details
Health Information
Medical records, diagnoses, prescriptions
Credentials
Passwords, API keys, tokens, secrets
Private Communications
Personal emails, messages, confidential docs
Safe Data Handling Pattern
Unsafe: Contains PII
Summarize this complaint from John Smith at 123 Main St, Anytown about order #12345: 'I ordered on March 15 and still haven't received...'
Safe: Anonymized
Summarize this customer complaint pattern: A customer ordered 3 weeks ago, hasn't received their order, and has contacted support twice without resolution.
Use this to identify and remove sensitive information before including text in prompts.
Only the prompt in the box is sent to that site, nothing from your projects.
Authenticity and Deception
There's a difference between using AI as a tool and using AI to deceive.
The Legitimacy Line
Legitimate Uses
AI as a tool to enhance your work
Gray Areas
Context-dependent, requires judgment
Deceptive Uses
Misrepresenting AI work as human-original
Key questions to ask:
- Would the recipient expect this to be original human work?
- Am I gaining unfair advantage through deception?
- Would disclosure change how the work is received?
Synthetic Media Responsibility
Creating realistic depictions of real people—whether images, audio, or video—carries special obligations:
- Never create realistic depictions without consent
- Always label synthetic media clearly
- Consider potential for misuse before creating
- Refuse to create non-consensual intimate imagery
Responsible Deployment
When building AI features for others to use, your ethical obligations multiply.
Pre-Deployment Checklist
Deployment Readiness
- Tested for harmful outputs across diverse inputs
- Tested for bias with varied demographics
- User disclosure/consent mechanisms in place
- Human oversight for high-stakes decisions
- Feedback and reporting system available
- Incident response plan documented
- Clear usage policies communicated
- Monitoring and alerting configured
Human Oversight Principles
High-Stakes Review
Humans review decisions that significantly affect people
Error Correction
Mechanisms exist to catch and fix AI mistakes
Continuous Learning
Insights from issues improve the system
Override Capability
Humans can intervene when AI fails
Special Context Guidelines
Some domains require extra care due to their potential for harm or the vulnerabilityVulnerabilityA flaw in a program or setting that lets someone do what they should not: read others' data, run code or take the service down. Keep your libraries updated, since many known vulnerabilities already have a published fix. of those involved.
Healthcare
Template for AI systems that might receive health-related queries.
Only the prompt in the box is sent to that site, nothing from your projects.
Legal and Financial
These domains have regulatory implications and require appropriate disclaimers:
Legal Queries
Provide general information, not legal advice
Financial Queries
Educate without providing personal financial advice
Jurisdiction Awareness
Laws vary by location
Children and Education
Age-Appropriate Content
Ensure outputs are suitable for the age group
Academic Integrity
Support learning, don't replace it
Safety First
Extra protection for vulnerable users
Self-Assessment
Before deployingDeploymentPutting a version of your app on servers users can reach, such as Vercel. It is best done automatically from the main branch after the checks pass, with a one-click way back to the previous version. any prompt or AI system, run through these questions:
Ethical Self-Check
- Could this be used to harm someone?
- Does this respect user privacy?
- Could this perpetuate harmful biases?
- Is AI involvement appropriately disclosed?
- Is there adequate human oversight?
- What's the worst that could happen?
- Would I be comfortable if this use were public?