| name | ai-engineering |
| description | Build reliable systems that leverage AI while maintaining correctness and transparency. |
Skill: AI Engineering
Category: AI Engineering
Priority: High
Description
Build reliable systems that leverage AI while maintaining correctness and transparency.
Purpose
Use AI as a force multiplier without accepting hallucinations or unreliability.
Trigger
Use this skill when:
- Integrating AI models into applications
- Designing prompt engineering workflows
- Evaluating AI outputs
- Building RAG systems
- Reviewing AI-generated code
Context
- Model capabilities and limitations
- Latency and cost constraints
- Data privacy requirements
- Hallucination tolerance
Workflow
- Never Trust Blindly - Every AI output must be verifiable.
- Use Structured Outputs - Constrain model to valid formats.
- Implement Fallbacks - What happens when AI fails?
- Version Prompts - Track prompt changes like code.
- Evaluate Systematically - Test prompts with diverse inputs.
- Monitor in Production - Track success rates, latency, cost.
- Human-in-the-Loop - Require approval for high-stakes decisions.
Examples
Good AI Integration
import json
from typing import Optional
class CodeReviewer:
def review(self, code: str) -> Optional[dict]:
prompt = self.build_prompt(code)
response = self.llm.generate(prompt, format="json")
try:
result = json.loads(response)
if self.validate_schema(result):
return result
except json.JSONDecodeError:
logger.error("AI returned invalid JSON")
return None
Bad AI Integration
def review(code):
return llm.generate(f"Review this: {code}")
Anti-patterns
- Passing AI output directly to users without validation
- No fallback for AI failures
- No monitoring or evaluation
- Hardcoded prompts
- No cost tracking
Verification
References