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. Integration test
B. Acceptance test
C. Load 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. Color themes
B. Execution logs
C. Training images
D. Billing plans

4 What does reproducing an error mean during debugging?

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

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

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

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

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

7 What is telemetry in an AI agent system?

Telemetry collection Easy
A. Rules used to train the language model
B. Files stored for software installation
C. Data collected about system operation
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. Model description
C. Trace identifier
D. User password

9 What is an AI hallucination?

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

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

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

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

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

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

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

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

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

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

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

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

API deployment Easy
A. To store all prompts in source control
B. To prevent clients from using the agent
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. GET
B. DELETE
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. Permanently disabling updates after deployment
C. Replacing version control with local folders
D. Automatically testing changes added to the codebase

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 retraining the model for each request
B. By increasing delays for repeated requests
C. By removing logs from every request
D. By reusing results for repeated requests

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

Production-ready AI agent systems Easy
A. Disabled system monitoring
B. Hard-coded user passwords
C. Unrestricted data access
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. Run the workflow repeatedly until outputs match
B. Test only the language model's system prompt
C. Mock the external tools and use fixed model responses
D. Call every production service with temporary credentials

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. Trace intermediate state and tool-call arguments
C. Replace structured outputs with plain text
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. Total number of registered users
B. Daily number of deployment commits
C. 95th-percentile end-to-end latency
D. Average prompt character count

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. Container image tag
B. Model temperature
C. Correlation identifier
D. User interface theme

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. Reject every response longer than two paragraphs
B. Lower the model temperature for all requests
C. Verify that the response uses formal language
D. Compare each claim with its cited source passage

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. Deploy the new prompt without prior evaluation
B. Measure only the new prompt's token usage
C. Evaluate both versions on the same labeled dataset
D. Compare the number of words in both prompts

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. Manual backup deployment
D. Canary 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 managed identity
B. A public access token
C. A hard-coded connection string
D. A shared administrator password

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 shorter endpoint name
B. A larger response payload
C. An idempotency key
D. A higher model temperature

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 larger prompt with fewer monitoring events
B. A fixed worker with an in-memory request list
C. A single synchronous process without buffering
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. Cache embeddings using document-content hashes
B. Send the full document collection to the model
C. Increase the embedding dimension for every request
D. Regenerate all embeddings after each user query

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. Retry indefinitely without recording failures
B. Return invented results when search is unavailable
C. Use bounded retries and a fallback response
D. Disable timeout limits for the search request

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 property-based test of tool-call ordering
B. A unit test of the shipping API documentation
C. A load test of the model endpoint only
D. A snapshot test of the user interface colors

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. Semantic contradiction checking against the passage
C. Counting the number of tokens in the response
D. Checking whether the response contains a date

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. Number of files in the source repository
B. Container startup timestamp alone
C. Length of the deployment pipeline name
D. Task completion and user feedback rates

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. Store complete prompts in publicly shared logs
B. Disable authentication for the telemetry service
C. Use patient names as trace identifiers
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. Developer workstation deployment
C. In-place deployment
D. Scheduled batch 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. Write session history only to application logs
B. Store session state in a shared external service
C. Increase the language model's context temperature
D. Route every user to a randomly selected server

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. Execute the independent requests concurrently
B. Add a fixed delay before each request
C. Increase the number of sequential reasoning steps
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. Replace the planner with fixed responses and test only the final formatter
B. Assert that every run produces the same tool sequence and final wording
C. Assert invariant outcomes, tool constraints, and statistical success thresholds across repeated runs
D. Evaluate only whether each external tool returns an HTTP success status

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. Record model temperature, state transitions, tool arguments, cache decisions, and response identifiers
B. Retry the request with a larger model whenever the expensive tool is selected
C. Increase log verbosity for the final answer and retain responses for a longer period
D. Disable caching temporarily and compare aggregate token consumption between deployments

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. Assign each service an independent request identifier and retain only error logs
B. Measure model token usage and infer downstream latency from token counts
C. Store aggregate latency per service and compare hourly arithmetic means
D. Propagate a trace context and create spans for planning, retrieval, and tool calls

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. Store redacted prompts in controlled logs and use bounded categorical metric labels
C. Hash each complete prompt and continue using the hash as a metric label
D. Truncate every prompt to a fixed length before storing it 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. Decompose the answer into claims and verify each claim against cited evidence
B. Reject responses whose language-model perplexity exceeds a calibrated threshold
C. Compare the answer embedding with the average embedding of retrieved documents
D. Regenerate the answer until two independently sampled completions are identical

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

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

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

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. Require an idempotency key and return a stable job identifier for repeated submissions
D. Return HTTP 500 after a timeout and require clients to generate a new request body

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 because reduced token cost compensates automatically for the quality decrease
C. Deploy to all users and determine significance from production incidents afterward
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. Replicate all conversation state synchronously between every pair of service instances
D. Externalize conversation state to a shared store and make workers operationally stateless

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. Ask the model to critique its transfer decision before invoking the unrestricted tool
B. Retry failed transfers automatically and reconcile duplicate transactions once per day
C. Use a larger model, increase temperature, and retain complete prompts indefinitely
D. Require approval above risk thresholds, validate arguments, and enforce tool-side limits

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. Add unrelated meetings and assert that the planner always emits the same complete trace
B. Repeat the identical request and assert that the generated explanation is word-for-word equal
C. Replace the calendar tool with a mock and assert that no tool invocation is produced
D. Change the requested start time and assert that the resulting duration remains invariant

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

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. Monitor only real-time CPU, memory, error rate, and median response latency
B. Join delayed outcome labels to deployment and knowledge-base version dimensions
C. Treat user sentiment as an immediate substitute for every delayed task-success label
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. Store aggregate counters only and reconstruct individual failure traces from metric values
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. Retain one complete trace per hour regardless of result, latency, or deployment version

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. Indeterminate, because retrieved evidence is irrelevant when model confidence is sufficiently high
B. Unsupported, because neither confidence nor self-consistency establishes source entailment
C. Supported, because agreement among sampled responses constitutes external verification
D. Supported, because high model confidence is a calibrated estimate of factual correctness

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 a single region with larger instances, longer timeouts, and local conversation state
D. Use multi-region deployment, durable queues, idempotent consumers, and replicated 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. Open additional model connections whenever a client's outgoing buffer becomes full
B. Implement backpressure, bounded buffers, cancellation propagation, and idle timeouts
C. Disable streaming and hold every completed response entirely in process memory
D. Increase response buffer limits and postpone cancellation until generation completes