Implement Monitoring and Auditing for an AI System
This lab directly supports the following CompTIA SecAI+ (CY0-001) exam objectives. The table below maps the major concepts and hands-on tasks in this lab to the corresponding exam objectives, providing a clear link between the practical skills learned and the required certification knowledge.
| Task/Major Concept | Description | CompTIA SecAI+ (CY0-001) Objective |
|---|---|---|
| Overall Lab Focus | Implementing a comprehensive monitoring and auditing framework for an AI system | 2.5: Given a scenario, implement monitoring and auditing for an AI system. |
| Task 1: Prompt and Response Monitoring | Tracking inputs (prompts) and outputs (responses) and calculating a response confidence level | 2.5: Given a scenario, implement monitoring and auditing for an AI system. |
| Task 2: Log Monitoring and Analysis | Using shell tools and scripting to filter, analyze, and count log entries for errors and warnings | 2.5: Given a scenario, implement monitoring and auditing for an AI system. |
| Task 3: Log Sanitization (PII Masking) | Implementing controls to remove or mask sensitive data (PII) from logs | 2.4: Given a scenario, implement data security controls for AI systems. |
| Task 3: Log Protection (Encryption/Permissions) | Applying security controls like encryption and file permissions to protect log data integrity | 2.4: Given a scenario, implement data security controls for AI systems. |
| Task 4: Rate and Cost Monitoring | Implementing rate limiting and tracking token usage for resource management and cost control | 2.5: Given a scenario, implement monitoring and auditing for an AI system. |
| Task 5: Compliance Audit | Simulating an audit to verify adherence to data governance policies (e.g., PII handling) | 4.3: Explain the impact of compliance on the business use and development of AI. |
Overview
The deployment of artificial intelligence (AI) and large language models (LLMs) into production environments introduces unique challenges related to performance, reliability, security, and compliance. Unlike traditional software, AI systems can exhibit model drift, data drift, and hallucinations, which necessitate specialized monitoring and auditing practices. This lab provides a practical, hands-on approach to implementing a robust observability and auditing framework for an AI system, focusing on key areas such as prompt and response tracking, log management, cost control, and compliance checks. By the end of this lab, you will be able to implement essential monitoring components to ensure the quality, security, and responsible operation of AI applications using a local, self-hosted LLM environment based on Ubuntu and Ollama. This lab utilizes the SmolLM2 family of models, which are specifically designed for high-speed, resource-efficient local deployment, allowing for rapid iteration and lower operational overhead in monitoring tasks.
VM Credentials
Username: student
Password: student