# Apply few-shot prompting to improve output consistency and quality — Practice reading

Exam: CCAR-F — Claude Certified Architect - Foundations (CCAR-F)
Knowledge domain: Prompt Engineering & Structured Output
HTML: https://learningpathx.com/learning-path/CCAR-F/learn/448

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: single\_choice
Knowledge point: Few-shot examples as the most effective technique for achieving consistently formatted, actionable output when detailed instructions alone produce inconsistent results

A support team’s detailed instructions require a fixed incident-summary format, but the model’s reports still vary in headings, tone, and action items. Which prompt revision most directly addresses that failure?

### Options

**A**

Add approved input/output examples to show the required structure and key actions.

**B**

Add examples showing only the preferred tone, without headings or action items.

**C**

Add an approved heading list without sample inputs or populated findings.

**D**

Add examples of raw incidents without the corresponding approved summaries.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Add approved input/output examples to show the required structure and key actions.**: Approved examples provide a robust foundation for consistent structure and actionable output.
* **B — Add examples showing only the preferred tone, without headings or action items.**: Tone examples leave the observed structural and action-item variation unresolved.
* **C — Add an approved heading list without sample inputs or populated findings.**: Headings alone do not show the required tone or actionable contents.
* **D — Add examples of raw incidents without the corresponding approved summaries.**: Inputs without target outputs do not demonstrate the desired summary behavior.

## Question 2

Type: single\_choice
Knowledge point: Few-shot examples as the most effective technique for achieving consistently formatted, actionable output when detailed instructions alone produce inconsistent results

What is the defining element of few-shot prompting?

### Options

**A**

Including input and output examples directly within the prompt

**B**

Providing a detailed task specification without worked input-output examples.

**C**

Providing an output schema without demonstrated task responses.

**D**

Providing a retrieved policy document as reference context without example decisions.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Including input and output examples directly within the prompt**: Providing input and output examples directly within the prompt is the defining mechanism.
* **B — Providing a detailed task specification without worked input-output examples.**: This is instruction-only guidance rather than example demonstration.
* **C — Providing an output schema without demonstrated task responses.**: A schema constrains structure but is not a worked task example.
* **D — Providing a retrieved policy document as reference context without example decisions.**: Reference content supplies knowledge rather than demonstrations of the requested behavior.

## Question 3

Type: multiple\_choice
Knowledge point: Few-shot examples as the most effective technique for achieving consistently formatted, actionable output when detailed instructions alone produce inconsistent results

Which two practices make a few-shot prompt more reliable when the task includes edge cases? (Choose 2.)

### Options

**A**

Use consistently labeled examples covering representative task boundaries and meaningful edge cases.

**B**

Keep the core task definition clear and direct around the examples.

**C**

Use many examples from unrelated domains to maximize variety within the prompt budget.

**D**

Use near-duplicate easy cases so every example follows exactly the same surface pattern.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — Use consistently labeled examples covering representative task boundaries and meaningful edge cases.**: Relevant variation demonstrates the decision boundaries the task must handle.
* **B — Keep the core task definition clear and direct around the examples.**: Clear, direct task instructions remain necessary even when examples are present.
* **C — Use many examples from unrelated domains to maximize variety within the prompt budget.**: Unrelated diversity can consume context without teaching the required distinctions.
* **D — Use near-duplicate easy cases so every example follows exactly the same surface pattern.**: Near-duplicates do not cover meaningful edge cases.

## Question 4

Type: multiple\_choice
Knowledge point: Few-shot examples as the most effective technique for achieving consistently formatted, actionable output when detailed instructions alone produce inconsistent results

A review-brief pilot requires every finding to contain location, issue, severity and a suggested fix, within 120 words. Prose rules alone achieve all four fields in 65/100 cases. A 90-word few-shot example containing only location and issue raises length compliance to 98/100 but lowers four-field compliance to 40/100; all outputs finish normally. A 115-word complete example achieves both constraints in 93/100\. Which two decisions follow? (Choose 2.)

### Options

**A**

Prefer the complete 115-word example as the demonstration, and evaluate the remaining failures on unseen cases.

**B**

Revise demonstrations that omit severity or fixes, rather than treating the 98% length score as sufficient evidence of quality.

**C**

Add severity and fixes to the90-word demonstration while keeping it within120 words, then set the quality gate only on length compliance because its old98/100 score already establishes joint quality.

**D**

Use the complete115-word demonstration, but report its joint success as98/100 by carrying over the shorter example's length-compliance score rather than retaining the measured93/100 joint result.

Correct answer: A, B

### Explanation

The required outcome is joint compliance with all four fields and the120-word limit. The incomplete example has98/100 length compliance but only40/100 four-field compliance, so length alone cannot establish actionability. The complete115-word demonstration achieves both requirements in93/100 pilot cases. Its completeness makes it the better measured candidate and suggests targeted repair of the incomplete example, while unseen-case evaluation remains necessary. The observations do not prove that every missing field was caused by the example.

## Question 5

Type: multiple\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

An agent chooses the wrong tool for requests that sit near a boundary between two similar tools. Which two prompt-and-tool design changes are supported for clarifying that decision? (Choose 2.)

### Options

**A**

State each tool’s intended inputs, purpose, and boundary relative to the other tool.

**B**

Provide diverse, canonical examples of expected tool behavior and edge cases.

**C**

Add separate tool aliases for the same operation without changing their descriptions.

**D**

Add more examples of easy requests that both existing descriptions already classify correctly.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — State each tool’s intended inputs, purpose, and boundary relative to the other tool.**: Explicit complementary boundaries reduce the ambiguity between the two tools.
* **B — Provide diverse, canonical examples of expected tool behavior and edge cases.**: Diverse canonical examples show expected behavior across ambiguous cases and edge conditions.
* **C — Add separate tool aliases for the same operation without changing their descriptions.**: Aliases do not resolve the overlapping decision criteria.
* **D — Add more examples of easy requests that both existing descriptions already classify correctly.**: Easy examples do not demonstrate the failing boundary.

## Question 6

Type: multiple\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

A routing prompt has room for two new few-shot cases. Its policy is: use LOOKUP for status questions, CANCEL only for explicit cancellation of an identified order, and ASK when action or order identity is unresolved. Existing examples cover clear LOOKUP and identified CANCEL requests. Recorded failures are: "Please tell me whether cancellation has already happened for order7" -> CANCEL; and "Cancel the order I mentioned" with no earlier order reference -> CANCEL(order\_id=7), where the ID was inferred. Which two new demonstrations best cover the distinct decision boundaries? (Choose2.)

### Options

**A**

"Has cancellation gone through for order11?" -> LOOKUP, because the user requests state information rather than a new cancellation.

**B**

"Please cancel that order" with no earlier identifiable order reference -> ASK, because cancellation intent is explicit but the target identity remains unresolved.

**C**

'Cancel order 7' -> CANCEL, because it contains both the action and ID already represented in the library.

**D**

'Has order 9 shipped?' -> LOOKUP, because it is another unambiguous status question.

Correct answer: A, B

### Explanation

The two observed failures involve action intent and target identity, respectively. Contrastive examples A and B cover those missing boundaries within the two-example budget.

## Question 7

Type: single\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

A prompt contains these few-shot tool-selection examples: "Find the file called parser\_test.py" -> search\_paths, because the request names a file; "Find files containing retry\_budget" -> search\_content, because the request names text inside files; "Find the timeout thing" -> ask for clarification, because neither a filename nor a content cue is specified. A new request says, "I remember the diagnostic wording queue exhausted. Locate its occurrences in the repository; I do not know which file contains it." Which action follows the demonstrated ambiguity handling?

### Options

**A**

Run search\_content with queue exhausted as the search text, applying the example's content-cue rule.

**B**

Run search\_paths with queue exhausted as the filename, applying the example's file-name rule to the remembered wording.

**C**

Ask whether queue exhausted is a filename or content before searching, because the request uses locate instead of find.

**D**

Run search\_content and then search\_paths for queue exhausted, because every locate request must exercise both search rules.

Correct answer: A

### Explanation

The new wording supplies an explicit content cue even without a filename. The examples teach a decision boundary, including when clarification is needed.

## Question 8

Type: single\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

An agent can EXTRACT a claim as written, VERIFY a claim against evidence, or ASK for missing intent. Its examples all contain 'check this total' -> VERIFY. A held-out trace routes 'Copy the stated total; do not validate it' to VERIFY and 'Is the stated total supported by the line items?' to EXTRACT. The tools already have distinct schemas and correct descriptions. Which revision best addresses the demonstrated failure?

### Options

**A**

Replace keyword-dominated examples with paired transcription-versus-validation requests and short rationales explaining the different actions; include ASK only for genuinely unresolved intent.

**B**

Merge EXTRACT and VERIFY into one tool that always validates before copying, removing the need to distinguish user intent.

**C**

Add more examples containing 'check this total' -> VERIFY while preserving the current coverage.

**D**

Change every request containing 'total' to EXTRACT because the first failed request explicitly asks for transcription.

Correct answer: A

### Explanation

The trace shows failure to distinguish requested operations, not missing tool schemas. Paired examples expose the intent boundary that the current wording distribution obscures.

## Question 9

Type: single\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

An agent consistently mishandles a request type that falls between two tools whose descriptions already state their intended purposes. Which missing prompt element would most directly clarify the intended choice at that boundary?

### Options

**A**

Canonical examples for the ambiguous boundary

**B**

Additional examples of easy requests far from the boundary.

**C**

Examples containing tool names but omitting the request context that determines the choice.

**D**

A longer output schema for recording the selected tool.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Canonical examples for the ambiguous boundary**: Canonical examples provide the decision signal missing from prose-only guidance for ambiguous boundaries.
* **B — Additional examples of easy requests far from the boundary.**: Easy cases do not demonstrate the ambiguous distinction.
* **C — Examples containing tool names but omitting the request context that determines the choice.**: The decisive request context is needed to learn the boundary.
* **D — A longer output schema for recording the selected tool.**: Recording format does not clarify which tool should be selected.

## Question 10

Type: single\_choice
Knowledge point: The role of few-shot examples in demonstrating ambiguous-case handling (e.g., tool selection for ambiguous requests, branch-level test coverage gaps)

A moderation policy allows quoted threats in incident reports but blocks direct threats to a recipient. A few-shot pair labels “Report: a caller said ‘I will hurt you’” ALLOW and “I will hurt you” BLOCK. What does this pair demonstrate?

### Options

**A**

It shows which contextual difference places similar-looking inputs on opposite sides of the category boundary.

**B**

The threat phrase should receive the same label whenever its words are identical.

**C**

The label should depend on whether ALLOW examples are more numerous than BLOCK examples.

**D**

Any text containing the word report should be allowed regardless of the surrounding message.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — It shows which contextual difference places similar-looking inputs on opposite sides of the category boundary.**: The contextual difference changes whether the threat is being reported or directed at a recipient.
* **B — The threat phrase should receive the same label whenever its words are identical.**: The pair deliberately shows that context can change the label despite shared words.
* **C — The label should depend on whether ALLOW examples are more numerous than BLOCK examples.**: Example counts do not set the policy decision.
* **D — Any text containing the word report should be allowed regardless of the surrounding message.**: A single keyword is not equivalent to the policy’s contextual exception.

## Question 11

Type: single\_choice
Knowledge point: How few-shot examples enable the model to generalize judgment to novel patterns rather than matching only pre-specified cases

A support classifier is prompted with two labeled examples: "CSV export used to work but now fails" -> bug; "Please add PDF export, which the product does not offer" -> feature. A new request says, "The application promises CSV export; since yesterday the download contains only the header, although matching records are visible." Which classification best generalizes the demonstrated judgment?

### Options

**A**

Bug, because an existing promised capability is failing despite different wording.

**B**

Feature, because the request concerns export just like the PDF example.

**C**

Feature, because the exact phrase used to work is absent.

**D**

Unclassifiable solely because header-only output was not an example.

Correct answer: A

### Explanation

The examples distinguish failures of existing capabilities from requests for new capabilities. Generalization depends on that relationship, not phrase matching.

## Question 12

Type: multiple\_choice
Knowledge point: How few-shot examples enable the model to generalize judgment to novel patterns rather than matching only pre-specified cases

A classifier sees these few-shot examples: "Export crashes on launch" -> bug; "I wish export had a PDF option" -> feature. On a held-out set it labels every request containing "wish" as feature and every request containing "crash" as bug. Errors include "I wish the existing export would stop losing rows" and "Add a crash-simulation mode, which does not exist." A six-example budget prevents enumerating every wording. Which two revisions best target the observed failure and support judgment on new phrases? (Choose 2.)

### Options

**A**

Add paired examples that reuse the same cue words across opposite labels while explaining existing malfunction versus absent capability.

**B**

Use additional slots for varied descriptions of those two relationships, and evaluate on paraphrases excluded from the examples.

**C**

Use the remaining slots for correctly labeled malfunction requests containing crash and correctly labeled absent-capability requests containing wish, varying topics while retaining those word-label associations.

**D**

Add correctly labeled opposite-label pairs for wish and crash, then demonstrate generalization by rerunning only those same added pairs after tuning the prompt.

Correct answer: A, B

### Explanation

The errors reveal lexical shortcuts. Contrastive examples can break the spurious word-label association, and held-out paraphrases test whether the underlying distinction transfers.

## Question 13

Type: multiple\_choice
Knowledge point: How few-shot examples enable the model to generalize judgment to novel patterns rather than matching only pre-specified cases

A classifier follows the output format on easy cases but mislabels boundary cases; another example set labels boundaries correctly but uses inconsistent fields. Which two improvements should the team make? (Choose 2.)

### Options

**A**

Add correctly labeled contrastive boundary examples to the first set.

**B**

Normalize the second set’s outputs to the required field structure.

**C**

Duplicate the first set’s easy cases to increase its example count.

**D**

Keep the second set’s varied output fields so each label has a different format.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — Add correctly labeled contrastive boundary examples to the first set.**: The first set lacks the decision-boundary signal.
* **B — Normalize the second set’s outputs to the required field structure.**: The second set needs a consistent demonstrated output contract.
* **C — Duplicate the first set’s easy cases to increase its example count.**: Repeating easy cases does not cover the failing boundary.
* **D — Keep the second set’s varied output fields so each label has a different format.**: Field variation perpetuates the formatting failure.

## Question 14

Type: single\_choice
Knowledge point: How few-shot examples enable the model to generalize judgment to novel patterns rather than matching only pre-specified cases

A content filter must classify a novel post that sits between ALLOW and BLOCK examples. Which prompt structure gives the model the most useful basis for that judgment?

### Options

**A**

Clearly separated category definitions, representative boundary examples, and the new input.

**B**

Category definitions with examples only from easy cases far from the boundary.

**C**

Boundary inputs paired with output schemas but no selected labels.

**D**

A confidence threshold paired with category names but no decision criteria.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Clearly separated category definitions, representative boundary examples, and the new input.**: Definitions and boundary demonstrations provide decision guidance while delimiters distinguish examples from the new input.
* **B — Category definitions with examples only from easy cases far from the boundary.**: Easy cases leave the ambiguous boundary undemonstrated.
* **C — Boundary inputs paired with output schemas but no selected labels.**: Unlabeled inputs do not show the desired decision.
* **D — A confidence threshold paired with category names but no decision criteria.**: A confidence threshold does not define the boundary.

## Question 15

Type: single\_choice
Knowledge point: How few-shot examples enable the model to generalize judgment to novel patterns rather than matching only pre-specified cases

Only four examples fit in an extraction prompt. Which set is the best starting point for a task with multiple layouts and missing fields?

### Options

**A**

Four verified examples covering common layouts, a meaningful boundary, and a missing-field case.

**B**

Four copies of the most frequent clean input-output pair.

**C**

Four diverse examples from unrelated extraction domains.

**D**

Four complex inputs without corresponding validated outputs.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Four verified examples covering common layouts, a meaningful boundary, and a missing-field case.**: Relevant coverage supplies useful demonstrations within the budget and should be evaluated on the task.
* **B — Four copies of the most frequent clean input-output pair.**: Duplicates add little coverage.
* **C — Four diverse examples from unrelated extraction domains.**: Unrelated variation may not teach the required mapping.
* **D — Four complex inputs without corresponding validated outputs.**: Inputs without validated outputs do not demonstrate correct extraction.

## Question 16

Type: single\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

What is the main benefit of including concrete input-output pairs in an extraction prompt?

### Options

**A**

They demonstrate the intended mapping and missing-value handling, helping improve consistency and reduce invented values.

**B**

They remove the need for users to manually inspect the source documents.

**C**

They establish source truth from the example values when the new document is incomplete.

**D**

They make the output schema unnecessary whenever the example format is consistent.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — They demonstrate the intended mapping and missing-value handling, helping improve consistency and reduce invented values.**: Representative pairs, including missing-value cases, guide extraction without guaranteeing factual correctness.
* **B — They remove the need for users to manually inspect the source documents.**: Examples do not remove the need to validate extracted claims against source evidence. Appropriate validation can be automated, manual or both.
* **C — They establish source truth from the example values when the new document is incomplete.**: Example values are not evidence about a new document.
* **D — They make the output schema unnecessary whenever the example format is consistent.**: Examples complement a structural contract rather than replace enforcement.

## Question 17

Type: single\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

An extractor must normalize height statements written as both "5ft2in" and "five foot two." Use1foot=12inches and1inch=0.0254metres. The contract stores metres rounded directly to two decimal places and retains each original phrase and its source units. Which few-shot design correctly demonstrates both forms under this contract?

### Options

**A**

Pair both forms with 1.57 metres and their respective original phrases and source units.

**B**

Pair both forms with1.58metres by treating5feet2inches as5.2feet; retain each original phrase and feet/inches source units.

**C**

Pair both forms with1.57metres and retain each original phrase, but set both source-unit fields to metres because conversion has normalized the value.

**D**

Pair both forms with1.60metres by rounding1.5748 to1.6 first and padding a zero; retain each original phrase and feet/inches source units.

Correct answer: A

### Explanation

Both phrases describe5feet2inches: (5×12+2)×0.0254=1.5748metres, which rounds directly to1.57metres. The normalized metre value is separate from source provenance: each original phrase and feet/inches units must remain. A demonstrates the same supported conversion for both forms. Treating inches as tenths of a foot, relabeling source units as metres, or rounding to one decimal before padding violates a different part of the contract.

## Question 18

Type: single\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

A measurement extractor guesses a length of 30 cm when a source says only 'roughly arm-length'. Which few-shot pair best teaches the intended reduction in unsupported precision?

### Options

**A**

"about30cm" -> value30, unitcm, approximate true; "roughly arm-length" -> value null, unit null. Retain each original source phrase.

**B**

"about30cm" -> value30, unitcm, approximate true; "roughly arm-length" -> value30, unitcm, borrowing the first example's plausible size. Retain each original source phrase.

**C**

"about30cm" -> value30, unitcm, approximate true; "roughly arm-length" -> value30.000, unitcm, with exact precision inferred from formatting. Retain each original source phrase.

**D**

"about30cm" -> value null, unit null; "roughly arm-length" -> value null, unit null, discarding all informal measurements. Retain each original source phrase.

Correct answer: A

### Explanation

The pair distinguishes an explicitly stated approximate number from a qualitative phrase that supplies no numerical conversion rule.

## Question 19

Type: multiple\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

Which two features of few-shot extraction examples help demonstrate how to avoid invented values? (Choose 2.)

### Options

**A**

An input with no reported measurement paired with a null value rather than an estimated number.

**B**

An informal but explicit measurement paired with its supported normalized value and retained approximation.

**C**

Normalize “about 12 mm” to 12 mm while recording it as an exact measurement.

**D**

Only examples with perfectly labeled fields, so the model never sees ambiguity or missing information.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — An input with no reported measurement paired with a null value rather than an estimated number.**: The pair directly demonstrates how absence of evidence should be represented.
* **B — An informal but explicit measurement paired with its supported normalized value and retained approximation.**: The pair demonstrates normalization without silently converting an approximation into an exact measurement.
* **C — Normalize “about 12 mm” to 12 mm while recording it as an exact measurement.**: It preserves the central number but silently removes source uncertainty.
* **D — Only examples with perfectly labeled fields, so the model never sees ambiguity or missing information.**: A uniformly clean example set leaves missing and ambiguous cases without a demonstrated handling pattern.

## Question 20

Type: multiple\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

An extractor handles long equipment reports. A table report explicitly states "clearance: 12 mm"; a narrative report says "clearance about a finger width" and provides no conversion. The contract permits a numeric value only when the source states a number and unit, otherwise null with the source phrase. Current prompts use a table-only example and sometimes emit 12 mm for narrative cases. Only two examples fit in each request. Which two controls best address both layout variation and unsupported values? (Choose 2.)

### Options

**A**

Select a small relevant set of verified few-shot examples that includes narrative unknown-value handling as well as explicit numeric measurements.

**B**

Require each extracted measurement to cite the current report's supporting phrase, and reject numeric values that the phrase does not support.

**C**

Select verified table-numeric and narrative-unknown demonstrations, then accept a proposed number whenever it has a current-report line citation, without checking whether the cited phrase states that number and unit.

**D**

Use verified numeric examples in both table and narrative layouts as the two demonstrations, leaving out unknown-value handling because matching the visual layout is sufficient to teach every measurement boundary.

Correct answer: A, B

### Explanation

The two-example budget can show both an explicit numeric measurement and a narrative phrase with no supported numeric value. That contrast addresses the missing layout and unknown-value boundary. Each output must also be checked against the current report: a citation locates a phrase, but its content must support the reported number and unit. The table's 12 mm example cannot supply evidence for a different narrative source that states only finger width.

## Question 21

Type: single\_choice
Knowledge point: The effectiveness of few-shot examples for reducing hallucination in extraction tasks (e.g., handling informal measurements, varied document structures)

An extractor alternates between customer\_id and customerId for the same required field. The contract requires customer\_id. Which change most directly addresses this field drift?

### Options

**A**

Demonstrate the exact output format in the examples and use a supported structured-output schema when strict field structure is required.

**B**

Increase the output token budget while keeping examples with both field names.

**C**

Validate only that each response parses as JSON.

**D**

Add more complete examples while preserving both conflicting key conventions.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Demonstrate the exact output format in the examples and use a supported structured-output schema when strict field structure is required.**: Consistent examples demonstrate customer\_id and a supported schema can constrain the required key.
* **B — Increase the output token budget while keeping examples with both field names.**: More space does not settle a conflicting field convention.
* **C — Validate only that each response parses as JSON.**: Both key spellings can appear in syntactically valid JSON.
* **D — Add more complete examples while preserving both conflicting key conventions.**: More conflicting examples preserve the ambiguity.

## Question 22

Type: single\_choice
Knowledge point: Creating 2-4 targeted few-shot examples for ambiguous scenarios that show reasoning for why one action was chosen over plausible alternatives

A routing policy sends account-access blockers to technical support before billing investigation. Which targeted example most clearly explains this boundary using a brief, checkable rationale?

### Options

**A**

Input: charge inquiry blocked by failed sign-in; action: technical support; reason: account access is required before the charge can be inspected.

**B**

Input: charge inquiry blocked by failed sign-in; action: billing; reason: the request contains the word charge.

**C**

Input: charge inquiry blocked by failed sign-in; action: technical support; reason: this category is usually the most common.

**D**

Input: charge inquiry blocked by failed sign-in; action: technical support; reason: the model reports high confidence.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Input: charge inquiry blocked by failed sign-in; action: technical support; reason: account access is required before the charge can be inspected.**: The rationale names the policy’s decisive prerequisite and supports the selected route.
* **B — Input: charge inquiry blocked by failed sign-in; action: billing; reason: the request contains the word charge.**: Keyword routing ignores the stated access prerequisite.
* **C — Input: charge inquiry blocked by failed sign-in; action: technical support; reason: this category is usually the most common.**: Category frequency does not establish the correct route for this request.
* **D — Input: charge inquiry blocked by failed sign-in; action: technical support; reason: the model reports high confidence.**: Confidence is not an explanation of the policy boundary.

## Question 23

Type: multiple\_choice
Knowledge point: Creating 2-4 targeted few-shot examples for ambiguous scenarios that show reasoning for why one action was chosen over plausible alternatives

When creating a small set of targeted few-shot examples for ambiguous routing, which two components explicitly demonstrate the decision boundary? (Choose 2.)

### Options

**A**

A short rationale naming the decisive input feature and explaining why a plausible alternative action does not fit.

**B**

The chosen action associated with the example input.

**C**

A rationale selecting the most common route without identifying the request feature that changes the decision.

**D**

A list of all plausible actions with no selected action for the example.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — A short rationale naming the decisive input feature and explaining why a plausible alternative action does not fit.**: It exposes the feature that distinguishes the chosen action from a reasonable alternative.
* **B — The chosen action associated with the example input.**: The chosen action supplies the concrete target that the rationale supports.
* **C — A rationale selecting the most common route without identifying the request feature that changes the decision.**: Frequency does not explain why the selected action meets the current constraints.
* **D — A list of all plausible actions with no selected action for the example.**: An unranked action list leaves the desired response unresolved and therefore does not demonstrate a decision.

## Question 24

Type: single\_choice
Knowledge point: Creating 2-4 targeted few-shot examples for ambiguous scenarios that show reasoning for why one action was chosen over plausible alternatives

A support policy routes duplicate-charge reports to BILLING and failed account access to ACCESS; unresolved action intent goes to ASK. A prompt has four clear examples. Held-out errors include 'I cannot log in to dispute a duplicate charge' sent directly to BILLING although access must be restored first, and 'Close my case or account?' sent to ACCOUNT\_CLOSE without clarification. There is room to replace two examples. Which pair best addresses the errors while explaining the choices?

### Options

**A**

A mixed-intent example routed to ACCESS because the stated prerequisite blocks billing work, and an ambiguous closure example routed to ASK because the target action is unresolved.

**B**

Two additional duplicate-charge examples routed to BILLING, with stronger statements that money-related requests take precedence.

**C**

A mixed-intent example routed to BILLING because charge disputes are costly, and a closure example routed to ACCOUNT\_CLOSE because it is the more consequential interpretation.

**D**

Two clearer single-intent examples with longer descriptions of their final labels but no discussion of plausible alternatives.

Correct answer: A

### Explanation

The errors expose a prerequisite boundary and an unresolved-target boundary that the existing single-intent examples do not cover.

## Question 25

Type: single\_choice
Knowledge point: Including few-shot examples that demonstrate specific desired output format (location, issue, severity, suggested fix) to achieve consistency

A review finding must contain location, issue, severity and suggested fix. Which few-shot output provides a complete, actionable example of that format?

### Options

**A**

Location: auth.py:42; Issue: viewer can delete records; Severity: Important; Suggested fix: require the delete permission before the call.

**B**

Issue: viewer can delete records; Severity: Important; the remaining fields are left for the model to infer.

**C**

Location: auth.py:42; Finding: please check this; Severity: Important; Suggested fix: improve the code.

**D**

Location: auth.py:42; Issue: viewer can delete records; Severity: Important; Suggested fix: rename the delete function for clarity.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Location: auth.py:42; Issue: viewer can delete records; Severity: Important; Suggested fix: require the delete permission before the call.**: All four fields are present and the suggested fix addresses the stated issue.
* **B — Issue: viewer can delete records; Severity: Important; the remaining fields are left for the model to infer.**: Omitting fields fails to demonstrate the complete target layout.
* **C — Location: auth.py:42; Finding: please check this; Severity: Important; Suggested fix: improve the code.**: Field labels alone are insufficient when issue and fix text do not state an actionable problem or correction.
* **D — Location: auth.py:42; Issue: viewer can delete records; Severity: Important; Suggested fix: rename the delete function for clarity.**: The fields are present, but renaming does not correct the authorization defect.

## Question 26

Type: multiple\_choice
Knowledge point: Including few-shot examples that demonstrate specific desired output format (location, issue, severity, suggested fix) to achieve consistency

A team needs review findings to use a consistent location, issue, severity, and suggested-fix structure across varied code changes. Which two prompt additions support that goal? (Choose 2.)

### Options

**A**

A library of verified input-output pairs that consistently populates all four required fields.

**B**

Additional verified pairs for edge cases, using the same four-field contract as common cases.

**C**

A library with broad scenario coverage but different field names and omitted fixes across outputs.

**D**

A library of repeated easy examples that never includes locations or fixes.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — A library of verified input-output pairs that consistently populates all four required fields.**: It demonstrates the complete required format.
* **B — Additional verified pairs for edge cases, using the same four-field contract as common cases.**: It extends that format to the relevant input variation.
* **C — A library with broad scenario coverage but different field names and omitted fixes across outputs.**: Coverage without a consistent contract reinforces field drift.
* **D — A library of repeated easy examples that never includes locations or fixes.**: Repetition leaves the missing fields undemonstrated.

## Question 27

Type: multiple\_choice
Knowledge point: Including few-shot examples that demonstrate specific desired output format (location, issue, severity, suggested fix) to achieve consistency

A review API requires each finding as {location:{file,line}, issue, severity, suggested\_fix}; exact replacement text is optional inside suggested\_fix. The policy reports demonstrated defects and skips style-only differences. Example E1 labels a reproducible null dereference but puts the line number in issue and omits severity. E2 has the correct shape but reports an accepted naming preference. Outputs reproduce both errors. With room for two examples, which two revisions best address the interacting faults? (Choose 2.)

### Options

**A**

Replace E1 with the null-dereference case using location:{file,line}, explicit severity and an actionable fix; include replacement text only when supported.

**B**

Replace E2 with a no-finding response for the accepted naming pattern, and explain why matching the output shape does not make it reportable.

**C**

Replace E1 with a complete null-dereference finding using nested location, explicit severity and an actionable fix, but require exact replacement text for every example and fill unavailable replacements with a plausible guess.

**D**

Use complete nested fields for both examples and keep E2 as a low-severity finding with a naming suggestion, because a correctly shaped record should be emitted even for an accepted local pattern.

Correct answer: A, B

### Explanation

The examples contain different faults: E1 misdemonstrates the output structure and E2 misdemonstrates reportability. Both must be corrected for consistent useful findings.

## Question 28

Type: single\_choice
Knowledge point: Including few-shot examples that demonstrate specific desired output format (location, issue, severity, suggested fix) to achieve consistency

An eligible Anthropic Messages client tool supports input\_examples and has an input\_schema for nested reporter details. Calls meet the schema but misuse optional details on boundary cases. Which change most directly adds schema-conforming parameter demonstrations?

### Options

**A**

Add diverse input\_examples objects that conform to input\_schema and show the relevant optional-field boundaries.

**B**

Add input\_examples objects that violate input\_schema to illustrate what invalid calls look like.

**C**

Set strict: true and assume that structural conformance defines when optional details are semantically appropriate.

**D**

Put unrelated successful tool results in the description without their corresponding argument objects.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Add diverse input\_examples objects that conform to input\_schema and show the relevant optional-field boundaries.**: Valid argument examples demonstrate the missing semantic usage pattern for this supported interface.
* **B — Add input\_examples objects that violate input\_schema to illustrate what invalid calls look like.**: Tool input examples must conform to the input schema.
* **C — Set strict: true and assume that structural conformance defines when optional details are semantically appropriate.**: Strict structure does not teach the contextual meaning of optional parameters.
* **D — Put unrelated successful tool results in the description without their corresponding argument objects.**: Unpaired outputs do not demonstrate the intended argument handling.

## Question 29

Type: single\_choice
Knowledge point: Including few-shot examples that demonstrate specific desired output format (location, issue, severity, suggested fix) to achieve consistency

A source explicitly states 9 September 2026\. The output contract requires YYYY-MM-DD. Which few-shot output demonstrates the required normalization?

### Options

**A**

2026-09-09

**B**

09/09/2026

**C**

2026-09

**D**

September 9, 2026

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — 2026-09-09**: It includes year, month, and day in the required order and separator format.
* **B — 09/09/2026**: It uses a different order and separators.
* **C — 2026-09**: It omits the known day.
* **D — September 9, 2026**: It retains a prose format rather than the required numeric format.

## Question 30

Type: multiple\_choice
Knowledge point: Providing few-shot examples distinguishing acceptable code patterns from genuine issues to reduce false positives while enabling generalization

A review assistant flags every close-like call as a double release. Its two few-shot examples both show genuine errors: release(h); release(h) on a non-idempotent handle. In the target codebase, releaseOnce(h) safely does nothing after the first release, while release(h) still fails on a second call. A candidate change renames variables but calls releaseOnce twice; another change calls release twice through different aliases of the same handle. Review time permits only two added examples. Which two choices best improve precision without hiding genuine aliasing defects? (Choose 2.)

### Options

**A**

Add a verified acceptable example using releaseOnce twice, including the idempotence contract and a no-finding output.

**B**

Add a genuine-issue example where two aliases refer to the same non-idempotent handle, with a finding tied to that shared identity.

**C**

Add two verified no-finding demonstrations of releaseOnce: one repeats a variable name and one uses aliases of the same handle, leaving out non-idempotent alias defects.

**D**

Add two verified findings for repeated release through different aliases of a non-idempotent handle, varying the variable names but leaving out every acceptable releaseOnce case.

Correct answer: A, B

### Explanation

The desired boundary depends on operation semantics and object identity. Paired acceptable and defective examples expose both factors within the limited budget.

## Question 31

Type: single\_choice
Knowledge point: Providing few-shot examples distinguishing acceptable code patterns from genuine issues to reduce false positives while enabling generalization

A reviewer prompt contains examples of genuine defects but keeps flagging a documented acceptable pattern. What change most directly gives the model the comparison it lacks?

### Options

**A**

Pair a verified finally-based cleanup example labeled acceptable with an early-return resource leak labeled defect.

**B**

Add more copies of defect examples without the acceptable pattern.

**C**

Add a second defect example whose resource names resemble the acceptable pattern but whose control flow differs.

**D**

Relabel all cleanup-related examples acceptable without checking their execution paths.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Pair a verified finally-based cleanup example labeled acceptable with an early-return resource leak labeled defect.**: The contrasting verified paths show why similar-looking code receives different labels.
* **B — Add more copies of defect examples without the acceptable pattern.**: Repeating defect examples does not show that the disputed pattern is acceptable.
* **C — Add a second defect example whose resource names resemble the acceptable pattern but whose control flow differs.**: Surface resemblance without an acceptable counterpart leaves the classification boundary unclear.
* **D — Relabel all cleanup-related examples acceptable without checking their execution paths.**: Unverified relabeling can hide genuine leaks.

## Question 32

Type: single\_choice
Knowledge point: Providing few-shot examples distinguishing acceptable code patterns from genuine issues to reduce false positives while enabling generalization

A local API treats cache.get(key) == null as a normal cache miss, but directory.lookup(user) == null means the user is unknown and must not be dereferenced. A reviewer trained on 'null checks are required' flags an accepted cache-miss fallback and misses a directory result used as user.id without a check. Both calls return nullable objects. Which few-shot redesign best supports generalization beyond function names?

### Options

**A**

Use a contrasting pair showing the safe cache-miss fallback and the unsafe directory dereference, with each explanation tied to the return contract and downstream use.

**B**

Pair the accepted cache fallback with the unchecked directory dereference, but label both as findings because each call can return null, disregarding the fallback's handled-null path.

**C**

Pair a directory lookup that checks and handles null with a cache result dereferenced while null; label the directory case a finding and the cache case no finding solely by their function names.

**D**

Show a null cache result dereferenced unchecked and a null directory result dereferenced unchecked, both correctly labeled findings, and omit all handled-null examples.

Correct answer: A

### Explanation

Nullability alone is not the defect: the contract and how the result is used distinguish a handled miss from an unchecked dereference.

## Question 33

Type: single\_choice
Knowledge point: Providing few-shot examples distinguishing acceptable code patterns from genuine issues to reduce false positives while enabling generalization

A reviewer falsely flags a resource release in a finally block as a leak. Which example should similarity retrieval prioritize for the prompt?

### Options

**A**

A verified acceptable finally-based cleanup with a comparable early-return path.

**B**

A verified naming-style example from a file with the same filename.

**C**

A verified leak example using the same variable name but a different lifetime pattern.

**D**

A verified formatting example from the same repository.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — A verified acceptable finally-based cleanup with a comparable early-return path.**: It matches the control-flow boundary that caused the false positive.
* **B — A verified naming-style example from a file with the same filename.**: Filename similarity does not teach cleanup behavior.
* **C — A verified leak example using the same variable name but a different lifetime pattern.**: Variable-name overlap is less relevant than the lifetime distinction.
* **D — A verified formatting example from the same repository.**: Repository identity does not make formatting guidance relevant to the leak claim.

## Question 34

Type: multiple\_choice
Knowledge point: Providing few-shot examples distinguishing acceptable code patterns from genuine issues to reduce false positives while enabling generalization

A project's illustrative pseudocode contract says withResource() always closes its resource when the block exits; openResource() requires an explicit close on every exit. A few-shot review prompt must distinguish safe code from real leaks. Which two labeled examples should be added for this distinction? (Choose 2.)

### Options

**A**

withResource(r => { if (empty(r)) return; use(r); }) -> no leak finding, because the wrapper closes on the early return.

**B**

r = openResource(); if (empty(r)) return; use(r); close(r); -> leak finding on the early-return path.

**C**

withResource(r => use(r)) -> leak finding solely because close is not written inside the block.

**D**

r = openResource(); if (empty(r)) return; close(r); -> no leak finding because one close appears in the function.

Correct answer: A, B

### Explanation

A useful pair applies the cleanup contract to exit paths and shows both an acceptable abstraction and a genuine missing cleanup.

## Question 35

Type: multiple\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

Which two few-shot designs directly demonstrate handling varied source-document structures? (Choose 2.)

### Options

**A**

Map an inline author-year citation and a bibliography citation to common fields, leaving unreported title or page fields null.

**B**

Show an explicitly labeled Methods section and equivalent process details embedded in narrative mapped to the same method fields.

**C**

Treat the absence of a Methods heading as proof that the document contains no method information.

**D**

Fill missing bibliography titles from the most similar complete example.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — Map an inline author-year citation and a bibliography citation to common fields, leaving unreported title or page fields null.**: It demonstrates layout variation and source-supported partial records.
* **B — Show an explicitly labeled Methods section and equivalent process details embedded in narrative mapped to the same method fields.**: It teaches recognition of method details independently of heading placement.
* **C — Treat the absence of a Methods heading as proof that the document contains no method information.**: Method information can appear in narrative, so a heading-only rule misses relevant evidence.
* **D — Fill missing bibliography titles from the most similar complete example.**: Similarity does not establish missing facts about the current reference.

## Question 36

Type: single\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

An extractor handles bibliographies and numeric inline citations such as \[3\], but misses “Lee (2025)” inside paragraphs. Which addition directly addresses the observed gap?

### Options

**A**

A paragraph containing Lee (2025) paired with the supported author and year fields.

**B**

Another \[3\] example paired with its bibliography lookup result.

**C**

A complete bibliography entry for Lee (2025) without its paragraph context.

**D**

A paragraph containing Lee (2025) paired with an empty reference list.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — A paragraph containing Lee (2025) paired with the supported author and year fields.**: It demonstrates the failing author-year inline mapping.
* **B — Another \[3\] example paired with its bibliography lookup result.**: Numeric citations are already handled.
* **C — A complete bibliography entry for Lee (2025) without its paragraph context.**: A bibliography-only example omits the missing inline structure.
* **D — A paragraph containing Lee (2025) paired with an empty reference list.**: It teaches the existing omission rather than correcting it.

## Question 37

Type: single\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

A paragraph says “The method follows Lee (2025)” and supplies no title. The schema requires author, year, and nullable title. Which example output correctly maps the source?

### Options

**A**

author: Lee; year: 2025; title: null

**B**

author: Lee; year: 2025; title: The method

**C**

author: null; year: null; title: null

**D**

author: Lee; year: 2026; title: null

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — author: Lee; year: 2025; title: null**: It preserves the available author and year and marks the absent title null.
* **B — author: Lee; year: 2025; title: The method**: The surrounding prose does not state a publication title.
* **C — author: null; year: null; title: null**: It discards information explicitly present in the source.
* **D — author: Lee; year: 2026; title: null**: It changes the stated year.

## Question 38

Type: single\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

One extraction endpoint maps both inline citations and bibliography entries into the same required JSON contract: {references:\[{author,title}\]}. Its examples currently rename references to bibliography for documents with a bibliography. Why should the examples use the shared target keys while still varying source layouts?

### Options

**A**

The endpoint has one output contract; examples should show different source layouts being transformed into that contract.

**B**

Every tool and document-processing endpoint must use the same JSON schema, regardless of its purpose.

**C**

The model should copy source-section headings into output keys to preserve the original layout exactly.

**D**

Using a common schema removes the need to show where reference information occurs in different documents.

Correct answer: A

### Explanation

The shared schema follows from this endpoint's stated contract, not a universal requirement that unrelated tools share one schema.

## Question 39

Type: single\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

An extractor must output methods and cited references without inferring missing bibliographic details. Its only example has a Methods section and a full bibliography. It misses 'We sampled every tenth packet' inside a Results paragraph and invents a title for 'Chen (2024)' when no title is present. There is room for one additional example. Which example best addresses both observed errors without introducing a new evidence error?

### Options

**A**

A narrative containing an embedded sampling description and an author-year citation without a title, mapped to the supported method plus the author/year and an explicit missing-title value.

**B**

A narrative containing an embedded sampling description and a complete bibliography with its title, mapped to the supported method and all explicitly present reference fields.

**C**

A narrative containing an embedded sampling description and an author-year citation without a title, mapped to the supported method and author/year, with the title copied from an earlier example.

**D**

A narrative containing an embedded sampling description and an author-year citation without a title, mapped to the supported author/year and an explicit missing-title value, but to no method because no Methods heading is present.

Correct answer: A

### Explanation

The one-example budget favors a case that covers both missing layout behavior and absent bibliographic detail while preserving supported information.

## Question 40

Type: multiple\_choice
Knowledge point: Using few-shot examples to demonstrate correct handling of varied document structures (inline citations vs bibliographies, methodology sections vs embedded details)

A citation extractor has a worked example mapping "Latency fell (Chen, 2022)" to Chen's bibliography entry. It now receives "Latency fell \[4\]" with bibliography entries "\[3\] Silva, 2021" and "\[4\] Rao, 2023". A second document says "We sampled 40 sites" in its introduction and has no Methodology heading. The output must record the cited author/year for the first claim and sample\_size for the second document. Which two few-shot additions demonstrate the needed structural handling? (Choose 2.)

### Options

**A**

Show \[4\] mapped to Rao, 2023 by its reference identifier, even though it is not the first bibliography entry.

**B**

Show sample\_size: 40 sourced from the introduction sentence without requiring a Methodology heading.

**C**

Show \[4\] mapped to Rao, 2023 by its identifier, but show sample\_size: null for the second document because it has no Methodology heading.

**D**

Show sample\_size: 40 sourced from the introduction, but show \[4\] mapped to Silva, 2021 because Silva is the first bibliography entry.

Correct answer: A, B

### Explanation

The examples should teach semantic lookup across citation layouts and extraction of methodological facts wherever the document places them.

## Question 41

Type: multiple\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

An extraction task returns empty values for required output keys when source documents use different date styles and contain partial records. The schema permits null when the source omits a value; present values must be extracted without guessing. Which two example properties most directly provide the missing guidance? (Choose 2.)

### Options

**A**

Examples covering the different document date styles.

**B**

Examples mapping present partial data to its fields and genuinely absent source values to null.

**C**

A detailed schema definition with no concrete examples provided.

**D**

A repeated copy of one complete source data record.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — Examples covering the different document date styles.**: Document date-style variants help demonstrate how the field is recognized across formats.
* **B — Examples mapping present partial data to its fields and genuinely absent source values to null.**: They distinguish recoverable partial information from facts that the source never supplies.
* **C — A detailed schema definition with no concrete examples provided.**: A detailed abstract schema definition can leave format and optional-field handling ambiguous.
* **D — A repeated copy of one complete source data record.**: One complete source data record does not cover the missing variants.

## Question 42

Type: multiple\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

An eligible Anthropic Messages client tool supports input\_examples. Which two mechanisms can show examples of expected tool arguments during source extraction? (Choose 2.)

### Options

**A**

Prompt pairs containing source text and the corresponding valid tool arguments.

**B**

An input\_examples array of valid argument objects conforming to the tool’s input\_schema.

**C**

Tool result examples that omit the source input and the argument objects.

**D**

Strict schema enforcement without any example argument objects.

Correct answer: A, B

### Explanation

Correct answers: A, B.

Option analysis:

* **A — Prompt pairs containing source text and the corresponding valid tool arguments.**: The pairs explicitly demonstrate expected arguments and their source mapping.
* **B — An input\_examples array of valid argument objects conforming to the tool’s input\_schema.**: Supported input\_examples demonstrate valid parameter patterns; argument objects alone need not show the source-to-argument mapping.
* **C — Tool result examples that omit the source input and the argument objects.**: Tool results without arguments do not demonstrate the requested input objects.
* **D — Strict schema enforcement without any example argument objects.**: Schema enforcement constrains structure but supplies no example objects.

## Question 43

Type: single\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

The complete document reaches an extractor, and the same identifier label is used in prose and tables. Human review confirms the value is present. Prose extraction succeeds, while table extraction repeatedly returns null. Which cause should the team investigate first?

### Options

**A**

Insufficient examples or guidance for mapping the table layout to the identifier field.

**B**

Context truncation that removed the identifier from the supplied document.

**C**

An unseen field alias that appears only in the table inputs.

**D**

A schema that forbids the identifier field in every output.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Insufficient examples or guidance for mapping the table layout to the identifier field.**: The layout-specific failure remains after the supplied evidence rules out missing context and labels.
* **B — Context truncation that removed the identifier from the supplied document.**: The complete document and value are confirmed present.
* **C — An unseen field alias that appears only in the table inputs.**: The same label is used in both layouts.
* **D — A schema that forbids the identifier field in every output.**: Successful prose extraction shows the field can be emitted.

## Question 44

Type: single\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

An extraction policy requires available reporter contact details for critical bugs and omits escalation-only fields for simple feature requests. The schema permits null contact details when the source omits them and supports both request types, but generated outputs fail those conditions. Which example design most directly clarifies both behaviors?

### Options

**A**

Show a critical bug with supported contact details, a critical bug with contact unavailable, and a feature request without escalation-only fields.

**B**

Add a significantly longer schema description text without providing any input-output examples.

**C**

Use one single generic example where every optional field is explicitly populated.

**D**

Remove the nested reporter object entirely from the generated extraction output.

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — Show a critical bug with supported contact details, a critical bug with contact unavailable, and a feature request without escalation-only fields.**: The examples demonstrate inclusion, legitimate missing data, and contextual omission without inventing contact details.
* **B — Add a significantly longer schema description text without providing any input-output examples.**: Longer schema definitions alone can still leave these contextual details ambiguous.
* **C — Use one single generic example where every optional field is explicitly populated.**: A single fully populated example does not show the contextual difference.
* **D — Remove the nested reporter object entirely from the generated extraction output.**: Removing the object entirely changes rather than clarifies the extraction target.

## Question 45

Type: single\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

An extractor returns null for sample\_size in 30% of reports. Inspection finds the field in body prose ("we enrolled 84 participants") in most failures; a smaller group truly omits it. Current examples all place the value in a Methodology table. With only three example slots, retrieval by report subject returns three table examples even for narrative reports. Which change best addresses these interacting failures while avoiding invented values?

### Options

**A**

Select examples by evidence layout and missingness as well as subject: include a narrative extraction, a table extraction and a verified absent-value case, each grounded in its own source.

**B**

Select a narrative extraction, a table extraction and another narrative extraction, all verified against their own sources, and retain null when no supported value is found.

**C**

Select a table extraction and two verified absent-value cases, all grounded in their own sources, to teach when null is legitimate.

**D**

Select narrative, table and absent-value examples grounded in their own sources, but teach that only an enrollment sentence qualifies as sample\_size evidence in every report.

Correct answer: A

### Explanation

The failures combine a layout mismatch with a real missing-data segment. A diverse, grounded example set addresses both without treating every null as an error.

## Question 46

Type: single\_choice
Knowledge point: Adding few-shot examples showing correct extraction from documents with varied formats to address empty/null extraction of required fields

A table contains “Identifier | ZX-17”. A prose example maps “Identifier: ZX-17” to {"identifier":"ZX-17"}. Which table example should be added to demonstrate the same extraction contract?

### Options

**A**

“Identifier | ZX-17” → {"identifier":"ZX-17"}

**B**

“Identifier | ZX-17” → {"identifier":null}

**C**

“Identifier | ZX-17” → {"table\_identifier":"ZX-17"}

**D**

“Identifier | ZX-17” → {"identifier":"Identifier"}

Correct answer: A

### Explanation

Correct answer: A.

Option analysis:

* **A — “Identifier | ZX-17” → {"identifier":"ZX-17"}**: It preserves the present value and the established output key.
* **B — “Identifier | ZX-17” → {"identifier":null}**: The source explicitly contains the value.
* **C — “Identifier | ZX-17” → {"table\_identifier":"ZX-17"}**: The contract requires the same identifier key across layouts.
* **D — “Identifier | ZX-17” → {"identifier":"Identifier"}**: It extracts the label instead of its value.

