Docsity

Guia Certificacion Claude Developer, Ejercicios de Tecnologías de la Información y la Comunicación

Toggle sidebar
bg1
1
Practice questions: Developer – Foundations
35 preguntas de práctica. La respuesta correcta está marcada en verde.
1. Applications and Integration. Your service sends the same 6,000-token system prompt and policy
text on every request, followed by a short user message. Latency and cost are both climbing. Which
change most directly improves both?
A. Truncate the policy text to its first paragraph
B. Order the static system prompt and policy first, the variable user content last, and enable
prompt caching
C. Move the policy text into the user turn
D. Split every request across two smaller calls
Rationale: A stable prefix plus caching lets repeated content be reused, cutting both time-to-first-token and per-request
cost without losing context. Truncation (A) discards required policy, relocating text (C) changes nothing about reuse, and
splitting calls (D) adds overhead.
2. Applications and Integration. You must classify 40,000 support tickets by tomorrow morning. No one
consumes results before then, and budget is tight. Which approach fits?
A. Parallel synchronous Messages API calls at maximum concurrency
B. Synchronous calls with reduced max_tokens
C. The Message Batches API, submitting all tickets and collecting results within the processing
window
D. One giant request containing all 40,000 tickets
Rationale: Latency-tolerant bulk work is exactly what the Batches API is for: 50% of the cost, results within a 24-hour
window, correlated by custom_id. Parallel synchronous calls (A) pay full price for speed nobody needs, max_tokens (B)
does not change per-token pricing, and a single request (D) exceeds any context window.
3. Applications and Integration. Your application parses Claude's reply as JSON, and about one run in
fifty crashes on malformed output. What is the sturdiest fix?
A. Add "always return valid JSON" in capital letters to the prompt
B. Wrap the parse in a try block and silently skip failures
C. Lower the temperature to zero
D. Enforce the shape through tool use with a JSON schema, validate the result, and on validation
failure retry with the error fed back
Rationale: Schema-enforced output plus a validation-retry loop treats model output as untrusted input and gives the model
the information to correct itself. Louder instructions (A) reduce but do not eliminate failures, silent skipping (B) hides data
loss, and temperature (C) does not guarantee syntax.
pf3
pf4
pf5
pf8
pf9
pfa

Vista previa parcial del texto

¡Descarga Guia Certificacion Claude Developer y más Ejercicios en PDF de Tecnologías de la Información y la Comunicación solo en Docsity!

Practice questions: Developer – Foundations

35 preguntas de práctica. La respuesta correcta está marcada en verde.

1. Applications and Integration. Your service sends the same 6,000-token system prompt and policy

text on every request, followed by a short user message. Latency and cost are both climbing. Which

change most directly improves both?

A. Truncate the policy text to its first paragraph B. Order the static system prompt and policy first, the variable user content last, and enable prompt caching C. Move the policy text into the user turn D. Split every request across two smaller calls Rationale: A stable prefix plus caching lets repeated content be reused, cutting both time-to-first-token and per-request cost without losing context. Truncation (A) discards required policy, relocating text (C) changes nothing about reuse, and splitting calls (D) adds overhead.

2. Applications and Integration. You must classify 40,000 support tickets by tomorrow morning. No one

consumes results before then, and budget is tight. Which approach fits?

A. Parallel synchronous Messages API calls at maximum concurrency B. Synchronous calls with reduced max_tokens C. The Message Batches API, submitting all tickets and collecting results within the processing window D. One giant request containing all 40,000 tickets Rationale: Latency-tolerant bulk work is exactly what the Batches API is for: 50% of the cost, results within a 24-hour window, correlated by custom_id. Parallel synchronous calls (A) pay full price for speed nobody needs, max_tokens (B) does not change per-token pricing, and a single request (D) exceeds any context window.

3. Applications and Integration. Your application parses Claude's reply as JSON, and about one run in

fifty crashes on malformed output. What is the sturdiest fix?

A. Add "always return valid JSON" in capital letters to the prompt B. Wrap the parse in a try block and silently skip failures C. Lower the temperature to zero D. Enforce the shape through tool use with a JSON schema, validate the result, and on validation failure retry with the error fed back Rationale: Schema-enforced output plus a validation-retry loop treats model output as untrusted input and gives the model the information to correct itself. Louder instructions (A) reduce but do not eliminate failures, silent skipping (B) hides data loss, and temperature (C) does not guarantee syntax.

4. Agents and Workflows. A pipeline must always run the same four steps in order: fetch a document,

extract fields, validate them, and file the record. A teammate proposes an autonomous agent with tools for

all four steps. What is the better design and why?

A. A workflow that calls the model for extraction inside deterministic orchestration, because the path is known in advance and determinism is cheaper and more reliable B. The agent, because agents are more capable than fixed code C. The agent, because it can skip steps when it decides they are unnecessary D. Two agents supervising each other Rationale: When the sequence is fixed, orchestrate it in code and use the model where the model adds value. Autonomy buys nothing on a known path and adds nondeterminism (B), skipping validation is a defect rather than a feature (C), and supervision hierarchies (D) are for problems that need delegation, not four fixed steps.

5. Agents and Workflows. Your agent loop calls the Messages API and receives a response with

stop_reason "tool_use". What must your code do next?

A. Treat the turn as finished and show the partial text to the user B. Execute the requested tool, append the tool result to the conversation, and call the API again C. Retry the same request until stop_reason becomes "end_turn" D. Increase max_tokens and resend Rationale: That is the agentic loop: "tool_use" means the model is waiting for a tool result before it can continue. Ending the turn (A) abandons the model mid-task, re-rolling (C) re-asks the same question while ignoring the request, and max_tokens (D) is unrelated to tool dispatch.

6. Model Selection and Optimization. A production feature pins no model version and broke overnight

after a model release changed refusal behavior on an edge case. What prevents a recurrence?

A. Prompt the model to behave like the previous version B. Retry failed requests against a different provider C. Pin the model version in production and treat upgrades as evaluated, deliberate changes D. Catch the errors and return empty responses Rationale: Version pinning makes model behavior a controlled dependency; upgrades then pass through evaluation like any other change. Prompting for old behavior (A) is not a contract, failover (B) trades one behavior change for another, and empty responses (D) institutionalize the failure.

10. Eval, Testing, and Debugging. Users report that your Claude feature "gives wrong answers." Traces

show the model's answers faithfully reflect the documents your retrieval layer supplies, but those

documents are frequently the wrong ones. Where is the defect?

A. The model, so switch to a larger one B. The prompt, so add stronger wording about accuracy C. The retrieval layer, so fix the search or indexing that selects documents D. The users, so publish usage guidance Rationale: The traces localize the fault: the model is correct given its inputs, and the inputs are wrong. That is an integration-layer defect. Model upgrades (A) and prompt exhortations (B) cannot fix inputs, and blaming users (D) ignores the evidence.

11. Applications and Integration. A service calls Claude for every request and reuses an identical

12,000-token instruction block each time. Latency and cost are both too high. What is the most direct

improvement?

A. Shorten the instructions until the cost is acceptable B. Move to a smaller model C. Batch requests together and process them hourly D. Cache the stable prefix so the repeated block is not reprocessed on every call Rationale: A large, unchanging prefix is exactly what prompt caching exists for, and it cuts both cost and time to first token without changing behavior. Trimming instructions (A) sacrifices capability, a smaller model (B) trades quality for price, and batching (C) breaks a per-request service.

12. Applications and Integration. A user-facing feature must show output as it is produced rather than

after a long wait. What does this require?

A. Streaming the response so tokens are delivered as they are generated B. A smaller model so the whole response arrives sooner C. Splitting the prompt into several shorter calls D. Reducing the maximum output tokens Rationale: Streaming is the mechanism for incremental delivery and is what perceived latency depends on. A smaller model (B) and a shorter cap (D) reduce total time without changing when the first token appears, and splitting (C) adds round trips.

13. Applications and Integration. Ten thousand documents must be classified overnight, with no

interactive requirement. Which approach fits best?

A. Streaming requests one at a time to show progress B. Submitting the work as a batch, accepting higher latency for lower cost C. Running them in parallel at maximum concurrency against the standard endpoint D. Splitting the job across several API keys Rationale: Work that is large, uniform, and not time-critical is what batch processing is for, and it is materially cheaper. Streaming (A) serves interactive use, maximum concurrency (C) risks rate limits for no benefit here, and splitting keys (D) is an evasion rather than a design.

14. Applications and Integration. An integration intermittently receives a rate limit response under load.

What is the correct handling?

A. Retry immediately until the call succeeds B. Treat the response as a permanent failure and surface an error C. Retry with exponential backoff and a bounded number of attempts D. Lower the request size so the limit is never reached Rationale: Backoff with a retry ceiling relieves the pressure that caused the limit and still fails predictably. Immediate retries (A) worsen the condition, treating it as terminal (B) discards recoverable work, and shrinking requests (D) does not address a rate that is measured in calls.

15. Applications and Integration. Output must be inserted directly into a typed database record. What is

the most reliable way to obtain it?

A. Ask for JSON in the prompt and parse whatever comes back B. Ask for JSON and retry when parsing fails C. Post-process the prose into fields with regular expressions D. Define the shape as a tool schema so the response is returned in a validated structure Rationale: A declared schema turns structure into a contract the response must satisfy, which is what a typed insert needs. Asking in prose (A) and retrying on failure (B) both leave the shape to chance, and regular expressions over prose (C) are brittle by construction.

16. Applications and Integration. A long-running conversation eventually exceeds the context window.

What is the appropriate design response?

A. Summarise earlier turns into a compact running state and carry that forward B. Truncate the oldest turns and continue C. Increase the maximum output tokens D. Start a new conversation with no history Rationale: Compaction preserves the meaning of earlier exchanges within a much smaller footprint, which is what continuity requires. Blind truncation (B) drops facts silently, the output cap (C) is unrelated, and starting fresh (D) discards the state entirely.

21. Model Selection and Optimization. Cost has risen sharply while request volume is flat. What should

be inspected first?

A. The model's published price B. Token usage per request, including how much context is resent each call C. The number of API keys in use D. The average response time Rationale: With volume flat, cost per request must have grown, and context sent per call is the usual driver. Published price (A) would be a known change, key count (C) does not affect cost, and latency (D) is not billed.

22. Model Selection and Optimization. What is the correct way to decide between two models for a

specific task?

A. Choose the one with the better published benchmark scores B. Choose the newer model, since it supersedes the older one C. Measure both against a representative sample of the real task and its quality bar D. Choose the larger model and reduce cost elsewhere Rationale: Model choice is empirical and task-specific, which is what a representative evaluation establishes. Benchmarks (A) may not reflect the task, recency (B) is not a measurement, and defaulting to size (D) decides before evidence.

23. Agents and Workflows. A process has fixed, known steps in a fixed order, each with a checkable

output. What should be built?

A. An agent that decides the order at runtime B. A multi-agent system with one agent per step C. A single prompt containing all the steps D. A deterministic workflow that calls the model at defined points Rationale: When the path is known in advance, encoding it directly is cheaper, faster, and far easier to debug than letting a model rediscover it each run. Runtime decisions (A, B) add nondeterminism with no benefit, and a single prompt (C) removes the checkpoints between steps.

24. Agents and Workflows. What most reliably distinguishes a task that genuinely needs an agent?

A. The steps required cannot be known until intermediate results are seen B. The task is long C. The task involves several different tools D. The output must be structured Rationale: Agents earn their cost where the path must be discovered during execution. Length (B), tool count (C), and structured output (D) are all satisfied by a fixed workflow.

25. Agents and Workflows. A subagent is introduced to a working pipeline and quality drops. What is the

most likely explanation?

A. The subagent needs a larger model B. The subagent lacks context the main agent held, and the handoff did not carry it C. Subagents are unsuitable for pipelines D. The pipeline needs more subagents Rationale: Delegation trades context for isolation, and quality falls when the handoff omits what the subtask needed. A larger model (A) cannot supply missing context, subagents are widely used in pipelines (C), and adding more (D) multiplies the same fault.

26. Agents and Workflows. What is the primary reason to give an agent a hard step limit?

A. To reduce the cost of a successful run B. To make the agent respond faster C. To bound the damage and expense when the agent fails to converge D. To simplify the prompt Rationale: A step ceiling is a safety bound for the non-terminating case, which is the failure mode that matters. Successful runs (A) usually finish well inside the limit, and neither speed (B) nor prompt clarity (D) is what the limit governs.

27. Prompt and Context Engineering. Which change most improves reliability when a prompt must

follow several constraints at once?

A. Adding emphasis to the most important constraint B. Repeating the constraints at the end of the prompt C. Raising the temperature so the model explores more options D. Giving the model an example of a compliant output Rationale: A worked example makes the constraints concrete and demonstrates their interaction, which prose cannot. Emphasis (A) and repetition (B) restate without clarifying, and higher temperature (C) increases variance, which is the opposite of reliability.

28. Prompt and Context Engineering. Where should stable, reusable instructions about role and

behavior be placed?

A. In the system prompt, so they apply consistently across the exchange B. In the first user message of every conversation C. In the final message, so they are freshest D. Repeated in every user message Rationale: The system prompt is the designated place for persistent framing and keeps it separate from turn-specific content. Placing it in user turns (B, C, D) mixes configuration with input and invites drift.

33. Security and Safety. A document fetched from the web contains text instructing the model to ignore

prior instructions. What is the correct architecture?

A. Add a prompt instruction telling the model to ignore embedded instructions B. Treat all fetched content as data, and enforce permissions outside the model C. Filter for the phrase before processing D. Use a larger model, which is less susceptible Rationale: Retrieved content is untrusted input, and the durable defense is that the model's authority is limited by the surrounding system rather than by its own compliance. Prompt instructions (A), phrase filters (C), and model size (D) are all bypassable.

34. Security and Safety. What is the appropriate way to give an integration access to a database?

A. Provide full credentials so the model can handle any request B. Provide read and write access but instruct the model to avoid writes C. Expose only the specific operations the task requires, scoped to what it may touch D. Provide access through a tool with no schema so it stays flexible Rationale: Least privilege bounds the consequences of any mistake or manipulation, and it is enforced outside the prompt. Full credentials (A) and instruction-based restraint (B) rely on behavior rather than control, and an unscoped tool (D) removes the boundary.

35. Eval, Testing, and Debugging. A change to a prompt appears to improve output on the three

examples you tried. What should happen before it ships?

A. Ship it, since three examples agreed B. Ask the model whether the new prompt is better C. Ship it behind a flag and watch for complaints D. Run it against a held-out set that represents the real distribution and compare on defined criteria Rationale: Three hand-picked examples cannot distinguish a real improvement from noise, which is what an evaluation set exists to settle. Self-assessment (B) is not measurement, and shipping first (A, C) makes users the test set.