AI systems add new things to protect (training data, prompts, models, outputs) on top of everything a normal workload needs. These sections cover how AWS frames AI security, how to govern AI data, and how to keep outputs grounded.
Scoping and securing AI workloads
Securing AI starts by asking how much of the solution you own. The Generative AI Security Scoping Matrix answers that in five scopes, and the controls follow: least privilege, private networking, encryption and data policies.
How it works
| Scope | You use | You own |
|---|---|---|
| 1 Consumer app | A public generative AI service | Only what you type in |
| 2 Enterprise app | A vendor app with AI features | The contract and your data |
| 3 Pre-trained model | Your app on a third-party FM (e.g. via Bedrock) | App, prompts, data |
| 4 Fine-tuned model | A third-party FM tuned on your data | Plus the custom model |
| 5 Self-trained model | A model trained from scratch | Everything |
- Classify data and decide which categories may reach prompts or training.
- Grant least-privilege IAM access to models, knowledge bases and data stores.
- Keep traffic private (AWS PrivateLink) and encrypt data at rest (AWS KMS) and in transit (TLS).
- Find sensitive data with Amazon Macie; log with CloudTrail and model invocation logging.
Exam cues
- If the question says public chatbot and confidential data, think scope 1; keep confidential data out.
- If the question says fine-tune a provider’s model, think scope 4.
- If the question says private connectivity to the model API, think AWS PrivateLink.
- If the question says find PII in S3 training data, think Amazon Macie.
Remember
- Five scopes, by ownership; five disciplines, by concern.
- Encrypt training data, fine-tuning data and vector stores; TLS for prompts and context.
Trap: Moving from scope 3 to 5 adds responsibility. Every extra piece you own, you must secure.
Da documentação da AWS (7)
- The Generative AI Security Scoping Matrix sorts generative AI workloads into five scopes by how much of the model and data you own, to decide which security controls apply.
- Scope 1 is a public consumer app, scope 2 an enterprise app with embedded generative AI, scope 3 your own app on a pre-trained third-party model, scope 4 a fine-tuned third-party model, and scope 5 a model you train from scratch.
- For scope 1 consumer apps, use public, non-proprietary data, because the provider may use submitted data to improve its models.
- The scoping matrix names five security disciplines: governance and compliance, legal and privacy, risk management, controls, and resilience.
- Grant least-privilege access to foundation model endpoints and use private network communication between models and applications.
- Training datasets, fine-tuning datasets and vector databases should be encrypted at rest with fine-grained access controls, and prompts, outputs and retrieved context should be protected in transit with TLS.
- Data governance policies should classify data and restrict what can be used for training and inference, for example excluding PII from prompts unless it is anonymized.
Data governance for AI
Data governance decides what data AI may use, where it lives, how long it’s kept and how its history is tracked. Good governance makes models auditable and keeps regulated data under control.
How it works
| Practice | Purpose |
|---|---|
| Classification and usage policy | Decide which data may reach prompts or training |
| Lineage and cataloging | Trace sources and transformations for audits |
| De-identification | Mask, tokenize or remove PII |
| Lifecycle and retention | Keep only what’s needed, delete the rest |
| Residency | Keep data and processing in required locations |
| Logging and monitoring | Record access and changes (CloudTrail) |
Exam cues
- If the question says trace data origins and transformations, think data lineage.
- If the question says where data physically lives, think residency; how long it’s kept, think retention.
- If the question says train without exposing identities, think masking or tokenization.
- If the question says AI management system standard, think ISO/IEC 42001.
Remember
- Lineage supports audits and reproducibility.
- Minimize data: keep only relevant data, redact PII, delete when done.
Trap: Data residency isn’t the same as data sovereignty or retention; residency is only about location.
Da documentação da AWS (6)
- Data lineage tracks where data came from and how it was transformed, so you can trace a data element back to its source, reproduce workflows and show audit adherence.
- Sensitive training data can be protected with data removal, masking, tokenization and principal component analysis (PCA), using anonymized data instead of raw PII where it suffices.
- Keep only data relevant to the use case; automated data lifecycle management identifies data, redacts it when necessary and removes it when it's no longer needed, instead of keeping it indefinitely.
- Where data must stay within a geography, Amazon Bedrock geographic cross-Region inference keeps processing within a boundary such as the US or EU.
- Generative AI systems that ingest sensitive information raise compliance questions under privacy regulations such as GDPR, CCPA and HIPAA, so compliance teams should be involved early.
- ISO/IEC 42001 is an international standard for establishing, implementing, maintaining and improving an Artificial Intelligence Management System (AIMS).
Detecting and reducing hallucinations
Hallucinations can’t be switched off, but they can be made rare and caught. Ground the model in real data, tell it to admit uncertainty, check its answers against the source, and keep people reviewing high-stakes output.
How it works
- Ground: retrieve authoritative facts with RAG and put them in the prompt.
- Constrain: instruct the model to answer only from the context and say when it doesn’t know.
- Validate: run contextual grounding checks or Automated Reasoning checks in Amazon Bedrock Guardrails, or cross-check with another model.
- Review: send low-confidence or high-risk answers to people.
Exam cues
- If the question says answers must stay true to company documents, think RAG plus contextual grounding checks.
- If the question says verify answers against formal rules, think Automated Reasoning checks.
- If the question says high-risk decisions, think human-in-the-loop review.
Remember
- Hallucinations come from probabilistic generation and missing grounding data.
- Ground, constrain, validate, review.
Trap: Fine-tuning isn’t the main fix for hallucinations about facts that change; grounding with current data at query time is.
Da documentação da AWS (6)
- A hallucination, a confident but incorrect or fabricated answer, can lead to bad decisions, financial loss or compliance violations, which makes it a reliability and reputational concern for enterprises.
- Hallucinations come partly from the probabilistic nature of LLMs and partly from missing data; a model without facts to ground a response may make one up.
- Retrieval augmented generation reduces hallucinations by supplying facts from a knowledge base so answers are grounded in authoritative sources.
- Prompts can tell the model to acknowledge uncertainty instead of guessing, and secondary models can cross-check outputs against a knowledge base.
- Amazon Bedrock Guardrails contextual grounding checks flag responses that aren't grounded in the reference source or relevant to the query.
- Implement guardrails to mitigate harmful or incorrect model responses.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 18 flashcards em lista
What is the Generative AI Security Scoping Matrix used for?
It groups generative AI workloads by model and data ownership to help identify applicable security controls.
How can a team protect training data and prompts in an AI workload?
Encrypt datasets and vector databases at rest, and protect prompts and outputs in transit with TLS.
How can data governance reduce privacy risks in AI training and inference?
Classify data and restrict its use, such as excluding personal information from prompts unless anonymized.
Name the five security disciplines in the Generative AI Security Scoping Matrix.
Governance and compliance, legal and privacy, risk management, controls, resilience.
Which controls protect a RAG application's vector database and prompts?
Encryption at rest with fine-grained access control for the data stores, TLS in transit for prompts and retrieved context, and least-privilege IAM.
Under the shared responsibility model, who secures the data, prompts and access policies of an app built on Amazon Bedrock?
The customer. AWS secures the infrastructure that runs the service.
Does a scope 5 self-trained model need fewer controls than a scope 3 app because the company owns everything?
No. Owning the model and training data means owning more of the security responsibility, not less.
An auditor asks a team to show which source records fed a model and how they were transformed. Which practice provides this?
Data lineage tracking.
A health insurer wants to fine-tune a model on claims without exposing member names and IDs. Which techniques fit?
De-identify the data by masking or tokenizing direct identifiers (or removing them) before training.
What is the difference between data residency and data retention?
Residency is where data is physically stored and processed.
Retention is how long data is kept before deletion.
A team keeps every customer chat log forever in case it's useful for training later. Which governance practice does this break?
Data minimization and lifecycle management. Keep only relevant data and delete it when no longer needed.
A company wants certification that its AI management practices meet an international standard. Which standard fits?
ISO/IEC 42001, for Artificial Intelligence Management Systems.
Is encrypting a training dataset enough to make it safe to use PII for training?
No. Encryption protects data at rest; governance should still remove, mask or tokenize PII the model doesn't need.
Name three ways to reduce hallucinations in a generative AI application.
Any three of: RAG grounding, contextual grounding checks in Bedrock Guardrails, prompts that allow "I don't know", cross-checking output with another model, human review.
Why do LLMs hallucinate?
They generate probable text rather than look up facts, and when they lack grounding data they fill the gap with plausible-sounding content.
An assistant answers questions about policy documents and must never invent policies. Which combination fits on AWS?
RAG with Amazon Bedrock Knowledge Bases, plus Guardrails contextual grounding checks to block answers not supported by the documents.
Why is a hallucination a business risk and not only a quality issue?
Wrong answers given to customers or employees can cause financial loss, compliance violations and reputational damage.
Does a bigger model guarantee no hallucinations?
No. Hallucination comes from probabilistic generation and missing facts; grounding and validation reduce it.