[ai]2021-11-08~2 min read

How I Actually Use AI in Infrastructure Work

I've been experimenting with GPT-3 and GitHub Copilot for infrastructure work over the last few months. It's early days — Copilot just came out of technical preview — but some patterns are already emerging that I think are worth documenting.

What's working so far

Copilot for PowerShell. This is the most immediately useful application. I write a comment describing what I want — "loop through all mailboxes, find ones over 50GB, export to CSV" — and Copilot suggests the implementation. It's right about 60% of the time. When it's wrong, I fix it. The productivity gain is modest but real: maybe 20% faster for routine scripts.

GPT-3 for documentation. Writing runbook documentation, incident post-mortems, architecture decision records — GPT-3 produces decent first drafts. I edit heavily, but starting from something is faster than starting from a blank page. The output reads like a junior admin's documentation: technically correct, overly formal, missing the judgment about what matters and what doesn't. That's fine. I add the judgment.

SQL query generation. Describing a query in English and getting back working T-SQL is genuinely useful when I'm context-switching between infrastructure and database work. Not having to remember the exact JOIN syntax for a query I'll run once saves mental overhead.

What's not ready

The models don't understand infrastructure dependencies. Ask for a complete Bicep deployment and you'll get something that deploys but doesn't account for the ordering constraints, the RBAC prerequisites, or the networking dependencies that make it actually work. The models generate code. They don't generate architecture.

They also hallucinate cmdlets. Copilot has suggested PowerShell cmdlets that don't exist — names that sound plausible but aren't real. This has gotten better as the training data improved, but it still happens enough that I verify every suggestion.

Where I think this is going

Code generation is the obvious use case, but I think the bigger impact will be in operations: log analysis, incident triage, configuration auditing. The models are pattern matchers, and operations is full of patterns. Today's tools aren't there yet, but the trajectory is clear. In a year or two, I expect LLMs to be a standard part of the operations toolkit, not a novelty.

For now, I'm treating them as a useful but unreliable assistant. Trust nothing. Verify everything. But keep experimenting — the capability is improving faster than most people in this field realise.

[ai][automation]