Responsible AI Interview Questions
Bias, privacy, prompt injection and safe deployment.
What is prompt injection?
When untrusted input (a web page, an email, a document) contains instructions that hijack the model's behaviour. Mitigate by separating instructions from data, limiting tool permissions and reviewing high-impact actions.
Key Points:
- Treat retrieved content as data, never as instructions.
How do you protect PII in an LLM app?
Minimise what you send, redact or mask PII before calling the model, use providers with suitable data-retention terms, and log carefully.
Key Points:
- Least data, least privilege.
How can bias show up in AI systems?
Through skewed training data, labels, or how outputs are used. Test outputs across groups and keep humans in the loop for consequential decisions.
Key Points:
- Measure, don't assume.
What is AI alignment?
Alignment is the work of making an AI system's behaviour match human intentions and values — doing what users actually want, being honest, and avoiding harmful actions, even in situations it wasn't explicitly trained for.
Key Points:
- Techniques include RLHF, constitutional training and red-teaming.
- Matters more as models become more capable and autonomous.
What is a jailbreak and how is it different from prompt injection?
A jailbreak is when a user deliberately crafts prompts to make a model ignore its safety rules. Prompt injection is when malicious instructions are hidden in content the model processes — a web page, email or document — hijacking the app on behalf of an attacker rather than the user.
Key Points:
- Jailbreaks attack the model's policies; injection attacks the application.
- Injection is especially dangerous for agents with tools and data access.
How do you measure fairness in an AI system?
Define the groups you care about, then compare outcomes and error rates across them using metrics such as demographic parity, equal opportunity or equalised odds. Choose the metric that fits the use case, because some fairness definitions conflict with each other.
Key Points:
- You can't measure what you don't record — plan for group data carefully and lawfully.
- Fairness checks belong in ongoing monitoring, not just pre-launch.
What is explainability and why does it matter?
Explainability is the ability to understand why a model produced a given output. It matters for debugging, building user trust, meeting regulatory requirements, and giving people a meaningful explanation when a decision affects them.
Key Points:
- Tools like SHAP and LIME explain feature influence in traditional ML.
- For LLMs, citations and showing source context are practical explainability.
What is red-teaming?
Red-teaming is deliberately attacking your own AI system to find failures before users do — trying jailbreaks, prompt injection, harmful requests, bias probes and data-leak attempts — and then fixing what you find.
Key Points:
- Combine human experts with automated adversarial testing.
- Turn discovered failures into permanent regression tests.
How do you handle hallucinations in high-stakes domains?
Ground answers in trusted sources with RAG and citations, constrain the model to answer only from that context, add automated fact and consistency checks, show confidence or uncertainty, and keep a qualified human reviewer before outputs affect people.
Key Points:
- Design the product so a wrong answer is caught, not just rarer.
- Log and review failures to improve the system over time.
What is data poisoning?
Data poisoning is an attack where someone inserts malicious or misleading data into a model's training, fine-tuning or retrieval data to change its behaviour — for example planting a hidden trigger or biasing answers on a topic.
Key Points:
- RAG knowledge bases can be poisoned too, not just training data.
- Defend with data provenance, access control and anomaly checks.
What is a model card?
A model card is documentation that describes a model's intended uses, limitations, training data, evaluation results (including across different groups) and known risks, so others can decide whether and how to use it responsibly.
Key Points:
- Datasheets for datasets play the same role for training data.
- Good practice for transparency and governance reviews.
How do you handle copyright and IP concerns with generative AI?
Check the provider's terms on data use and output ownership, avoid prompting the model to reproduce protected works, add filters or similarity checks for code and text, keep records of generated assets, and involve legal review for commercial use.
Key Points:
- Rules differ by country and are still evolving.
- Prefer enterprise plans that don't train on your data.
How do you add content filtering to an LLM app?
Check both user inputs and model outputs against safety policies using moderation APIs or classifier models, block or rewrite unsafe content, and log flagged cases for review. Tune thresholds to your audience and use case.
Key Points:
- Filter both directions — inputs and outputs.
- Too-strict filters frustrate legitimate users, so measure false positives.