Back to Member Hub

Safe AI for Developers: Shipping AI Features Without Shipping the Risk

🔒 This course requires registration

To access this course and all our learning materials, please register for the AI Fluency programme.

Register Now →

This online course teaches developers how to build artificial intelligence features while avoiding potential problems and dangers. It targets software engineers and programmers who want to add AI capabilities to their applications but need guidance on managing risks properly. The curriculum covers essential topics including data privacy concerns, algorithmic bias detection, model security vulnerabilities, and ethical considerations in AI deployment. Students learn practical techniques for testing AI systems, identifying potential failure points, and implementing safeguards during development. Each lesson includes a quiz to test understanding, with a final examination at the course’s end. The material explains how to create AI solutions that function effectively while protecting users and maintaining system integrity.

The course provides practical skills that developers can immediately apply to their work projects. After completing the fifteen lessons, participants understand how to identify and address common AI risks before deployment. They learn to evaluate AI models for potential issues, implement proper testing procedures, and make informed decisions about AI feature development. The free format makes this knowledge accessible to anyone interested in responsible AI development. Learners gain confidence in creating AI applications that meet safety standards while delivering valuable functionality. This education helps prevent costly mistakes and potential harm that could result from poorly designed AI systems.

Frequently asked questions

How do you build AI features safely?

Safe AI development starts with threat modelling before code is written, then incorporates evaluation gates into CI/CD, structured logging from day one, and complete documentation as you build. Each component (input validation, guardrails, monitoring) should be designed and tested independently, then layered together. Documentation and audit-ready evidence should be captured as you work, not reconstructed after deployment.

What is prompt injection and how do you prevent it?

Prompt injection is when an attacker includes instructions in user input to redirect a model away from its intended task. Prevent it through layered defences: input validation and pattern detection, role-based access control on tools the model can invoke, structured output schemas that constrain what the model can return, and content segmentation that separates system instructions from user data in the prompt. No single defence is bulletproof; use multiple methods.

What should be logged when an application calls a language model?

Structured logs should capture: the user’s input, the model’s output, the model version and timestamp, execution metrics (latency, token count, cost), user actions after the response, and any errors. Implement data minimisation: log only what is necessary for audit and debugging. Use structured formats (JSON) so logs can be queried programmatically. Store logs separately from application data and restrict access to authorised personnel.

How do you test an LLM feature before release?

Test sets must be large, diverse and representative of actual production traffic. Include edge cases and failure modes intentionally. Ensure demographic representation so you can run fairness gates. Label test cases with expected outputs so you can measure correctness. Run automatic evaluation gates in CI that check performance, fairness, safety metrics and cost. Do not rely on a single test set; refresh and expand it as you discover new failure modes in production.

What are AI guardrails?

Guardrails are automated controls that constrain what a model can input, output or invoke. Input guardrails filter or reject suspicious user input. Output guardrails check for harmful content before it reaches the user. Tool call guardrails prevent the model from invoking tools improperly or without permission. Implement guardrails in layers (input, output, tool level) so that if one is bypassed, others catch attacks. Tune guardrails to balance safety and usability.

How do you stop an AI application leaking personal data?

Implement data minimisation: send to external systems only what is necessary for the stated purpose. Use secret management systems to store credentials outside the model’s reach; never embed secrets in prompts where prompt injection could expose them. Enforce access control on tools the model can invoke. Encrypt data in transit to model providers. Monitor logs for unusual data access patterns. Implement data retention policies so data is deleted when no longer needed.

What is a model card and what goes in it?

A model card is a document describing the model’s purpose, performance, limitations and risks. Required by Article 50 of the EU AI Act, it must include: model description and training data, performance metrics and fairness testing results, known limitations and risks, mitigations implemented, guardrails and constraints, and guidance on when human review is recommended. Write model cards as you build; they are living documents updated when the model changes or new issues are discovered.

Do developers have obligations under the EU AI Act?

Yes. Developers are part of the supply chain for AI systems. Article 5 prohibitions on certain practices (real-time biometric identification, social credit scoring, subliminal manipulation) apply regardless of who built the system. Developers must implement controls required for high-risk systems under Annex III, including testing, guardrails, monitoring, and documentation. ISO/IEC 42001 also imposes direct obligations on anyone involved in the AI lifecycle.

How do you add a kill switch to an AI system?

A kill switch is a flag or configuration that disables the AI feature entirely. Implement it as a feature flag or configuration that can be changed without redeploying code. Design it so it can be activated by an oncall engineer in seconds. When the kill switch is active, all requests are rejected with a message that the service is temporarily unavailable. Test kill switch procedures regularly (game days) to ensure the process works. Do not wait for a real failure to learn how to recover.

Course Content

1 of 2