Foundation Model Integration, Data Management, and Compliance

Domain 1: Foundation Model Integration, Data Management, and Compliance

84 practice questions for Domain 1 of the AWS Certified Generative AI Developer - Professional (AIP-C01) exam, which makes up 31% of its scored content. Your answers count towards one score and one timer for the whole exam.

Domain 1: Foundation Model Integration, Data Management, and Compliance

31% of scored content · 84 practice questions

1. A team must validate that a proposed GenAI architecture can meet its latency and quality targets before committing to full development. Which approach is appropriate?

Answer and explanation

Answer: B. A proof of concept exercising the critical path produces measurements against the actual targets before the investment is made. Building the full application defers the finding until the cost is sunk. Published benchmarks describe different workloads. An estimate from token rate omits retrieval, network, and orchestration time.

2. An organization must ensure GenAI workloads are designed consistently against recognised architectural guidance. Which solution meets these requirements?

Answer and explanation

Answer: C. The Generative AI Lens provides recognised guidance and the tool produces a tracked improvement plan per workload. A team-authored checklist may omit what the lens covers. An informal meeting produces no tracked outcome. Reviewing after incidents is reactive.

3. Several teams are each building their own retrieval and prompt handling code for similar GenAI applications. Which approach is appropriate?

Answer and explanation

Answer: A. Shared components give consistent behaviour and one place to apply a governance change, which is what standardization is for. Independent implementations diverge in exactly the areas where consistency matters. A wiki records intent without enforcing it. Adopting one team's whole application forces unrelated use cases into one shape.

4. An application must be able to switch foundation model providers without changing application code. Which solution meets these requirements?

Answer and explanation

Answer: A. AppConfig delivers configuration changes with gradual rollout and automatic rollback, so a model switch is a governed configuration change rather than a code change. A hardcoded identifier requires a redeployment. Separate builds multiply maintenance. An environment variable requires a deployment to change and has no rollout control.

5. A GenAI application must continue operating when its primary model's Region experiences a service disruption. Which solution meets these requirements?

Answer and explanation

Answer: B. Cross-Region inference routes requests to another Region and graceful degradation defines what the application does meanwhile. More retries against an unavailable Region fail more slowly. A response cache cannot answer new questions. Extra throughput in the affected Region does not help when the Region is disrupted.

6. A domain-adapted model produced with a parameter-efficient technique must be versioned and rolled back if a deployment degrades quality. Which solution meets these requirements?

Answer and explanation

Answer: D. Registering versions and deploying by reference makes rollback an act of repointing rather than retraining. Overwriting leaves nothing to roll back to. A document recording the current version drifts from reality. Retraining is slow and does not reproduce the previous behaviour exactly.

7. Input documents arrive as scanned PDFs, recorded audio, and structured tables, and all must be prepared for a multimodal application. Which solution meets these requirements?

Answer and explanation

Answer: D. Each modality needs its own extraction before a common formatting step, because a scanned PDF, an audio file, and a table are not interchangeable inputs. Sending raw files assumes the model accepts every format. A generic parser loses table structure and cannot read audio. Unprocessed files cannot be retrieved semantically.

8. A data validation step must stop malformed records reaching a fine-tuning pipeline and record why each was rejected. Which solution meets these requirements?

Answer and explanation

Answer: C. An automated ruleset with quarantine stops bad records and preserves them with the reason, which is both prevention and diagnosis. Inspecting model behaviour is far downstream. Manual sampling is inconsistent. A schema document relies on the producer honouring it.

9. User-supplied text arrives with inconsistent casing, encoding artifacts, and truncated sentences, and response quality is poor as a result. Which solution meets these requirements?

Answer and explanation

Answer: B. Normalizing the input addresses the cause, since a model cannot reliably recover meaning from corrupted text. Higher temperature adds variability. More output tokens produce longer responses to the same poor input. An instruction does not repair the text.

10. A knowledge base must organise documents so that retrieval can be restricted to a product line and a document type simultaneously. Which solution meets these requirements?

Answer and explanation

Answer: D. Metadata attributes filtered at retrieval express multiple dimensions without multiplying indexes. A knowledge base per combination grows combinatorially. Text-embedded labels are unreliable to filter on. Instructing the model after retrieval means irrelevant content still enters the context.

11. A vector store must remain current as source documents are added, updated, and deleted throughout the day. Which solution meets these requirements?

Answer and explanation

Answer: D. Incremental ingestion that also removes deleted content keeps the index accurate at a cost proportional to change. A nightly rebuild leaves the index stale through the day. Leaving superseded chunks returns outdated answers. Retrieving more candidates does not prevent a stale chunk being used.

12. A vector index serving several distinct subject domains returns results from the wrong domain for ambiguous queries. Which solution meets these requirements?

Answer and explanation

Answer: D. Scoping retrieval to the relevant domain removes cross-domain competition entirely, which a similarity threshold cannot do because an ambiguous query is genuinely similar to both. More candidates return more cross-domain results. A larger embedding model does not resolve genuine ambiguity.

13. Retrieval performs poorly for queries that use internal product codes absent from the embedding model's training data. Which solution meets these requirements?

Answer and explanation

Answer: A. Semantic embeddings handle paraphrase but can miss rare exact tokens, and lexical matching retrieves documents containing the literal code. A higher threshold discards more results. Smaller chunks do not make an unfamiliar token embeddable. Re-embedding with the same model does not teach it new tokens.

14. The most relevant passage is retrieved but consistently ranks below less useful candidates. Which solution meets these requirements?

Answer and explanation

Answer: D. A reranker scores candidates jointly with the query, which orders them far more accurately than independent vector similarity. Reducing candidates would discard the useful passage. Embedding dimension is a model property rather than a ranking fix. Temperature affects generation.

15. Users ask broad questions that require information from several distinct areas of the corpus. Which solution meets these requirements?

Answer and explanation

Answer: D. Query decomposition retrieves for each distinct information need, which a single broad query cannot do well. More candidates for one query returns more of the same nearest neighbours. Larger chunks dilute relevance. Asking the user to narrow the question shifts the work onto them.

16. Prompts used across several applications must be centrally versioned with an approval step before a change reaches production. Which solution meets these requirements?

Answer and explanation

Answer: D. Prompt Management versions prompts centrally and applications reference a published version, so an approval gate on publication governs every consumer at once. A shared object carries no version history or approval step. Per-repository prompts drift between applications. Environment variables require a deployment and diverge per environment.

17. A complex task requires several model calls whose sequence depends on intermediate results. Which solution meets these requirements?

Answer and explanation

Answer: A. A prompt flow expresses sequential steps with conditional branching declaratively and is versioned as a unit. One long prompt makes the intermediate results invisible and unbranchable. Hardcoded sequencing in application code is harder to change and observe. More output tokens do not add branching.

18. A prompt change must be verified against known edge cases before it is published. Which solution meets these requirements?

Answer and explanation

Answer: C. Executing the candidate against stored edge cases measures behaviour before publication. Publishing and watching exposes users to the regression. Wording review does not reveal how the model responds. A staged publication still ships an unverified prompt to real users.

19. A proof of concept must establish whether a GenAI approach is viable before a team commits to building it. Which scope is appropriate?

Answer and explanation

Answer: A. A proof of concept exists to retire the largest uncertainty, so it should exercise the riskiest assumption and nothing more. Building everything at reduced scale is a prototype rather than a feasibility test. Interest and ease determine what is easy to build rather than what is uncertain.

20. An architect must document a GenAI design so other teams can reuse its decisions. Which content is most valuable?

Answer and explanation

Answer: C. Recording constraints and rejected alternatives lets another team judge whether the same decision applies to their context. A service list describes the outcome without the reasoning. Cost is a property of one implementation. Authorship identifies who rather than why.

21. A model selection must be defensible to a reviewer who was not involved in the evaluation. Which evidence should be produced?

Answer and explanation

Answer: C. Criteria stated in advance and measured on a common dataset make the choice reproducible and reviewable. Informal judgement cannot be audited. Vendor benchmarks describe different workloads. A specification is not evidence of fitness.

22. An application must degrade gracefully when its primary model is unavailable rather than failing outright. Which approach is appropriate?

Answer and explanation

Answer: D. Graceful degradation means defining what reduced service looks like and telling the user, rather than failing. Indefinite retries hold resources. Returning an error pushes the problem upward without a strategy. Queueing suits deferrable work but not an interactive request.

23. A fine-tuned model must be retired and replaced without interrupting the application. Which approach is appropriate?

Answer and explanation

Answer: D. Running both and shifting gradually allows validation on real traffic with an immediate path back. Deleting first creates an outage. An all-at-once switch exposes every user to an unvalidated version. Indefinite parallel operation doubles cost and leaves behaviour inconsistent between callers.

24. Input documents vary in quality, and some produce noticeably worse model responses than others. Which step should be taken first?

Answer and explanation

Answer: D. Identifying what distinguishes the poor inputs directs the remedy, which may be extraction, normalization, or rejection. A larger window and a larger model both apply capacity to an unidentified problem. An instruction cannot repair unreadable input.

25. A conversation-based application must format its message history for the model correctly. Which consideration applies?

Answer and explanation

Answer: A. Role annotation lets the model distinguish what the user said from what it said, which conversation formats exist to express. Concatenating without roles loses that distinction. Truncating to one turn discards the conversation. Summarizing every request adds cost and loses detail unnecessarily while the history fits.

26. An application must extract entities from free text before passing structured values to a downstream system. Which approach is appropriate?

Answer and explanation

Answer: A. Extraction followed by schema validation guarantees the downstream system receives the structure it expects. Passing free text moves the parsing problem. Trusting an unvalidated model output risks malformed structure reaching the downstream system. A nightly batch does not serve a request-time integration.

27. A vector store must serve several tenants whose data must never be returned to another tenant. Which approach provides the strongest separation?

Answer and explanation

Answer: B. Separate indexes or a filter derived from verified identity enforce separation before retrieval. A tenant identifier in the query text can be manipulated by the caller. Post-processing acts after another tenant's content has already entered the context. Similarity offers no guarantee of separation.

28. A metadata framework must support retrieval filtered by recency. Which attribute should be attached to each chunk?

Answer and explanation

Answer: A. Filtering by recency requires the date the content is effective from, which is a property of the document rather than of the ingestion. Embedding date records when processing happened. Document size and chunk count describe volume.

29. A vector index must be maintained as source systems publish changes continuously throughout the day. Which approach is appropriate?

Answer and explanation

Answer: D. Event-driven upsert and delete keeps the index current at a cost proportional to change. A nightly rebuild leaves the index stale through the day. Hourly polling adds latency and repeated scanning. Full reingestion scales with corpus size rather than change.

30. A chunking strategy must be chosen for a corpus of short, self-contained frequently asked questions. Which approach is appropriate?

Answer and explanation

Answer: C. Content that is already a self-contained unit should be chunked at that boundary, so a retrieved chunk is a complete answer. Fixed-token chunking splits pairs arbitrarily. Combining pairs dilutes relevance. Splitting an answer means a retrieved chunk is incomplete.

31. An embedding model must be selected for a corpus in several languages. Which criterion is decisive?

Answer and explanation

Answer: D. Multilingual retrieval requires the languages to occupy a shared representation, or a query in one language will not match content in another. Dimension size, recency, and model family do not establish cross-lingual capability.

32. A query expansion step must improve retrieval for terse user questions. Which approach is appropriate?

Answer and explanation

Answer: D. Expansion generates alternative phrasings so retrieval can match content the terse original missed. More candidates for the same query returns more of the same nearest neighbours. A lower threshold admits weaker matches without addressing phrasing. Asking the user shifts the work onto them.

33. A retrieval interface must be consumable by a foundation model as a callable tool. Which approach is appropriate?

Answer and explanation

Answer: D. A schema-defined function lets the model invoke retrieval with validated parameters and receive a predictable structure. Pre-filled context removes the model's ability to decide when retrieval is needed. Free-text queries require the application to parse intent. Raw index contents are not interpretable.

34. An application must maintain conversational context across turns while keeping the prompt within the context window. Which approach is appropriate?

Answer and explanation

Answer: C. Recent turns matter most in detail while older context can be compressed, provided durable facts survive the summary. Starting over loses the conversation. One turn loses context immediately. Summarizing the most recent turn discards the detail the model most needs.

35. A prompt must reliably produce output a downstream system can parse. Which approach is most reliable?

Answer and explanation

Answer: D. Schema constraint with validation guarantees the downstream system receives conforming structure or an explicit failure. A prompt instruction is advisory. A tolerant parser accepts malformed output rather than preventing it. Lower temperature reduces variation without enforcing structure.

36. A prompt must be improved iteratively, and the team must know whether each change helped. Which approach is appropriate?

Answer and explanation

Answer: C. A fixed evaluation set makes each change measurable and comparable across versions. A few samples cannot distinguish improvement from variance. Changing several aspects at once makes the contributions indistinguishable. Reading preference does not predict model behaviour.

37. A prompt template must accept variable content without allowing that content to alter the instructions. Which approach is appropriate?

Answer and explanation

Answer: B. Delimiting variable content and marking it as data is the standard mitigation against injected instructions, though it is not absolute and should be paired with limited permissions. Direct concatenation gives injected text the same standing as instructions. Instruction position does not prevent injection. Character escaping addresses a different class of problem.

38. A GenAI feature's business value must be validated before the team invests in production hardening. Which proof of concept design is appropriate?

Answer and explanation

Answer: C. Value is established by measuring the business metric with real users, and doing so before hardening avoids investing in something that may not deliver. Production infrastructure is premature. Hand-picked demonstrations do not measure value. Competitor comparison measures relative quality rather than business effect.

39. A team is choosing between a synchronous request-response integration and an event-driven one for a GenAI feature. Which requirement favours event-driven?

Answer and explanation

Answer: B. Deferred results with variable generation time suit an asynchronous event-driven pattern. Immediate visibility, per-session invocation, and a one-second bound all favour synchronous.

40. A model must be evaluated against capability limitations relevant to the use case before selection. Which approach is appropriate?

Answer and explanation

Answer: B. Use-case-specific limitations determine fitness, and general benchmarks may not exercise them. Benchmark score, parameter count, and familiarity do not establish fitness for the specific requirement.

41. An application must switch to a backup model automatically when the primary returns errors above a threshold. Which implementation is appropriate?

Answer and explanation

Answer: C. A circuit breaker detects sustained failure and reroutes automatically, then probes for recovery. Retrying a failing primary delays every request. Manual switching depends on an operator. Hourly checks leave up to an hour of failures.

42. A fine-tuned adapter must be deployed to serve alongside the base model without duplicating the base weights. Which approach is appropriate?

Answer and explanation

Answer: C. Parameter-efficient adapters are designed to load onto a shared base, which avoids duplicating weights per variant. Merging into a full copy duplicates the base. Separate instances per adapter multiply cost. Retraining discards the adapter approach.

43. A data validation workflow must reject records that would exceed the model's input limits before invocation. Which check is required?

Answer and explanation

Answer: A. Models limit tokens, and token count varies with content, so a token check is required. Byte length is a poor proxy. JSON validity and non-emptiness do not address input limits.

44. Audio recordings must be prepared for a text-based foundation model. Which processing step is required?

Answer and explanation

Answer: C. A text model consumes text, so audio must be transcribed first. Base64 encoding produces text the model cannot interpret as speech. Compression and format conversion leave it as audio.

45. A request to a foundation model API is rejected with a validation error about the message structure. Which cause should be investigated first?

Answer and explanation

Answer: D. A structure validation error indicates a body that does not match the model's expected format, which varies by model. Authentication, throttling, and availability produce different errors.

46. A vector index must be sharded to handle a corpus too large for a single node. Which sharding consideration applies?

Answer and explanation

Answer: B. Sharded search fans out and merges, and the shard count is tuned against that overhead. Approximate search is still needed within each shard. Shards hold partitions rather than copies. Dimension reduction does not remove the need to distribute a large corpus.

47. A knowledge base must integrate documents from an internal wiki that changes frequently. Which approach is appropriate?

Answer and explanation

Answer: B. A connector keeps the index aligned with a changing source. A one-time export goes stale immediately. Manual copying and email do not scale and lag the source.

48. A vector store's metadata must support filtering retrieval to documents a user is authorised to see. Which metadata design is appropriate?

Answer and explanation

Answer: C. An access-scope attribute filtered from verified entitlements enforces authorisation at retrieval. Author name and file size are not authorisation attributes. The model cannot enforce access control.

49. Retrieval returns the correct document but the chunk lacks the surrounding context the model needs. Which approach is appropriate?

Answer and explanation

Answer: C. Returning neighbours or the parent section restores context around the match. More unrelated chunks add noise. Smaller chunks lose more context. The model cannot infer context it was not given.

50. A retrieval system must handle a query that is really two separate questions. Which approach is appropriate?

Answer and explanation

Answer: D. Decomposition retrieves for each distinct need. A single combined retrieval matches neither well. Answering one part is incomplete. Pushing the burden to the user is poor experience.

51. A vector search solution must be deployed with the least operational burden for a modest corpus. Which option is appropriate?

Answer and explanation

Answer: A. A managed knowledge base handles the pipeline end to end. Self-managed clusters and self-hosted databases carry operational burden. An in-memory index does not persist or scale.

52. An embedding model must be evaluated for a domain before adoption. Which evaluation is appropriate?

Answer and explanation

Answer: C. Recall on labelled domain queries measures whether the model retrieves the right content. Dimension, speed, and recency do not establish domain fitness.

53. A conversational application must recognise the user's intent to route to the right handling flow. Which approach is appropriate?

Answer and explanation

Answer: C. A lightweight intent classifier routes cheaply and deterministically. Sending everything to the largest model is expensive. A menu degrades the conversational experience. A single handler cannot specialise.

54. A prompt must include worked examples to guide the model's output format. Which consideration applies?

Answer and explanation

Answer: A. Examples cost tokens per request, so the count is tuned to the minimum effective. More is not always better. Varying examples per request makes behaviour inconsistent. Placement after user input weakens their guiding effect.

55. A chain-of-thought instruction improves reasoning quality but exposes the reasoning to the user. Which approach is appropriate?

Answer and explanation

Answer: D. Delimiting and stripping the reasoning keeps its benefit without exposing it. Removing the instruction loses the quality gain. Showing reasoning may be inappropriate. Temperature does not control whether reasoning appears.

56. A prompt regression test must confirm that a change did not degrade output on previously correct cases. Which test design is appropriate?

Answer and explanation

Answer: C. A fixed set with recorded expectations detects regression deterministically. Manual review of a few outputs is inconsistent. Waiting for reports is reactive. Provider documentation does not test this prompt.

57. A GenAI solution's requirements must be captured before design begins. Which information is essential?

Answer and explanation

Answer: A. Task, quality bar, and constraints define what must be built. Model choice, familiar services, and language are implementation decisions that follow.

58. An architecture decision for a GenAI application must be recorded so it can be revisited. Which record is most useful?

Answer and explanation

Answer: B. Recording constraints, alternatives, and revisit conditions makes the decision reviewable. A diagram shows the outcome, and dates and authorship identify rather than explain.

59. A model must be selected for a task requiring reasoning over long documents. Which approach is appropriate?

Answer and explanation

Answer: A. Evaluation on representative long-document tasks establishes fitness and cost at the required length. Window size, benchmarks, and parameter count do not.

60. A foundation model's inference parameters must be configured for a task requiring consistent structured output. Which approach is appropriate?

Answer and explanation

Answer: A. Low temperature with format constraint and validation produces consistent structure. Higher temperature and top-p increase variation, and more tokens lengthen output.

61. An application must be able to switch foundation models without rewriting its integration. Which approach is appropriate?

Answer and explanation

Answer: B. An abstraction layer isolates provider differences. Direct calls couple the application, fine-tuning is unrelated to switching, and single-provider use is the lock-in being avoided.

62. Documents of mixed quality must be prepared for a knowledge base. Which approach is appropriate?

Answer and explanation

Answer: D. Assessing, normalizing, and excluding unusable documents protects retrieval quality. Ingesting everything degrades it, plain-text-only discards usable content, and image conversion loses the text.

63. Personally identifiable information must be removed from data before it reaches a foundation model. Which approach is appropriate?

Answer and explanation

Answer: A. Preprocessing redaction prevents the data reaching the model at all. Prompt instructions are advisory, response filtering acts after the data was processed, and encryption would make the content unusable to the model.

64. Conversation history must be formatted so a foundation model distinguishes system instructions from user input. Which approach is appropriate?

Answer and explanation

Answer: A. Role structure is what the model's interface uses to distinguish parts. Concatenation and plain-text labels lose that distinction, and instruction position does not establish role.

65. A vector store must be selected for a corpus that will grow to hundreds of millions of vectors. Which approach is appropriate?

Answer and explanation

Answer: A. Scale requirements determine the store. API simplicity, in-memory constraints, and prior use at a smaller scale do not establish suitability at this size.

66. Vector index parameters must be tuned for a workload that prioritizes recall over latency. Which approach is appropriate?

Answer and explanation

Answer: D. Approximate search parameters trade recall against speed and are tuned toward recall here. Dimension and vector count change what is searched, and sharding distributes rather than tunes recall.

67. A vector store must support filtering by document attributes at query time. Which approach is appropriate?

Answer and explanation

Answer: C. Metadata filtering at retrieval restricts the candidate set correctly. Post-retrieval filtering may return nothing, encoding attributes into embeddings conflates semantics with filtering, and per-value indexes multiply maintenance.

68. A vector index must be rebuilt without interrupting queries. Which approach is appropriate?

Answer and explanation

Answer: A. Building alongside and switching avoids interruption. Deleting, rebuilding in place, and pausing all affect availability.

69. Embeddings must be regenerated after the embedding model is changed. Which approach is appropriate?

Answer and explanation

Answer: D. Vectors from different models occupy different spaces and cannot be mixed, so the corpus must be re-embedded. Partial re-embedding and mixing produce incorrect similarity, and conversion between spaces is not generally possible.

70. A vector store's cost must be controlled for a corpus where most documents are rarely retrieved. Which approach is appropriate?

Answer and explanation

Answer: D. Tiering matches storage cost to access. Dimension reduction degrades retrieval quality generally, and deleting or omitting documents loses content that may be needed.

71. Retrieval must return relevant results for queries using terminology absent from the corpus. Which approach is appropriate?

Answer and explanation

Answer: B. Expansion or synonym mapping bridges vocabulary gaps. More results and lower thresholds admit weaker matches without addressing terminology, and rephrasing the answer does not change what was retrieved.

72. A reranking step must improve the ordering of retrieved passages. Which approach is appropriate?

Answer and explanation

Answer: C. A cross-encoder style reranker evaluates the pair directly and improves ordering. Date, length, and original order do not measure relevance.

73. Retrieval must weight recent documents more highly without excluding older ones. Which approach is appropriate?

Answer and explanation

Answer: A. Blending similarity with recency preserves eligibility while favouring newer content. Filtering and date-only sorting both discard or ignore relevance.

74. A chunking strategy must be chosen for long technical documents with nested sections. Which approach is appropriate?

Answer and explanation

Answer: B. Structure-aware chunking with parent context preserves coherence. Fixed-token chunking splits arbitrarily, whole documents exceed context limits, and sentence chunks are too small to carry meaning.

75. Retrieval quality must be measured before the application is deployed. Which approach is appropriate?

Answer and explanation

Answer: A. A labelled set makes retrieval quality measurable and comparable. Informal review is not repeatable, and latency and document counts measure other things.

76. A retrieval system must handle a query for which no relevant content exists. Which approach is appropriate?

Answer and explanation

Answer: B. Detecting the absence and saying so prevents a fabricated answer. Returning weak matches, lowering thresholds, and generating without grounding all invite hallucination.

77. Retrieval must span several knowledge bases with different access permissions. Which approach is appropriate?

Answer and explanation

Answer: B. Restricting retrieval by verified entitlement prevents unauthorised content entering the context. Post-retrieval filtering acts too late, merging loses the boundary, and application-level access ignores the user.

78. A system prompt must define behaviour that user input cannot override. Which approach is appropriate?

Answer and explanation

Answer: A. System role placement with user content treated as data, combined with limited permissions, bounds the impact of an override attempt. Position, repetition, and self-referential instructions are all advisory.

79. A prompt must produce output in a specific language regardless of the input language. Which approach is appropriate?

Answer and explanation

Answer: C. An explicit instruction with validation produces the required language reliably. Assumption is unreliable, and translating input or output adds a step and a quality loss.

80. A prompt library must be maintained as the application grows. Which approach is appropriate?

Answer and explanation

Answer: D. Versioned prompts with evaluation results make changes traceable and reversible. Inline code, documents, and local files all lose that history.

81. A prompt's instructions conflict with one another in edge cases. Which approach is appropriate?

Answer and explanation

Answer: C. Stating precedence resolves conflicts deterministically. Removing instructions loses requirements, temperature adds randomness, and more instructions compound the conflict.

82. A prompt must adapt its examples to the type of request received. Which approach is appropriate?

Answer and explanation

Answer: B. Run-time example selection matches guidance to the task without paying for irrelevant examples. Including everything wastes tokens, uniform examples misguide some tasks, and omitting them loses the guidance.

83. A prompt must be prevented from leaking its system instructions to users. Which approach is appropriate?

Answer and explanation

Answer: A. Output filtering plus limiting what the instructions contain addresses both the leak and its consequence. Instructions not to reveal are advisory, encryption does not apply to prompt content the model reads, and shortening does not prevent disclosure.

84. A prompt's token cost must be reduced without degrading output quality. Which approach is appropriate?

Answer and explanation

Answer: D. Measuring each part's contribution identifies what can be removed safely. Truncation, blanket example removal, and compression all risk removing what matters.