Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
A data engineering team is designing an automated data preparation pipeline in Google Cloud. They are using Vertex AI to prompt a Large Language Model (LLM) to extract structured business entities from semi-structured source specifications, generate BigQuery SQL transformation scripts, and produce Dataform data quality assertion rules.
The automated pipeline requires deterministic, production-grade output. It must eliminate hallucinations, strictly enforce dialect-specific query optimizations (such as rewriting multiple-reference CTEs into temporary tables), output code in an easily parseable format, and ensure no semantic drift or unverified business assumptions are introduced into the transformation logic.
Which prompt engineering strategy should the team implement to formulate the most effective and reliable system prompt for the LLM?
This strategy is a comprehensive, directive prompt design framework that establishes strict boundaries, explicit personas, exact syntactic targets, and negative constraints for the Large Language Model (LLM). When generating mission-critical data transformation code and data quality rules, LLMs require structured instructions that leave no ambiguity regarding expected dialect standards and behavioral limits.
Open-ended or under-constrained prompting leads to nondeterministic code structures, unoptimized queries, and logical hallucinations. By combining detailed task parameters with rigorous negative constraints and explicit output templates, the data team achieves reproducible, enterprise-grade code generation.
This option relies on zero-shot open-ended generation, asking the model to interpret business specifications intuitively, infer missing requirements, and return natural language explanations without structured boundaries or optimization rules.
This approach would be acceptable for early-stage exploratory data discovery or interactive brainstorming sessions where human analysts manually review suggestions, rather than for an automated, production-grade data pipeline.
This approach uses a minimal persona-only system prompt and relies on downstream, client-side regular expression (regex) scripts to detect syntax patterns, inject BigQuery optimizations, and correct schema definitions.
The LLM was only performing simple text token replacement where grammar structure and semantic interpretation were completely irrelevant.
This approach uses unconstrained Chain-of-Thought (CoT) prompting, directing the LLM to output extensive natural language reasoning steps prior to generating the SQL and deliberately omitting negative constraints to grant the model broad creative freedom.
The goal was interactive human debugging, where an engineer desires a detailed explanation of why an LLM chose a particular algorithm during manual troubleshooting.
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