Data Preparation for ML and AI
MLA-C02 · 56 questions
- A city 311 call center streams both audio recordings and their text transcripts through Amazon Kinesis Data Streams and lands them in Amazon S3. An ML engineer needs a storage layout that supports both model training on the transcripts and later replay of the paired audio for quality review. Which approach best meets this need?
- A municipal permitting chatbot team is choosing between Amazon RDS for PostgreSQL with the pgvector extension and Amazon OpenSearch Service as the vector store behind the chatbot's retrieval step. The team expects tens of millions of document embeddings and heavy concurrent similarity-search traffic during business hours. Which choice best fits this workload?
- A public-works department collects water-meter inspection records that include both photos of meter dials and structured sensor readings (flow rate, pressure, timestamp). Before feature engineering begins, where should the photos and the structured readings be stored?
- A transit authority is choosing between Amazon Kinesis Data Firehose and Amazon Kinesis Data Streams to feed ridership counts into a demand-forecasting feature pipeline. The forecasting job only needs to read fresh batches of ridership data every few minutes from S3, with no need for custom per-record processing before landing. Which service fits this requirement?
- A court clerk's office converts case-record exports from CSV to Parquet to reduce Amazon Athena and AWS Glue scan costs for a downstream ML feature pipeline. Which property of Parquet is the main reason this conversion lowers those costs?
- A housing authority needs to merge inconsistent casework records — some CSV, some JSON, arriving from several county source systems with slightly different schemas — into a single feature table for a benefits-eligibility model. Which approach best handles this heterogeneous, multi-source merge?
- A benefits-eligibility scoring service needs low-latency access to the newest risk features at inference time, and it also needs historical feature snapshots for periodically retraining the model. Which SageMaker Feature Store design fits both needs?
- A permitting office ingests scanned permit-application PDFs into Amazon S3 and needs a metadata catalog that keeps each scanned document usable together with its searchable fields (applicant name, permit type, submission date) for a downstream multimodal document-understanding pipeline. Which approach best supports this?
- An emergency-management team streams 911 dispatch events through Amazon MSK into a pipeline that trains an anomaly-detection model on dispatch patterns. A colleague suggests replacing MSK with a nightly batch export instead. Which reason best justifies keeping the Kafka-based streaming approach?
- A city's 311 resident-facing chatbot needs to persist conversation session state, keyed by session ID, that will later be reused as fine-tuning data. The team is deciding between Amazon DynamoDB and Amazon RDS for this store, given that access is almost entirely single-item reads and writes by session key with no complex joins. Which choice fits this access pattern?
- A school district uses Apache Flink on Amazon Kinesis Data Analytics to compute windowed aggregations (for example, hourly attendance counts per building) from attendance-sensor streams before the results are stored for modeling. Why does performing this aggregation in the streaming layer, rather than as a later batch job against raw stored events, benefit the downstream modeling pipeline?
- An engineer partitions municipal water-quality sensor data in S3 by date, agency, and sensor ID to speed up downstream AWS Glue jobs that typically filter on a date range for a specific agency. Why does this partitioning scheme improve Glue job performance?
- A municipal open-data portal embeds its public-records document corpus and stores the vectors in Amazon OpenSearch Service to power a RAG-based public-records assistant. Which configuration choice is most important for this vector store to serve accurate retrieval for the RAG pipeline, beyond simply enabling k-NN search?
- A transit authority's ridership data lake is queried heavily through Amazon Athena, where most queries filter on a handful of columns out of dozens available and occasionally use complex predicate pushdown on nested fields. The team is choosing between ORC and Parquet as the storage format. Which consideration should drive the choice for this Athena-centric workload?
- A 911 call center ingests audio recordings and their transcripts into Amazon S3 to feed a multimodal content-safety screening pipeline that flags calls needing supervisor review. Which ingestion design best supports this downstream screening step?
- A county assessor's office has parcel records spread across several legacy source databases with inconsistent table structures. An ML engineer wants to build a unified view of the schemas before designing a feature-engineering pipeline. Which use of AWS Glue best fits this discovery step?
- A housing-eligibility model's SageMaker training job runs on an on-demand training instance and needs to persist checkpoints during the run so training can resume if the job is interrupted. Which storage choice is appropriate for these checkpoints during and after the run?
- A team configures an Amazon OpenSearch Service vector index to hold embeddings for a large municipal code corpus supporting a legal-research assistant. The embedding model produces 1,536-dimension vectors. Which configuration decision most directly affects whether retrieval works correctly?
- A transit authority streams real-time GPS pings via Amazon Kinesis into a data lake and is deciding whether to write raw JSON directly to S3 or add a conversion step to Parquet before landing. The downstream feature pipeline runs frequent, selective Athena queries filtering on route and time window. What is the most relevant tradeoff in this decision?
- A permitting office uses SageMaker Data Wrangler to bin continuous permit-processing-time values into categories such as fast, typical, and slow ahead of training a wait-time prediction model. Which situation makes binning this feature the right transformation choice?
- A court clerk's office is preparing scanned case-filing PDFs for a RAG knowledge base and must choose between fixed-size chunking and semantic chunking to split documents before embedding. Case filings contain long, legally structured sections (facts, arguments, rulings) where splitting mid-argument would hurt retrieval quality. Which chunking approach best fits this document type?
- A public-health department needs to redact PII such as Social Security numbers and home addresses from patient intake records before those records are used for feature engineering in a health-outcomes model. Which AWS Glue capability is designed for this redaction step?
- A water utility's billing and usage data is heavily right-skewed, with most accounts showing low usage and a long tail of very high-usage accounts. The team applies a log transform to this feature in a SageMaker Data Wrangler flow before training a leak-detection model. Why is a log transform an appropriate fix here?
- A 311 team is building a semantic-search assistant over historical service-request text and needs to select an embedding model to convert that text into vectors for retrieval. Which consideration should most directly guide this embedding-model selection?
- A permitting chatbot team applies tokenization and domain-specific text augmentation to municipal-code legal text before using it to fine-tune a foundation model. Which outcome is this advanced text pre-processing step primarily intended to achieve?
- A transit agency streams live bus-sensor data into a Kinesis data stream and needs to apply lightweight unit conversion and deduplication to each record before it lands in Amazon S3, with sub-second processing per record. Which approach best fits this requirement?
- A benefits-eligibility model uses income (ranging into six figures) and household size (single digits) as input features. Before training, an ML engineer notices the model trained on raw values weights income far more heavily than household size. Which SageMaker Data Wrangler transform addresses this most directly?
- A city clerk's public-records-request assistant retrieves answers from a RAG system built over a mixed archive of ordinances, meeting minutes, and permits. Residents often ask for documents from a specific department and date range. Which document-preparation step most directly enables the assistant to filter retrieval results by department and date?
- A county's feature-engineering pipeline must join a property-tax table with tens of millions of rows against a permitting table of similar size, and a single-node transform tool times out on the join. Which approach is best suited to complete this join reliably?
- A team wants to adapt a foundation model to municipal terminology by continuing its pre-training on a large volume of raw 311-service text, rather than teaching it to follow a specific instruction format. Which data-preparation choice correctly reflects continuous pre-training rather than supervised fine-tuning?
- A housing authority wants to fine-tune a foundation model on historical casework notes to help staff draft case summaries, but the notes contain resident names and home addresses. What should happen to this text before it is used as fine-tuning data?
- An emergency-management team is chunking lengthy response-plan documents before embedding them for a RAG-based dispatcher assistant. Using very large chunks with no overlap causes the assistant to retrieve passages that bury the specific procedure a dispatcher needs inside unrelated surrounding text. What is the most direct fix?
- A school district merges enrollment records from several source systems and finds that enrollment dates appear in multiple inconsistent formats across the combined dataset. Before feature engineering begins, which tool is best suited to profile the data and standardize these date formats?
- A public-works department is preparing a dataset of street-sign photographs in SageMaker Data Wrangler before training a computer-vision model to detect damaged signs. Which pre-processing steps are appropriate for this image data, as opposed to the techniques used for tabular features?
- A team wants to train a smaller, cheaper model to mimic the behavior of a larger foundation model on municipal chatbot queries. They plan to run a set of representative queries through the larger model and use its outputs as training targets for the smaller model. What does this describe, in terms of data preparation?
- A crime-pattern-analysis model uses a neighborhood/district code field with several hundred distinct values as an input feature. One-hot encoding this field would create hundreds of new sparse columns and bloat the feature set. Which SageMaker Data Wrangler encoding approach better fits this high-cardinality field?
- A 911 dispatch system streams call records through Amazon Kinesis before they land in a data lake for downstream ML use. Caller phone numbers and home addresses must be masked before any raw record is persisted. Which approach applies the masking at the right point in the pipeline?
- A document-understanding assistant for permit applications needs to answer questions using both the scanned permit-form images and their OCR-extracted text, along with metadata like permit type. During data preparation, what is essential to preserve so retrieval and generation work correctly at query time?
- A municipal open-data portal ingests a monthly CSV upload that feeds a downstream retraining pipeline. The team wants an automated check that flags when a column's data type or expected value range shifts from prior months, before the new data is used for retraining. Which capability addresses this directly?
- A housing-eligibility approval model is trained on historical decisions where the vast majority of records are approvals and only a small fraction are denials. The engineer wants the model to learn to recognize denial cases accurately rather than ignoring them. Which strategy most directly addresses this class imbalance?
- A water utility's sensor network occasionally reports pressure readings that are orders of magnitude outside the physically plausible range due to sensor malfunctions. Before these readings feed a leak-detection model, the team wants to automatically flag statistically implausible values. Which approach addresses this during data preparation?
- A water utility's consumption-forecasting dataset has gaps where sensor readings failed to report for a few hours at a time. The gaps are sparse and the underlying consumption pattern is skewed rather than symmetric. Which imputation choice best fits this situation?
- Before deploying a benefits-eligibility model, a city wants to confirm the model doesn't produce systematically different approval rates across demographic subgroups such as zip code or age bracket. Which SageMaker capability is purpose-built for evaluating this kind of subgroup disparity during data preparation and pre-deployment analysis?
- An auditor asks a municipal ML team to reproduce exactly which dataset version and feature transformations produced a permitting-delay model deployed six months ago. The team needs to trace this after the fact. Which practice during data preparation makes this kind of reproducibility possible?
- A permitting department's application dataset contains near-identical records for the same permit, created when residents accidentally submitted a form multiple times. Left uncorrected, these near-duplicates could bias a permit-approval-time model toward whatever pattern those repeated records happen to show. What should happen during data preparation?
- A county's property-valuation model joins a parcel table with a separate tax-assessment table using a parcel ID. Some parcel IDs in the assessment table don't correspond to any parcel in the parcel table, likely due to an upstream data-entry error. Which check would catch this before the join corrupts the training set?
- A public-safety team uses SageMaker Ground Truth to have human reviewers label dashcam footage for a hazard-detection model. Different reviewers frequently label the same clip differently, suggesting the labeling guidance may be ambiguous. Which practice helps identify and address this before the labels are used for training?
- A team is preparing a time-ordered dataset of benefits applications to train a model that predicts approval outcomes. They split the data into training and test sets by randomly shuffling all records regardless of application date. What data-preparation problem does this random split risk introducing?
- A parks-department maintenance-request dataset has a required 'reportedbydepartment' field, but a growing share of monthly uploads arrive with that field blank. The team wants automated rules that specifically track completeness thresholds for required fields over time and alert when a field's null rate climbs too high. Which capability fits this need?
- A transit-ridership forecasting model has been deployed for several months. The team wants to detect if the statistical properties of live production input data, like average trip distance or time-of-day distribution, have shifted away from what the model was originally trained on. Which capability addresses this ongoing concern after deployment?
- A municipal permitting office trains a resident-facing chatbot on historical request transcripts, and a bias metric shows most training examples originated from a single council district. What should the team do to correct this imbalance before continuing model development?
- A housing authority has three caseworkers manually label housing-casework case notes with sentiment tags to train a triage model. Before trusting the labeled set, what should the team do to validate label quality across the three annotators?
- An engineering team merges a county resident-services dataset with a city resident-services dataset and profiles the combined table using Glue DataBrew before modeling. The profile surfaces columns with high null rates and several duplicate resident records. What should the team do next?
- A public-works department is preparing a dataset of infrastructure photographs submitted by residents to train a model that flags road-damage severity. Before training, the team wants to check the image dataset for demographic and geographic bias the same way they would check a tabular dataset. What should they do?
- A public-records assistant retrieves from a RAG knowledge base built from municipal-code documents. Before ingesting new documents, the data-preparation team wants to validate training-data integrity for the knowledge base. What should they check?
- A school district's dataset for predicting student outcomes underrepresents one demographic group relative to district enrollment figures. The engineer applies a re-sampling technique to the training data as a bias-mitigation step. What is the engineer most likely doing?