Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Machine Learning Engineer practice bank has an additional 974 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are deploying a Vertex AI customer-support application powered by a managed foundation model. Unstructured user prompts contain standard PII (SSNs and email addresses) and proprietary case IDs matching an enterprise regex pattern.
Your preprocessing and postprocessing architecture must meet these requirements:
Which architecture should you implement?
content.deidentify with CryptoReplaceFfxFpeConfig (FFX format-preserving encryption) across all unstructured text tokens, instruct the foundation model via XML-delimited system prompts not to repeat SSNs or modify tokens, and call content.reidentify on the model output during postprocessing.This option applies format-preserving encryption (FPE) in FFX mode (CryptoReplaceFfxFpeConfig) across all detected strings in unstructured prompts and relies on XML-delimited system prompt instructions to prevent the model from leaking SSNs.
CryptoReplaceFfxFpeConfig requires ASCII inputs of at least two characters from a restricted alphabet (between 2 and 95 characters) and performs best only on uniform, short lengths (recommended 32 bytes or fewer). It runs much slower than CryptoDeterministicConfig and lacks authentication and an initialization vector.RedactConfig keeps sensitive PII recoverable rather than permanently removing it from the inference context.CryptoReplaceFfxFpeConfig is intended only for legacy systems that strictly validate fixed string lengths and character sets (such as 10-digit numeric IDs).CryptoDeterministicConfig (AES-SIV) is much faster, imposes no character set limitations, and provides stronger authenticated encryption.DeidentifyTemplate is required to deterministically redact sensitive data from egress traffic.Tokenized identifiers had to conform to strict legacy length and character-set constraints, PII was separately redacted, and an inline Model Armor guardrail enforced egress inspection.
content.deidentify method synchronously during preprocessing using infoTypeTransformations with a regex-based custom infoType, RedactConfig for PII, and CryptoDeterministicConfig (AES-SIV) with a Cloud KMS wrapped key for case IDs; apply content.reidentify for authorized postprocessing alongside an inline Model Armor template configured with a DLP DeidentifyTemplate and fail-closed egress handling.This design combines synchronous Sensitive Data Protection (DLP API) content operations with inline Model Armor enforcement to establish deterministic security boundaries around both prompt ingress and model egress.
content.deidentify method processes unstructured text synchronously in memory and returns the transformed payload immediately without storing raw prompts or inspection results in Google Cloud. Using infoTypeTransformations with RedactConfig removes detected SSNs and email addresses while keeping the surrounding prompt text intact.infoType with CryptoDeterministicConfig (AES-SIV) and a Cloud KMS wrapped key replaces proprietary case IDs with deterministic, surrogate-tagged tokens. Identical case IDs produce identical tokens across turns, and content.reidentify restores the original IDs during postprocessing for authorized agents.data_protection_config referencing a DLP DeidentifyTemplate inspects model responses before they leave the boundary. Intercepting MATCH_FOUND verdicts and enforcing fail-closed error handling prevents sensitive data leakage even if prompt injection compromises model behavior.CryptoDeterministicConfig supports arbitrary character sets and variable string lengths with significantly faster execution.Synchronous content API calls eliminate the storage persistence and latency of batch DlpJob or ETL pipelines, while AES-SIV provides fast, authenticated reversibility and Model Armor guarantees platform-level egress enforcement.
DlpJob during preprocessing using recordTransformations with CryptoHashConfig (HMAC-SHA-256) and a regex-based custom infoType to hash both PII and case IDs, and call content.reidentify during postprocessing to restore the original case IDs while leaving PII hashed.This approach attempts to sanitize incoming prompts using an asynchronous DlpJob, field-level recordTransformations, and one-way cryptographic hashing (CryptoHashConfig) before calling content.reidentify to recover case IDs.
CryptoHashConfig uses HMAC-SHA-256 to replace sensitive values with a fixed-length base64-encoded hash. Because hashing is strictly one-way, content.reidentify cannot restore the original case IDs even when supplied with the original CryptoKey.DlpJob is built for asynchronous inspection of data at rest (such as Cloud Storage buckets or BigQuery tables) and persists job results in Google Cloud, making it unsuitable for low-latency, zero-persistence prompt preprocessing.recordTransformations applies transformations to specific columns in structured or tabular data. Unstructured, free-text prompts require infoTypeTransformations to locate and transform patterns embedded within sentences.DeidentifyTemplate, the pipeline cannot inspect or sanitize sensitive data generated or leaked in model responses.CryptoHashConfig preserves referential integrity for strings and integers so records can still be joined, but it does not support re-identification.DlpJob is asynchronous and stores inspection outputs in Google Cloud.recordTransformations requires structured field schemas rather than free-form text.The workload involved offline batch anonymization of structured BigQuery or Cloud Storage tables where analysts needed referential integrity for joins and never needed to re-identify the original values.
Redact transform configured with ReplaceWithInfoTypeConfig for both PII and regex-matched case IDs, and apply the Cloud Data Fusion Decrypt transform in postprocessing to restore case IDs while stripping PII.This design routes real-time inference traffic through a Cloud Data Fusion pipeline using the Sensitive Data Protection Redact transform with ReplaceWithInfoTypeConfig, then attempts to recover case IDs with the Decrypt transform.
ReplaceWithInfoTypeConfig overwrites each detected sensitive string with the static name of its infoType (such as US_SOCIAL_SECURITY_NUMBER or the custom case ID infoType name). Because this transformation destroys the original value and is not encrypted, the Cloud Data Fusion Decrypt transform cannot restore the case IDs.Decrypt step without Model Armor leaves model outputs unprotected against prompt injection or unintended data leakage.Decrypt transform only works on values previously encrypted with reversible algorithms such as Format-Preserving Encryption or Deterministic Encryption.ReplaceWithInfoTypeConfig provides neither reversibility nor referential integrity.The goal was an asynchronous ETL workflow sanitizing batch datasets before warehousing, using Deterministic Encryption instead of ReplaceWithInfoTypeConfig for fields requiring later decryption.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated