Curated

Data Preparation for ML and AI 1 (1.1–1.2)

0 votes

Questions60

  1. Question 51

    Data Preparation for ML and AI

    Which practices preserve raw images and audio while associating them with training labels in Amazon S3? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Store image and audio files as S3 objects.D. Store labels and S3 object references in a manifest.

    AWhy this is right: S3 can store the original binary image and audio files without converting them to tabular data.

    BWhy not this: Numeric CSV representations do not retain the original image and audio files.

    CWhy not this: Label-based object keys alone do not preserve the media content.

    DWhy this is right: A manifest links media objects to labels without changing the original files.

    S3 objects preserve the original media, and a manifest associates each object with its labels. Converting media into numeric CSV columns changes its representation rather than retaining the raw files.

    Open this question
  2. Question 52

    Data Preparation for ML and AI

    An engineer has a pandas DataFrame of validated features and an existing SageMaker Feature Store feature group with a matching schema. Which approach ingests the rows into the feature group?

    Show the answer

    Correct answerD. Use the SageMaker Python SDK FeatureGroup ingest method.

    AWhy not this: A catalog entry describes data but does not write records into a feature group.

    BWhy not this: Placing a CSV in the offline store's S3 prefix does not ingest its rows through Feature Store.

    CWhy not this: An OpenSearch index is a separate destination, not a Feature Store ingestion mechanism.

    DWhy this is right: The SDK supports ingesting a pandas DataFrame into an existing feature group.

    The FeatureGroup ingest method ingests DataFrame rows into an existing feature group. Uploading a CSV to the offline store's S3 location does not invoke Feature Store ingestion.

    Open this question
  3. Question 53

    Data Preparation for ML and AI

    An engineer must backfill historical records into a feature group's offline store without changing its online store. Both stores are enabled; which PutRecord configuration meets this requirement?

    Show the answer

    Correct answerA. Set TargetStores to OfflineStore.

    AWhy this is right: OfflineStore restricts ingestion to historical storage and leaves online records unchanged.

    BWhy not this: OnlineStore directs the write to the store that must remain unchanged.

    CWhy not this: Targeting both stores allows the backfill to affect online records.

    DWhy not this: Omitting TargetStores targets all stores enabled for the feature group.

    TargetStores can direct a PutRecord request exclusively to OfflineStore. Leaving it unspecified targets all stores enabled for the feature group, which does not ensure that the online store remains unchanged.

    Open this question
  4. Question 54

    Data Preparation for ML and AI

    Which SageMaker Feature Store resource defines the feature schema and must exist before records can be ingested?

    Show the answer

    Correct answerC. Feature group

    AWhy not this: An OpenSearch index stores searchable documents rather than Feature Store records.

    BWhy not this: An S3 Access Point controls access to S3 data rather than defining feature records.

    CWhy this is right: A feature group defines the features and their types and receives feature records.

    DWhy not this: A crawler discovers schemas for the Data Catalog rather than defining a Feature Store destination.

    A feature group defines a collection of features and their schema and is the destination for ingested records. A Glue crawler discovers data schemas but does not create the Feature Store ingestion destination.

    Open this question
  5. Question 55

    Data Preparation for ML and AI

    A team will use Amazon Bedrock Model Distillation to train a smaller student model. It has thousands of representative production prompts but no approved responses. How should it prepare the training data?

    Show the answer

    Correct answerB. Supply the prompts as JSONL records and let the teacher model respond

    AWhy not this: Distillation does not need human-written responses; the teacher model generates them from the prompts.

    BWhy this is right: Bedrock uses the prompts to get responses from the teacher model and fine-tunes the student on them.

    CWhy not this: Unlabeled text is input for continued pre-training, a different job that transfers no teacher behavior.

    DWhy not this: Preferred and rejected response pairs are preference data for alignment, not distillation input.

    Amazon Bedrock Model Distillation takes prompts in JSONL files, has the teacher model generate the responses, and fine-tunes the student on that synthetic data. Hand-written responses are not required, and unlabeled text or preference pairs belong to other customization methods.

    Open this question
  6. Question 56

    Data Preparation for ML and AI

    An engineer must locate personal information in English support messages before removing sensitive spans from an ML training corpus. Which Amazon Comprehend capability should the engineer use?

    Show the answer

    Correct answerA. Personally identifiable information detection

    AWhy this is right: PII detection identifies supported sensitive information types and offsets that can guide removal.

    BWhy not this: Targeted sentiment analysis identifies sentiment toward entities rather than sensitive text spans.

    CWhy not this: Key phrase extraction identifies important phrases rather than sensitive personal information.

    DWhy not this: General entity recognition finds entities such as people and places, but does not provide the full supported PII detection coverage.

    Amazon Comprehend PII detection identifies supported types of personal information and their text offsets for redaction. Named entity recognition identifies general entities but is not a substitute for detecting sensitive information such as account numbers.

    Open this question
  7. Question 57

    Data Preparation for ML and AI

    A team removes names from a training dataset, but combinations of exact age, postal code, and occupation still identify individuals. The team must retain useful demographic patterns without retaining unique combinations. Which preparation approach BEST meets these requirements?

    Show the answer

    Correct answerD. Generalize demographic values and suppress rare combinations.

    AWhy not this: Scaling and encoding change representation, not the identifying information in demographic combinations.

    BWhy not this: Replacing names does not address identification through the remaining demographic attributes.

    CWhy not this: Deterministic hashes preserve distinct values and combinations, leaving linkage and uniqueness risks.

    DWhy this is right: Broader categories and suppression of rare combinations reduce identification risk while retaining demographic patterns.

    Generalization and suppression reduce identification through combinations of demographic attributes while retaining aggregate patterns. Deterministic hashing preserves the distinct combinations and does not resolve their uniqueness.

    Open this question
  8. Question 58

    Data Preparation for ML and AI

    A team creates several instruction-response examples from each source document for foundation model fine-tuning. Validation must measure performance on unseen documents, but paraphrased examples from the same source can have little wording overlap. How should the team prepare the splits?

    Show the answer

    Correct answerD. Split source documents first, then generate examples within each split.

    AWhy not this: Response length does not identify examples derived from the same document.

    BWhy not this: Embedding similarity can miss shared-source relationships; known source provenance provides a more reliable boundary.

    CWhy not this: Exact deduplication misses paraphrased examples that share source information across training and validation.

    DWhy this is right: Source-level separation prevents generated variants of the same document from crossing partition boundaries.

    Splitting by source before generating examples keeps related content out of multiple partitions and measures generalization to unseen documents. Exact deduplication does not catch paraphrases derived from the same source.

    Open this question
  9. Question 59

    Data Preparation for ML and AI

    A team wants a smaller language model to reproduce a larger teacher model's responses to customer questions. The team has representative questions but no reference answers. How should it prepare a response-based distillation dataset?

    Show the answer

    Correct answerD. Pair each question with its teacher-generated response.

    AWhy not this: Question paraphrases expand input variety but do not supply the teacher's answers.

    BWhy not this: Embeddings represent question meaning but do not supply target language-model responses.

    CWhy not this: Retrieved chunks provide grounding context, not the teacher outputs the student should learn to reproduce.

    DWhy this is right: Teacher responses provide target outputs that transfer the teacher's behavior to the student.

    Response-based distillation trains the student on representative inputs paired with teacher-generated outputs. Retrieved document chunks supply context but do not directly capture the teacher's response behavior.

    Open this question
  10. Question 60

    Data Preparation for ML and AI

    An engineer uses hour of day, recorded as integers from 0 to 23, in a distance-based model. Which transformation BEST preserves the proximity of hours across midnight while keeping all hours distinguishable?

    Show the answer

    Correct answerC. Encode the hour as sine and cosine coordinates on a daily cycle.

    AWhy not this: Min-max scaling retains the endpoints of a line rather than connecting the hours across midnight.

    BWhy not this: Standardization changes the scale but retains the artificial distance between hours across midnight.

    CWhy this is right: Paired sine and cosine coordinates preserve cyclic proximity and distinguish each hour of the daily cycle.

    DWhy not this: Broad time-of-day indicators merge distinct hours, losing the required hourly distinctions.

    Sine and cosine encoding places hours on a circle, keeping hours across midnight close while distinguishing all hours. Min-max scaling preserves a linear ordering, so midnight and 23:00 remain far apart.

    Open this question