Unit 5: Testing, Monitoring, and Deployment of AI Agents - Practice Quiz

CSE476 — Agentic Ai And Intelligent Automation 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main purpose of testing an AI agent workflow?

Testing AI agent workflows Easy
A. To verify that workflow steps behave as expected
B. To remove the need for system monitoring
C. To increase the size of the training dataset
D. To replace all external tools with prompts

2 Which type of test checks a single function or component in isolation?

Testing AI agent workflows Easy
A. Acceptance test
B. Load test
C. Integration test
D. Unit test

3 Which resource is most useful for tracing the sequence of actions taken by an AI agent?

Debugging techniques Easy
A. Billing plans
B. Training images
C. Execution logs
D. Color themes

4 What does reproducing an error mean during debugging?

Debugging techniques Easy
A. Replacing the model immediately
B. Deleting the error from the log
C. Triggering the same error again
D. Deploying the error to production

5 What does observability help developers understand about an AI agent?

Observability and monitoring Easy
A. Its license type from source files
B. Its internal behavior from system outputs
C. Its logo design from user surveys
D. Its training cost from model names

6 Which metric directly measures how long an AI agent takes to respond?

Observability and monitoring Easy
A. Availability
B. Accuracy
C. Throughput
D. Latency

7 What is telemetry in an AI agent system?

Telemetry collection Easy
A. Data collected about system operation
B. Rules used to train the language model
C. Files stored for software installation
D. Code generated for the user interface

8 Which telemetry item helps connect events belonging to one request?

Telemetry collection Easy
A. Screen resolution
B. User password
C. Model description
D. Trace identifier

9 What is an AI hallucination?

Hallucination detection Easy
A. A request blocked by an access policy
B. A delayed response caused by network congestion
C. A confident response containing unsupported information
D. A stored response returned from a cache

10 Which method can help detect hallucinations in a factual response?

Hallucination detection Easy
A. Renaming the deployment environment
B. Increasing the user interface brightness
C. Compressing the application source code
D. Comparing claims with trusted sources

11 What is output validation used for in an AI agent?

Validation methods Easy
A. Selecting colors for the monitoring dashboard
B. Checking whether responses meet defined requirements
C. Increasing storage for archived source code
D. Creating accounts for application developers

12 Which validation method is appropriate when an agent must return valid JSON?

Validation methods Easy
A. Visual validation
B. Schema validation
C. Network validation
D. Audio validation

13 Which deployment strategy sends a new version to a small group of users first?

Deployment strategies Easy
A. Local deployment
B. Offline deployment
C. Canary deployment
D. Manual deployment

14 Which Azure service is commonly used to deploy and manage containerized applications?

Cloud deployment on Azure Easy
A. Azure Kubernetes Service
B. Azure Cost Management
C. Azure DNS Zones
D. Azure DevOps Boards

15 Why is an AI agent commonly exposed through an API?

API deployment Easy
A. To prevent clients from using the agent
B. To store all prompts in source control
C. To eliminate authentication from the system
D. To let other applications send requests

16 Which HTTP method is commonly used to submit a prompt in the body of an API request?

API deployment Easy
A. DELETE
B. GET
C. POST
D. HEAD

17 What is a common purpose of continuous integration in an AI agent project?

CI/CD integration Easy
A. Manually reviewing every request in production
B. Automatically testing changes added to the codebase
C. Permanently disabling updates after deployment
D. Replacing version control with local folders

18 What does horizontal scaling mean for an AI agent service?

Scalability considerations Easy
A. Shortening every user prompt
B. Adding memory to one instance
C. Reducing the number of users
D. Adding more service instances

19 How can caching improve the performance of an AI agent?

Performance optimization Easy
A. By reusing results for repeated requests
B. By removing logs from every request
C. By increasing delays for repeated requests
D. By retraining the model for each request

20 Which feature is essential for a production-ready AI agent system?

Production-ready AI agent systems Easy
A. Unrestricted data access
B. Hard-coded user passwords
C. Disabled system monitoring
D. Reliable error handling

21 An AI agent uses a language model, a search tool, and a payment API. During automated testing, the team wants repeatable results without making real payments. Which approach is most appropriate?

Testing AI agent workflows Medium
A. Call every production service with temporary credentials
B. Test only the language model's system prompt
C. Mock the external tools and use fixed model responses
D. Run the workflow repeatedly until outputs match

22 A support agent sometimes sends an incorrect tool parameter after several reasoning steps. What debugging technique would best identify where the incorrect value was introduced?

Debugging techniques Medium
A. Measure only the final response latency
B. Replace structured outputs with plain text
C. Trace intermediate state and tool-call arguments
D. Increase the model's temperature during testing

23 A production agent meets its average latency target, but some users report very slow responses. Which metric is most useful for investigating this issue?

Observability and monitoring Medium
A. Average prompt character count
B. Daily number of deployment commits
C. 95th-percentile end-to-end latency
D. Total number of registered users

24 An agent request passes through an API gateway, an orchestrator, and three tools. Which telemetry field most directly helps connect all events belonging to the same request?

Telemetry collection Medium
A. Correlation identifier
B. Model temperature
C. User interface theme
D. Container image tag

25 A retrieval-augmented agent must answer only from approved policy documents. Which check is most effective for detecting unsupported claims?

Hallucination detection Medium
A. Compare each claim with its cited source passage
B. Reject every response longer than two paragraphs
C. Lower the model temperature for all requests
D. Verify that the response uses formal language

26 A team updates the prompt used by an invoice-processing agent. How should it determine whether extraction accuracy has improved?

Validation methods Medium
A. Evaluate both versions on the same labeled dataset
B. Measure only the new prompt's token usage
C. Compare the number of words in both prompts
D. Deploy the new prompt without prior evaluation

27 A company wants to release a new agent version to a small percentage of production traffic before a full rollout. Which deployment strategy should it use?

Deployment strategies Medium
A. Offline deployment
B. Single-node deployment
C. Canary deployment
D. Manual backup deployment

28 An AI agent deployed on Azure must access Azure Key Vault without storing credentials in source code or environment files. Which option is most appropriate?

Cloud deployment on Azure Medium
A. A hard-coded connection string
B. A public access token
C. A shared administrator password
D. A managed identity

29 A client may retry an agent API request after a network timeout. The request can create a purchase order, so duplicate execution must be prevented. What should the API support?

API deployment Medium
A. A higher model temperature
B. An idempotency key
C. A shorter endpoint name
D. A larger response payload

30 A team wants to prevent agent versions with poor answer quality from reaching production. Which CI/CD control best addresses this requirement?

CI/CD integration Medium
A. Run evaluation tests and enforce a quality threshold
B. Increase the timeout of the deployment pipeline
C. Compress all source files before every build
D. Rename the deployment artifact for each release

31 Traffic to an AI agent varies sharply throughout the day, and each request can trigger a long-running tool operation. Which architecture best handles these bursts?

Scalability considerations Medium
A. A single synchronous process without buffering
B. A fixed worker with an in-memory request list
C. A larger prompt with fewer monitoring events
D. A queue with horizontally scalable workers

32 An agent repeatedly generates embeddings for an unchanged collection of documents, increasing cost and latency. What is the best optimization?

Performance optimization Medium
A. Send the full document collection to the model
B. Increase the embedding dimension for every request
C. Regenerate all embeddings after each user query
D. Cache embeddings using document-content hashes

33 A production agent depends on a third-party search service that occasionally fails. Which design most improves resilience?

Production-ready AI agent systems Medium
A. Return invented results when search is unavailable
B. Disable timeout limits for the search request
C. Retry indefinitely without recording failures
D. Use bounded retries and a fallback response

34 An order-management agent must never call the shipping tool before payment is confirmed. Which test best validates this requirement across many generated inputs?

Testing AI agent workflows Medium
A. A unit test of the shipping API documentation
B. A load test of the model endpoint only
C. A snapshot test of the user interface colors
D. A property-based test of tool-call ordering

35 An agent states that a contract ends on June 30, but the retrieved contract passage states July 30. Which automated method is best suited to flag this response?

Hallucination detection Medium
A. Measuring the response generation latency
B. Checking whether the response contains a date
C. Counting the number of tokens in the response
D. Semantic contradiction checking against the passage

36 After a new release, tool-call success remains high, but users increasingly abandon conversations. Which additional signal would best help detect the underlying quality problem?

Observability and monitoring Medium
A. Container startup timestamp alone
B. Number of files in the source repository
C. Task completion and user feedback rates
D. Length of the deployment pipeline name

37 A healthcare agent's traces may contain patient information. How should the team collect useful telemetry while reducing privacy risk?

Telemetry collection Medium
A. Use patient names as trace identifiers
B. Disable authentication for the telemetry service
C. Store complete prompts in publicly shared logs
D. Redact sensitive fields before exporting traces

38 A team maintains two identical production environments and wants near-instant rollback if a new agent version fails. Which strategy best fits this goal?

Deployment strategies Medium
A. Blue-green deployment
B. Scheduled batch deployment
C. In-place deployment
D. Developer workstation deployment

39 A conversational agent stores session history in each application server's local memory. After horizontal scaling, users sometimes lose context. What is the best correction?

Scalability considerations Medium
A. Increase the language model's context temperature
B. Write session history only to application logs
C. Route every user to a randomly selected server
D. Store session state in a shared external service

40 An agent performs ten independent retrieval requests sequentially, and each request takes about ms. Which change is most likely to reduce total retrieval latency?

Performance optimization Medium
A. Add a fixed delay before each request
B. Increase the number of sequential reasoning steps
C. Execute the independent requests concurrently
D. Log each retrieved passage several additional times

41 An AI agent uses a stochastic planner and three external tools. The same input may produce different valid execution paths. Which test design best detects workflow regressions without requiring an exact trace match?

Testing AI agent workflows Hard
A. Assert that every run produces the same tool sequence and final wording
B. Evaluate only whether each external tool returns an HTTP success status
C. Assert invariant outcomes, tool constraints, and statistical success thresholds across repeated runs
D. Replace the planner with fixed responses and test only the final formatter

42 A production agent intermittently selects an expensive tool even though an equivalent cached result exists. Logs contain prompts and final answers but not intermediate state. Which change most directly enables deterministic diagnosis?

Debugging techniques Hard
A. Disable caching temporarily and compare aggregate token consumption between deployments
B. Record model temperature, state transitions, tool arguments, cache decisions, and response identifiers
C. Increase log verbosity for the final answer and retain responses for a longer period
D. Retry the request with a larger model whenever the expensive tool is selected

43 An agent request invokes a planner, retrieval service, and multiple tools across separate processes. Operators must identify which component caused a latency spike for one request. Which observability design is most appropriate?

Observability and monitoring Hard
A. Store aggregate latency per service and compare hourly arithmetic means
B. Assign each service an independent request identifier and retain only error logs
C. Propagate a trace context and create spans for planning, retrieval, and tool calls
D. Measure model token usage and infer downstream latency from token counts

44 A team adds the complete user prompt as a metric label to diagnose failures. Monitoring costs and query latency rise sharply, and sensitive data may be exposed. What is the best redesign?

Telemetry collection Hard
A. Encrypt prompt labels while preserving one unique metric series per prompt
B. Truncate every prompt to a fixed length before storing it as a metric label
C. Store redacted prompts in controlled logs and use bounded categorical metric labels
D. Hash each complete prompt and continue using the hash as a metric label

45 A retrieval-augmented agent answers questions using documents that may contain outdated or contradictory claims. Which mechanism most reliably detects unsupported statements in the generated answer?

Hallucination detection Hard
A. Regenerate the answer until two independently sampled completions are identical
B. Compare the answer embedding with the average embedding of retrieved documents
C. Decompose the answer into claims and verify each claim against cited evidence
D. Reject responses whose language-model perplexity exceeds a calibrated threshold

46 Two stochastic agent versions are evaluated on the same 1,000 tasks. Task difficulty varies substantially, and each version is run once per task using matched seeds. Which analysis best estimates whether the new version improved task success?

Validation methods Hard
A. Compare unpaired confidence intervals for the two overall success proportions
B. Compare average prompt token counts using an independent-samples statistical test
C. Bootstrap paired per-task success differences and inspect the resulting interval
D. Discard tasks where both versions agree and report the remaining raw percentage

47 A new agent release changes both prompt logic and the schema of persisted conversation state. A canary deployment routes 5% of traffic to the new release, but users may switch between versions on later turns. Which strategy best prevents state incompatibility?

Deployment strategies Hard
A. Pin conversations to a version and use backward-compatible, versioned state schemas
B. Clear conversation state whenever traffic is shifted between deployment percentages
C. Route every turn independently and allow each release to reinterpret stored state
D. Duplicate the state store and asynchronously copy all records between both versions

48 An agent hosted on Azure Container Apps must access Azure Key Vault and Azure AI Search without storing credentials in code or deployment variables. Which configuration best satisfies this requirement?

Cloud deployment on Azure Hard
A. Use a managed identity and grant least-privilege RBAC roles to both resources
B. Embed an Azure CLI login token in the container and rotate it during each release
C. Store service keys in container environment variables populated during image build
D. Expose both services through public endpoints restricted by a shared application key

49 An agent API starts long-running jobs and clients frequently retry after network timeouts. Duplicate retries currently trigger repeated tool actions, including duplicate purchases. Which API contract most directly mitigates this failure?

API deployment Hard
A. Accept only synchronous requests and increase the server timeout to fifteen minutes
B. Use HTTP GET for job creation so intermediaries can cache repeated client requests
C. Return HTTP 500 after a timeout and require clients to generate a new request body
D. Require an idempotency key and return a stable job identifier for repeated submissions

50 A pull request changes an agent's system prompt. Unit tests pass, but offline evaluations show a 2% quality decrease with lower token cost. The release policy permits at most a 1% quality decrease. What should the pipeline do?

CI/CD integration Hard
A. Block promotion because the quality regression exceeds the declared acceptance threshold
B. Deploy to all users and determine significance from production incidents afterward
C. Deploy because reduced token cost compensates automatically for the quality decrease
D. Deploy because deterministic unit tests provide stronger evidence than offline evaluations

51 A horizontally scaled agent service stores active conversation memory in each instance's local RAM. Autoscaling and load balancing cause later turns to lose context. Which architectural change best supports reliable scale-out?

Scalability considerations Hard
A. Disable autoscaling and assign one permanently running instance to each active user
B. Increase each instance's memory and configure the load balancer for random routing
C. Externalize conversation state to a shared store and make workers operationally stateless
D. Replicate all conversation state synchronously between every pair of service instances

52 An agent executes retrieval in 120 ms, planning in 300 ms, two independent tool calls in parallel taking 500 ms and 700 ms, synthesis in 250 ms, and fixed orchestration overhead of 80 ms. Assuming these stages are otherwise sequential, what is the end-to-end latency?

Performance optimization Hard
A.
B.
C.
D.

53 A financial agent can initiate irreversible transfers through a tool. Which control set best reduces the risk of erroneous autonomous actions while preserving useful automation?

Production-ready AI agent systems Hard
A. Require approval above risk thresholds, validate arguments, and enforce tool-side limits
B. Use a larger model, increase temperature, and retain complete prompts indefinitely
C. Retry failed transfers automatically and reconcile duplicate transactions once per day
D. Ask the model to critique its transfer decision before invoking the unrestricted tool

54 A scheduling agent should preserve an existing meeting's duration when the user asks to move it to another start time. Which metamorphic test is most appropriate?

Testing AI agent workflows Hard
A. Replace the calendar tool with a mock and assert that no tool invocation is produced
B. Change the requested start time and assert that the resulting duration remains invariant
C. Repeat the identical request and assert that the generated explanation is word-for-word equal
D. Add unrelated meetings and assert that the planner always emits the same complete trace

55 Two tools execute concurrently and both update shared agent state. A rare failure occurs when one update overwrites the other. Which diagnostic approach is most likely to reveal the defect?

Debugging techniques Hard
A. Increase both tool timeouts so their updates are more likely to finish successfully
B. Log only the final state and compare it with the expected state after each release
C. Lower model temperature so the planner selects the same tools more consistently
D. Capture ordered state versions and span events, then replay with controlled scheduling

56 An agent's immediate operational metrics remain stable, but confirmed task-success labels arrive seven days later and show degradation after a knowledge-base update. Which monitoring design would detect this pattern most effectively?

Observability and monitoring Hard
A. Treat user sentiment as an immediate substitute for every delayed task-success label
B. Monitor only real-time CPU, memory, error rate, and median response latency
C. Join delayed outcome labels to deployment and knowledge-base version dimensions
D. Alert whenever the daily number of retrieved documents differs from the previous day

57 A failure occurs in only 0.05% of agent traces. Uniform 1% head sampling rarely captures it, but retaining every trace is too expensive. Which sampling strategy best preserves diagnostic traces under a storage budget?

Telemetry collection Hard
A. Retain one complete trace per hour regardless of result, latency, or deployment version
B. Use tail-based sampling that retains errors, anomalous latency, and a baseline sample
C. Use head-based sampling keyed only by the first character of the user identifier
D. Store aggregate counters only and reconstruct individual failure traces from metric values

58 A model assigns high probability to a medical statement, and five sampled responses repeat it consistently, but the retrieved sources do not support it. How should a hallucination detector classify the statement?

Hallucination detection Hard
A. Supported, because high model confidence is a calibrated estimate of factual correctness
B. Indeterminate, because retrieved evidence is irrelevant when model confidence is sufficiently high
C. Unsupported, because neither confidence nor self-consistency establishes source entailment
D. Supported, because agreement among sampled responses constitutes external verification

59 An Azure-hosted agent must survive a regional outage while preventing the same queued tool command from producing duplicate side effects after failover. Which design is most appropriate?

Cloud deployment on Azure Hard
A. Use geo-replicated logs while keeping queues and tool execution confined to one region
B. Use active-active regions and allow each consumer to execute every replicated message
C. Use multi-region deployment, durable queues, idempotent consumers, and replicated state
D. Use a single region with larger instances, longer timeouts, and local conversation state

60 A streaming agent API generates tokens faster than some clients can consume them, causing server buffers to grow until instances run out of memory. Which mechanism best addresses the problem?

API deployment Hard
A. Increase response buffer limits and postpone cancellation until generation completes
B. Disable streaming and hold every completed response entirely in process memory
C. Implement backpressure, bounded buffers, cancellation propagation, and idle timeouts
D. Open additional model connections whenever a client's outgoing buffer becomes full