Pragmatic AI Labs

Security for AI Applications

Extended! : Two more days to get Coursera Plus for $239/year and build in-demand skills.

Pragmatic AI Labs

Security for AI Applications

Alfredo Deza

Instructor: Alfredo Deza

Included with Coursera PlusLearn more

Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

1 week to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

1 week to complete
at 10 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Explain prompt injection, jailbreaks, data poisoning and data leaks in AI applications

  • Attack a local chatbot with injection, a hidden instruction, a leak and unchecked SQL

  • Add layered defenses and verify each one by running the same attack again

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

November 2026

Assessments

4 assignments

Taught in English

There are 3 modules in this course

You start with why an application that acts on words can be attacked with words, what a large language model is, and the pieces of an LLM application: the model, the system prompt, the person's input, documents and tools. You see how SQL injection was fixed with a wall between instructions and data, and why a language model has no such wall: direct and indirect prompt injection, jailbreaks, and why a filter is only one layer. Then poisoned training data, pickle files that run code, private data leaks and model output as untrusted input, and the OWASP Top 10 for LLM applications.

What's included

14 videos9 readings1 assignment

You meet a small help desk chatbot for a made-up bookshop, install a small model with Ollama, start the chatbot and check that it answers both kinds of question. Then you attack it: one sentence typed into the chat makes it promise every book is free, a customer review with a hidden line sends people to another site, and a plain question gets its private discount code. Beside it, you check a downloaded model file against its checksum and look inside without loading it, find and redact personal data in a chat log, and watch model-written SQL delete every shipped order.

What's included

9 videos6 readings1 assignment

You learn what makes an agent different, why too many tools means too much power, and when a human stays in the loop. Then defense in depth for AI: layers before and after the model, and a last layer words can't change. You add one defense at a time as a small patch, start the chatbot again and run the same attack: an input filter, a document check, an output check for the discount code, and SQL limited to one SELECT on a read-only connection. Last, why to test like an attacker, how to report an AI vulnerability, and six probes against the defended chatbot, all stopped.

What's included

12 videos6 readings2 assignments

Instructor

Alfredo Deza
Pragmatic AI Labs
84 Courses11,650 learners

Offered by

Explore more from Security

What brings you to Coursera today?

Why people choose Coursera for their career

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

Frequently asked questions