Question 320
A task requires exactly three distinct candidate titles. The output contains three array entries, two identical. What must validation include?
- Only whether the array uses square brackets.
- Both the required entry count and a meaningful distinctness check.
- A rule to repeat the best title until three slots are filled.
- Only whether the first entry is nonempty.
- Count three entries as three candidates whenever their capitalization differs, even when all three express the same underlying title.
Explanation
Correct Answer
B:Array length alone does not ensure that the three entries represent different candidates. Distinctness should match the task's intent rather than only byte differences. Capitalization or punctuation variants of one title may still be the same candidate for this purpose.
Incorrect Answers
A:Valid array syntax says nothing about its cardinality or duplicate values.
C:Repeated entries defeat the explicit requirement for distinct candidates.
D:One nonempty item does not establish the required count or uniqueness.
E:Surface differences can satisfy string inequality without providing meaningful alternatives. Distinctness must follow the user's requirement for different candidate titles.
Question 321
An application compares extracted records across reruns. Why should it use stable source-derived record identifiers rather than array positions?
- Stable identifiers remove the need to compare changed field values between runs.
- Array positions guarantee the same identity even when records are inserted.
- Stable identifiers preserve correspondence when output order or record counts change.
- A newly generated identifier on every run lets the application match records without consulting their source identity.
Explanation
Correct Answer
C:Identity-based matching avoids treating an ordering change as a different source record. Source identity lets the application reconcile insertions, deletions, and reranking across runs. A fresh random ID for the same record would prevent that stable comparison.
Incorrect Answers
A:An identifier establishes correspondence, not equality of the record's contents. The application still needs to detect changes within the matched record.
B:Inserting or reordering records changes positional associations.
D:Fresh identifiers break the correspondence between runs. The application would need some other stable evidence to determine which new record matches an earlier one.
Question 322
A response appears to be JSON when viewed in a console. What should a machine consumer do before using it?
- Parse it with a real JSON parser and validate the expected contract and completion status.
- Apply broad text substitutions until some version parses, without checking altered values.
- Search for a left brace and assume the remaining text is valid.
- Evaluate it as arbitrary executable code.
Explanation
Correct Answer
A:Actual parsing and validation detect malformed or incomplete output before downstream use. Visual plausibility is insufficient for machine consumption because incomplete arrays or escaped strings can be hard to spot. Structural parsing also remains separate from validating the source-supported values.
Incorrect Answers
B:Unverified repair may produce syntactically valid data whose meaning differs from the original response.
C:The presence of a brace does not establish valid JSON or the expected object shape.
D:Code execution is unnecessary and unsafe for interpreting a data document.
Question 323
A quoted source sentence contains double quotes and newline characters. How should it be represented inside a JSON string?
- Insert the raw characters without using JSON escaping rules.
- Serialize the string with proper JSON escaping while preserving its decoded content.
- Remove the quote and newline characters before serialization to avoid escape sequences.
- Store the raw JSON source fragment as though it were the decoded quotation.
Explanation
Correct Answer
B:Correct serialization keeps the data valid without altering the meaning of the stored string. After decoding, the string should reproduce the original quotation's characters. Escaping is a representation step, not permission to silently edit words or punctuation in the quoted evidence.
Incorrect Answers
A:Unescaped quotes or line breaks can terminate or invalidate the string representation.
C:Removing source characters changes the decoded quotation. Proper serialization represents those characters safely without deleting them from the underlying value.
D:Encoding syntax and decoded source text are different representations and must not be confused.
Question 324
A validator finds that line_items[2].price is a string where a number is required. What feedback is most useful for a correction request?
- Only the validator's total error count, without identifying the affected field.
- An instruction to change every field in the object.
- Request more confident wording without identifying the type mismatch.
- The specific field path, expected type, invalid value, and relevant source evidence.
Explanation
Correct Answer
D:Precise feedback localizes the contract violation while preserving the basis for a correct replacement. The correction request should focus on the invalid field and preserve values that already passed validation. Source context prevents a type repair from becoming an unsupported change to the price.
Incorrect Answers
A:A count shows that validation failed but does not localize the specific correction needed.
B:Broad rewriting risks damaging fields that already satisfy the contract.
C:Confidence does not turn a string into the required numeric value. Feedback must locate the structural error and preserve the source meaning during correction.
Question 325
A repair step fixes malformed JSON by changing an invoice total from 890 to 89. The repaired object parses. What should the pipeline do?
- Treat the changed amount as a better estimate without checking the source.
- Delete the original response so the difference cannot confuse reviewers.
- Accept it because parseability is the only measure of correctness.
- Compare repaired values with the source and reject or correct unsupported semantic changes.
Explanation
Correct Answer
D:A repair must preserve the intended data, not merely produce valid syntax. The invoice source is the reference for the amount, even when the earlier response was malformed. Comparing before and after repair exposes accidental digit loss that syntactic checks cannot catch.
Incorrect Answers
A:Repair does not authorize unsupported numerical reinterpretation.
B:Removing the original destroys useful evidence of how the value changed.
C:A syntactic repair that changes the amount can corrupt the underlying extracted fact.
Question 326
A long-lived consumer supports two incompatible output contracts. What should the producer include to make interpretation explicit?
- Only a free-text phrase saying the object uses the latest format.
- Only the current calendar date, assuming it uniquely identifies the schema.
- A schema version or equivalent explicit contract identifier agreed with the consumer.
- A schema identifier inferred separately by each consumer without producer agreement.
Explanation
Correct Answer
C:A declared version enables deliberate parsing and migration of incompatible record formats. The consumer can dispatch to a supported parser or explicitly reject an unknown version. An unversioned 'latest' label leaves interpretation dependent on deployment timing.
Incorrect Answers
A:Latest is not a stable contract identifier when producers and consumers upgrade at different times.
B:A date does not reliably identify which interface contract produced a record.
D:Independent guessing can assign incompatible interpretations to the same output.
Question 327
A ranking task returns candidates as an array, but the consumer sorts them alphabetically. What must the interface clarify?
- Whether array order is meaningful and, if needed, include explicit rank fields.
- That arrays can never carry meaningful order.
- That alphabetic order always reflects model confidence.
- Assign rank from the consumer's alphabetical sort even though the producer ranked candidates by task suitability.
Explanation
Correct Answer
A:A documented ranking representation prevents downstream formatting from silently changing the result. A rank field can preserve priority even if a display layer sorts rows differently. Ties and ranking direction should also be defined when the consumer needs them to act.
Incorrect Answers
B:Ordered collections can intentionally represent rankings when the contract defines that meaning.
C:Names do not encode the ranking criterion and may reorder the intended priorities.
D:The new rank would describe lexical order rather than the producer's evaluation. The contract must preserve or explicitly redefine the ranking semantics.
Question 328
An extraction schema contains two string fields, buyer and seller, but the model often swaps them. Which TWO changes directly clarify their meanings? Choose TWO.
- Accept either assignment whenever the JSON parses.
- Change both fields to unrestricted objects without defining their roles.
- Describe each field's role in the transaction in the output contract.
- Sort the two party names alphabetically and assign them by position.
- Add a representative example that clearly identifies which party buys and which sells.
Explanation
Correct Answers
C:Distinct semantic definitions help the model map source entities to the correct equally typed fields.
E:A transaction-grounded example demonstrates the intended mapping beyond the shared string type.
Incorrect Answers
A:A syntactically valid swap still misrepresents the transaction participants.
B:Broader types do not explain which party belongs in each field.
D:Name order has no necessary relationship to buyer and seller roles.
Question 329
A downstream system stores every field of an extraction object as customer data. The prompt also needs to return review notes. What should the contract do?
- Separate extracted business fields from declared processing metadata and update the consumer accordingly.
- Allow arbitrary commentary keys and assume the consumer will recognize them.
- Hide review notes inside the customer's postal-code field.
- Omit the customer's real fields whenever a note exists.
Explanation
Correct Answer
A:An explicit separation lets the system route review notes without treating them as source facts. Review notes describe the extraction process rather than the customer. Keeping them outside the business object prevents uncertainty commentary from being persisted as factual customer information.
Incorrect Answers
B:An undocumented convention leaves storage behavior ambiguous and can persist review text as customer data.
C:Mixing metadata into a business field corrupts the customer's actual record.
D:Review commentary does not justify losing valid business data.
Question 330
A Message Batch submission contains two requests with the same custom_id. What should the application do before submission?
- Remove identifiers from every request to keep the format consistent.
- Use the same identifier for all requests from the same customer.
- Assign distinct identifiers and retain the mapping to source records.
- Assume the result file will identify them by input order.
Explanation
Correct Answer
C:Unique request identities support unambiguous result reconciliation. The application should preserve the identifier-to-source mapping before submission. A unique response identifier is useful only if it can be reconciled to the original job record.
Incorrect Answers
A:Dropping correlation data makes matching results to source records harder.
B:Multiple requests for one customer still need distinct identities within the batch.
D:Order is not a safe substitute for a unique correlation identifier in batch results.