AIF-C01 domain - 28% of the exam

Applications of foundation models

Applications of foundation models is 28% of the AIF-C01 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

64
Practice questions
4
Objectives
49
Medium
15
Hard

Where people go wrong

  • Treating a prompt or sampling setting as an enforced rule

    The wrong answers reach for greedy decoding, fine-tuning, a larger model, a system-prompt instruction or an interface warning to guarantee a restriction. Each one only shifts probabilities or can be bypassed by a cleverly phrased request, and the model keeps its pre-training knowledge. A guardrail that screens prompts and responses, and blocks or redacts matches before delivery, enforces the rule independently of model behaviour.

    See it in a sample question
  • Fixing poor retrieval somewhere other than retrieval

    When a RAG pipeline returns irrelevant passages, the wrong answers change a different component: a larger context window, a bigger model, a lower temperature, output guardrails, more returned passages or a looser similarity cut-off. None of these changes which passages are ranked. Retrieval quality comes from the embedding model and the similarity search, and queries must be embedded with the same model used to index the documents.

    See it in a sample question
  • Using fine-tuning to keep knowledge current

    The wrong answers propose retraining or fine-tuning whenever source content changes, or expect a fine-tuned model to quote exact clauses. Fine-tuning bakes knowledge into weights at a point in time, so every change needs a new training run, and the model paraphrases rather than quotes. RAG re-indexes the vector store and injects the stored source text, with its metadata, into the prompt at query time.

    See it in a sample question
  • Mixing up the context window with other model settings

    Questions about how much input a model can take draw wrong answers naming the training cutoff, output token limits, temperature or training data size. The context window is the maximum number of tokens accepted per call. Output limits govern response length, temperature governs randomness, and the cutoff concerns knowledge held in weights. When a resent transcript outgrows the window, the earliest turns fall out, so the fix is to summarise or retain key facts.

    See it in a sample question
  • Judging output quality with perplexity alone

    The wrong answers offer perplexity for tasks that need a comparison against references, a check that claims are supported by a source, or a judgement of open-ended writing. Perplexity measures how well a model predicts held-out text, which reflects fluency and says little about usefulness. ROUGE-L compares summaries with references, an NLI checker or human raters test whether claims are entailed by the source, and structured human ratings suit writing with no single reference.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleApplications of foundation modelsmedium

A retail company wants to use a foundation model to generate product descriptions. Legal requires that the model never produce outputs containing competitor brand names. Which mechanism is the most direct way to enforce this constraint at the application layer?

  • AReduce the model's temperature to zero so it always picks the highest-probability token, making competitor names statistically unlikely.
  • BFine-tune the foundation model on internal product data only, so the model's weights no longer associate competitor brand names with product description tasks.
  • CUse a larger foundation model with higher reasoning capability, because larger models are better at following nuanced instructions to avoid competitor references.
  • DApply output guardrails that scan generated text and block or redact any response containing prohibited brand names before it reaches the user. Correct
Understand that guardrails are the appropriate mechanism for enforcing deterministic content restrictions on foundation model outputs. Guardrails are application-layer components that inspect model outputs against defined rules - such as blocklists of prohibited terms - before the response is delivered to end users. Unlike temperature adjustments or model-size choices, which influence probability distributions, guardrails provide deterministic enforcement. This makes them the correct tool when a hard constraint (legal compliance) must hold on every inference call.

Why A is wrong: Greedy decoding (temperature 0) selects the most probable token at each step but cannot guarantee exclusion of specific words. Competitor names may still appear if they are highly probable in context.

Why B is wrong: Fine-tuning can shift output distributions but does not reliably eliminate specific outputs. The model retains knowledge of competitor names from pre-training and may still generate them in novel contexts, so this approach does not provide the deterministic enforcement legal requires.

Why C is wrong: Model size improves general instruction-following but is probabilistic. A larger model may comply more often, but compliance is not guaranteed on every call. Guardrails provide the deterministic enforcement the question calls for.

Why D is correct: Guardrails act as a post-generation filter at the application layer, providing a deterministic enforcement mechanism independent of model probabilities. This directly satisfies the legal requirement by intercepting non-compliant outputs before delivery.

Free sampleApplications of foundation modelsmedium

A company is building a retrieval-augmented generation (RAG) application that retrieves passages from a knowledge base before generating answers. As the knowledge base grows to millions of documents, the team observes that the retrieved passages are occasionally irrelevant to the user's question. Which design consideration should they address to improve retrieval relevance?

  • AIncrease the foundation model's context window so it can ingest more retrieved passages per call, improving the chance that a relevant passage is included.
  • BApply output guardrails to filter model responses that appear to contradict the retrieved passages, so users only see answers grounded in retrieved content.
  • CImprove the embedding model and similarity search configuration used in the retrieval step, so semantically relevant passages are ranked higher for each query. Correct
  • DReplace the foundation model with a domain-specific model pre-trained on the same corpus as the knowledge base, so the model can answer questions from memory rather than relying on retrieval.
Recognise that retrieval quality in RAG applications depends on embedding model and similarity search configuration, not solely on the foundation model used for generation. Retrieval-augmented generation separates the retrieval and generation steps. When retrieved passages are irrelevant, the problem lies in the retrieval component: the embedding model may not capture semantic similarity for the domain, or the similarity search parameters may return too many distant matches. Fixing retrieval at its source - by improving embeddings or tuning search parameters - is the correct design response. Expanding context window or adding guardrails treats symptoms rather than the cause.

Why A is wrong: A larger context window allows more passages to be sent to the model per call, but it does not improve the quality of retrieval ranking. If the retrieval step consistently returns irrelevant passages, adding more of them to a larger context window does not solve the underlying problem.

Why B is wrong: Guardrails check outputs after generation. They can catch responses that contradict retrieved passages but cannot compensate for retrieving irrelevant passages in the first place. The root cause is the retrieval step, not the generation step.

Why C is correct: In a RAG architecture, retrieval quality is determined by how well the embedding model captures semantic meaning and how the vector similarity search is configured. Improving the embedding model or tuning retrieval parameters (such as similarity threshold or top-k) directly addresses the root cause of irrelevant passage retrieval.

Why D is wrong: Pre-training on the corpus would embed static knowledge into model weights, not provide access to a live, growing knowledge base. This approach removes the scalability and update benefits of RAG and does not address retrieval relevance as a design consideration.

Free sampleApplications of foundation modelsmedium

A developer wants to give a foundation model access to the company's internal policy documents, which are updated monthly. The model should cite the exact policy clause in each answer. Which architecture satisfies both requirements?

  • AProvide the entire policy library as a static system prompt at model initialisation.
  • BFine-tune the model on a labelled dataset of policy clauses and expected answers, then re-fine-tune each month.
  • CUse prompt chaining where the first model call summarises all policies and the second call answers from that summary.
  • DBuild a RAG pipeline that indexes policy documents in a vector store, retrieves matching clauses at query time, and injects them with source metadata into the model's prompt. Correct
Explain how RAG enables precise source citation by retrieving and injecting the exact source text into the model's context at inference time. RAG passes the retrieved document chunks - including their metadata such as clause identifiers - directly into the model prompt. Because the verbatim text is present in context, the model can reproduce it faithfully in its answer. Re-indexing the vector store each month keeps the knowledge current without any model retraining.

Why A is wrong: Tempting for small document sets, but a full policy library will likely exceed context limits and cannot be refreshed without redeploying the service. Exact clause citation also requires structured retrieval, not relying on the model's recall from a long prompt.

Why B is wrong: Tempting because fine-tuning teaches domain knowledge, but monthly retraining cycles are expensive and the model cannot reliably cite specific clause identifiers - it paraphrases rather than quotes stored source text.

Why C is wrong: Tempting because multi-step prompting can improve answer quality, but summarisation loses the precise clause text needed for citation, and the summary itself would be stale unless regenerated every month.

Why D is correct: RAG retrieves the actual clause text along with its identifier at inference time and places it in the prompt, enabling the model to quote it directly. Monthly updates require only re-indexing, not retraining.

Free sampleApplications of foundation modelsmedium

A customer-service assistant holds long multi-turn conversations. The team notices that in lengthy sessions the assistant starts to ignore a constraint the customer stated near the very beginning, such as a preferred delivery address, while still handling recent turns well. Each request resends the whole conversation transcript to the model. Which design consideration best explains this behaviour and points to the fix?

  • AThe model's temperature is set too high, so it samples less likely tokens and drifts away from the early constraint as the conversation grows
  • BThe assistant has begun hallucinating the delivery address, so grounding each response in a retrieved knowledge base will restore the early constraint
  • CThe growing transcript exceeds the model's context window, so the earliest turns fall outside the tokens the model can attend to, and the fix is to summarise or retain key earlier facts within the window Correct
  • DThe output token limit is being reached, so the model truncates the part of its answer that would have applied the early constraint
In long conversations, transcripts that exceed the context window drop the earliest turns, so key early facts must be summarised or pinned to stay in scope. A model can only attend to tokens that fit inside its context window; when a resent conversation grows beyond that limit the earliest turns are excluded, causing constraints stated at the start to be ignored while recent turns remain intact, and the remedy is to compress or retain those early facts within the window rather than adjusting sampling or output settings.

Why A is wrong: High temperature increases randomness in wording, which is a believable cause of drift, but it would degrade recent turns too rather than specifically dropping the earliest stated constraint as the transcript lengthens.

Why B is wrong: Hallucination involves fabricating unsupported facts, which is a plausible guess, but here the address was genuinely supplied earlier and simply stops being honoured, which is a context-capacity issue rather than invented content.

Why C is correct: Once the resent transcript grows past the context window, the oldest tokens are no longer available to the model, which is why early constraints are lost while recent turns work; carrying a running summary or pinned facts keeps the important earlier information inside the window.

Why D is wrong: An output limit can cut off the end of a response, which sounds related, but it would shorten answers rather than selectively forget an instruction given many turns earlier in the input.

Free sampleApplications of foundation modelshard

During a hallucination audit, evaluators need to measure how often a foundation model generates factually incorrect claims that are not supported by the provided source documents. Which evaluation approach is most appropriate for this measurement?

  • AMeasure perplexity on a held-out factual corpus to identify confidence drops that correlate with incorrect generation.
  • BRun the model on a multiple-choice benchmark that tests factual knowledge recall without reference documents.
  • CCalculate BLEU score between the generated output and a gold-standard reference answer to measure lexical overlap.
  • DApply human raters or an NLI-based automatic checker to assess whether each model claim is entailed by the source document. Correct
Identify the correct evaluation method for measuring factual hallucination relative to source documents in foundation model outputs. Hallucination in document-grounded tasks is specifically about claims that are not entailed by the provided source. The appropriate evaluation approach is to check each claim for support in the source, either via human annotators or automatically using Natural Language Inference models that classify claim-source pairs as entailed, neutral, or contradicted. Perplexity and BLEU are not designed for this grounding check, and knowledge-recall benchmarks test a different capability entirely.

Why A is wrong: Perplexity reflects language model fit to a distribution but does not directly identify whether individual claims are supported by source documents. A model can be confident (low perplexity) while still hallucinating facts not in the source.

Why B is wrong: A knowledge-recall benchmark tests whether the model knows facts from pretraining, not whether it generates claims that are grounded in provided source documents. This does not address the hallucination scenario described.

Why C is wrong: BLEU measures n-gram overlap between a candidate and a reference translation or answer. It cannot distinguish a factually correct but paraphrased response from a hallucinated response that shares surface words with the reference.

Why D is correct: Grounded faithfulness evaluation uses Natural Language Inference (entailment) or human verification to determine whether each generated claim is supported by the source. This directly measures unsupported hallucination in a retrieval-augmented or document-grounded context.

Other domains in this exam

See also the AIF-C01 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.