Choosing FMs and inference parameters: AIF-C01 study notes and practice questions
What to know about Choosing FMs and inference parameters for the AIF-C01 exam, from the Applications of Foundation Models domain (28% of the exam guide), then 7 free questions to test it. Part of the AIF-C01 study guide.
An insurance company checks claim packets for fraud.
Each packet is a PDF up to 500 MB and takes up to 40 minutes to process. Packets arrive only a few times a day with long quiet gaps, and results are needed within two hours of upload. The team does not want to pay for idle servers or manage scaling.
Which SageMaker AI inference option fits BEST?
Choose one answer.
AA. A real-time endpoint on a fixed instance, which keeps the model loaded and answers requests with low latency.
BB. An asynchronous endpoint, which queues uploads, accepts up to 1 GB, runs up to an hour and scales to zero.
CC. A serverless endpoint, which scales to zero when idle but limits each request payload to 4 MB and each inference call to one minute.
DD. A batch transform job that runs once each night over the day's uploads and writes the results to Amazon S3.
Show the answer and explanation
Answer: B
A. Wrong: A real-time endpoint is persistent, so its instance is billed between uploads, which conflicts with the no-idle-cost rule. It is built for low-latency and sustained traffic, not large, slow files that arrive a few times a day.
B. Right: Correct. Asynchronous inference is built for large payloads, long processing times and queued requests. It can scale to zero when there are no requests, so the team pays nothing while idle and still gets results inside two hours. Learn more: Asynchronous inference in SageMaker AI (opens in a new tab)
D. Wrong: Batch transform suits offline jobs over data that is available up front, and it does not need a persistent endpoint. A nightly run can finish up to a day after upload, which misses the two-hour result window.
Explanation
The key constraints are large payloads, long processing, sporadic arrivals and a two-hour result window. Asynchronous inference handles payloads up to 1 GB and processing up to an hour, and it scales to zero, so it fits all of them. Serverless inference fails on payload size and timeout, and a nightly batch misses the deadline. This question tests comparing SageMaker AI inference options against specific limits.
A legal firm uses a text model on Amazon Bedrock with on-demand pricing to review client contracts.
Lawyers have started pasting entire 80-page contracts into every prompt, and the monthly bill has risen sharply, although the replies are only a few sentences long.
What is the MOST likely cause of the higher bill?
Choose one answer.
AA. On-demand models bill per prompt, so a long prompt is counted as several separate prompts on each call.
BB. Input tokens are billed, so very long prompts cost more even when the answers are short.
CC. Bedrock charges a fixed fee for each page of any document uploaded to the service for processing.
DD. Long prompts push the account onto Provisioned Throughput, which costs more per hour.
Show the answer and explanation
Answer: B
A. Wrong: On-demand text pricing counts tokens, not prompts. A long prompt is not billed as several separate prompts, so this is not the cause.
B. Right: Correct. On-demand text models charge per token for the input sent and the output produced. An 80-page contract adds many input tokens to every call, even when the reply is short. Learn more: Amazon Bedrock pricing (opens in a new tab)
C. Wrong: Bedrock does not charge a fee per page of uploaded text. Its pricing for text models is based on the tokens processed.
D. Wrong: Provisioned Throughput is a separate purchase of reserved capacity that the team chooses. A long prompt does not switch the account to it automatically.
Explanation
On-demand Bedrock text models charge for the input tokens sent and the output tokens generated, so long prompts raise the cost even when answers are short. Sending the whole contract every time is the cost driver. This question tests understanding of how token-based pricing works.
A media company runs a summarization feature on Amazon Bedrock.
For three months it expects low, unpredictable traffic while it tests demand. After that it expects steady, high volume that needs reserved throughput.
Which pricing approach is MOST cost-effective in each phase?
Choose one answer.
AA. Provisioned Throughput during testing, then on-demand for the steady phase
BB. On-demand during testing, then Provisioned Throughput for the steady phase
CC. Provisioned Throughput with a six-month commitment in both phases
DD. Batch inference in both phases, since its discounted rate suits any workload
Show the answer and explanation
Answer: B
A. Wrong: This is the wrong way round. Provisioned Throughput bills a fixed hourly rate, so paying for reserved capacity while traffic is low and unpredictable wastes money. On-demand suits that phase better.
B. Right: Correct. On-demand bills per token used with no commitment, which suits uncertain early traffic. Provisioned Throughput reserves capacity at a fixed hourly cost, which suits steady high volume once demand is known. Learn more: Provisioned Throughput for Amazon Bedrock (opens in a new tab)
C. Wrong: A six-month commitment locks in capacity before demand is known, so the company could pay for unused capacity during testing. A commitment makes sense only once steady demand is proven.
D. Wrong: Batch inference runs as a job over a set of prompts at a lower price for select models. The summarization feature needs live results, so batch does not fit either phase.
Explanation
On-demand pricing charges per token with no commitment, so it suits testing and variable traffic. Provisioned Throughput buys reserved model capacity at a fixed hourly rate, with lower hourly prices for longer commitments, so it suits steady, high-volume workloads. Batch inference is cheaper but is designed for jobs rather than live features.
An insurance company's assistant answers questions about policy wording.
Compliance wants answers to be as consistent and focused as possible, with little creative variation between runs.
Which inference parameter change helps MOST?
Choose one answer.
AA. Raise the temperature so the model explores many more possible word choices
BB. Raise the maximum response length so each answer is more complete
CC. Lower the temperature so the model favors its most likely tokens
DD. Add a stop sequence so the model ends after each sentence
Show the answer and explanation
Answer: C
A. Wrong: Higher temperature flattens the probability distribution, so less likely tokens are chosen more often. That makes answers more varied, the opposite of what compliance wants.
B. Wrong: Maximum length sets how many tokens a reply can contain. It does not make the wording more consistent, and a longer limit does not focus the answer.
C. Right: Correct. Lower temperature makes the model more deterministic, so it selects higher-probability outputs. Responses become more focused and repeatable, which suits a policy assistant. Learn more: Inference request parameters (opens in a new tab)
D. Wrong: A stop sequence ends generation when a chosen string appears. It can shorten answers but does not reduce variation in their content.
Explanation
Temperature shapes the probability distribution the model samples from. A lower temperature makes the model favor higher-probability outputs and gives more deterministic responses. Length limits and stop sequences change how much text is returned, not how consistent it is.
A developer tuning a text model on Amazon Bedrock wants responses to stay focused but still vary a little from run to run.
The developer sets Top P to 0.8.
When the model chooses each next token, what does this setting do?
Choose one answer.
AA. It caps the whole response at 80 percent of the maximum token count
BB. It considers only the 80 most likely candidate tokens at each step
CC. It stops generating once the model's confidence in its answer reaches 80 percent
DD. It samples from the smallest token set whose probabilities total 80 percent
Show the answer and explanation
Answer: D
A. Wrong: Response length is controlled by a separate maximum-tokens setting. Top P does not limit the total length of the reply.
B. Wrong: This describes Top K, which sets a fixed number of candidates. Top P instead uses a share of the cumulative probability, so the number of candidates varies from token to token.
C. Wrong: Generation ends at a stop sequence, the length limit or the natural end of the reply. Top P does not measure confidence or end generation.
D. Right: Correct. Top P is the percentage of most-likely candidates the model considers, so 0.8 covers the top 80 percent of the cumulative probability. Lower values give more focused output, and higher values allow less likely tokens. Learn more: Inference request parameters (opens in a new tab)
Explanation
Top P limits each next-token choice to the most likely tokens that together make up the chosen share of the probability distribution. It differs from Top K, which fixes the number of candidates, and from temperature, which reshapes the whole distribution.
A tax advisory firm's assistant sends the same 40-page tax guide, followed by a short customer question, to a model on Amazon Bedrock thousands of times a day.
Responses are slow and input costs are high. The guide changes only once a year.
Which feature addresses BOTH problems with the least change?
Choose one answer.
AA. Prompt caching, with the unchanging tax guide placed first in the prompt
BB. A higher temperature, so the model processes the guide more quickly
CC. Continued pre-training on the guide, repeated for every customer question
DD. A larger maximum response length, so fewer separate requests are needed
Show the answer and explanation
Answer: A
A. Right: Correct. Prompt caching reuses the processed prefix of a prompt, so the unchanging guide does not need to be processed again. That lowers latency and input cost, provided the guide comes before the variable question. Learn more: Prompt caching for faster model inference (opens in a new tab)
B. Wrong: Temperature controls randomness in the output. It does not change how fast the model reads input or how many input tokens are billed.
C. Wrong: Customization runs as a training job, which would be slow and costly if repeated for every question. It is not a per-request feature.
D. Wrong: A longer response limit only permits longer replies. It does not reduce the size of the guide sent with each request, and it adds output tokens.
Explanation
Prompt caching on Amazon Bedrock stores a contiguous prefix of the prompt, such as a long document or system prompt, so repeated requests reuse it. Cached tokens are billed at a lower read rate and reduce latency. The cache needs a stable prefix, so the static guide must come before the customer question. Cache entries expire after a time-to-live, five minutes by default for most models, which resets on each hit.
An engineering firm wants a foundation model to answer questions about scanned site diagrams.
Each specification volume runs to hundreds of pages and must be sent in a single request.
Which TWO selection criteria matter MOST for this use case? (Choose two.)
Choose two answers.
AA. The model accepts image inputs as well as text, so it can read diagram scans
BB. The model has the largest parameter count in its model family
CC. Its context window is large enough to hold a full specification volume
DD. It was the most recent model its provider released this year
EE. It is the model most often discussed in technical forums online
Show the answer and explanation
Answers: A, C
A. Right: Correct. The diagrams are images, so the model must accept image input or the scans cannot be read directly. This is a requirement to check for each candidate model.
B. Wrong: Parameter count is not a fit test on its own. A larger model can cost more and respond more slowly, and it may still not accept images or long inputs.
C. Right: Correct. A large context window lets a full specification volume go in one request. Without one, the team must split the text and retrieve passages, which adds design work.
D. Wrong: Release date says nothing about whether the model reads images or handles long inputs. A newer model can still fail both requirements.
E. Wrong: Popularity is not a selection criterion. Capabilities, input limits, cost, latency and compliance decide whether a model fits the workload.
Explanation
Choose a foundation model by matching its capabilities to the task. The diagrams need image input, and the full specification volumes need a context window large enough to hold them. Size, release date and popularity do not decide the fit.
Want more on Choosing FMs and inference parameters? The 5 full-length practice sets have 11 more Choosing FMs and inference parameters questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →