Skip to content

Session 2 - Module D: Test Solutions

Multiple Choice Test - Module D Solutions


Question 1: What categories of metrics are tracked in the PerformanceMetrics dataclass?

Answer: B) Response time, resource usage, LLM-specific, tool usage, error, quality, and operational metrics

Explanation: The PerformanceMetrics dataclass comprehensively tracks seven categories: response time metrics (avg, p50, p90), resource usage (memory, CPU), LLM-specific metrics (tokens, latency), tool usage metrics (execution time, success rate), error metrics (error rate, timeouts), quality metrics (response quality, satisfaction), and operational metrics (uptime, deployment frequency).


Question 2: What does the benchmark suite initialization include?

Answer: B) Agent factory, configuration, performance history, logger, and memory tracing

Explanation: The PerformanceBenchmarkSuite initialization includes an agent factory for creating test instances, configuration parameters, performance history storage, a logger for tracking, and memory tracing activation (tracemalloc.start()) for detailed performance analysis.


Question 3: How are benchmark results organized for analysis?

Answer: B) By scenario with unique benchmark IDs, timestamps, and recommendations

Explanation: Benchmark results are structured with unique benchmark IDs for tracking, start timestamps, configuration details, results organized by scenario name, summary analytics, and actionable recommendations. This organization enables comprehensive performance analysis across different use cases.


Question 4: What metrics are particularly important for cost optimization?

Answer: B) Token processing rates, API latency, and resource consumption

Explanation: Cost optimization focuses on metrics that directly impact billing: token processing rates (tokens_per_second, avg_prompt_tokens, avg_completion_tokens), API latency (affects efficiency), and resource consumption (memory_usage_mb, cpu_usage_percent) which determine infrastructure costs.


Question 5: What is the purpose of tracking percentile metrics (p50, p90) rather than just averages?

Answer: B) Understand user experience under different load conditions and identify outliers

Explanation: Percentile metrics (p50 = median, p90 = 90th percentile) reveal how the system performs for different user groups. While averages can hide outliers, percentiles show if most users have good experience (p50) and identify worst-case scenarios (p90), essential for understanding user experience under varying load conditions.


Return to Module

← Back to Module D