Skip to content
Notifications
Clear all

Anyone else find that AI assistants really struggle with framework-specific code?

4 Posts
4 Users
0 Reactions
0 Views
(@devops_dad)
Reputable Member
Joined: 5 months ago
Posts: 270
Topic starter   [#24332]

Alright, I've got to get this off my chest. I've been playing around with several of the big-name AI coding assistants for my home lab projects—think Ansible playbooks for my Proxmox cluster, or tweaking my Docker Compose setups. I've noticed something consistent: they're fantastic for generic "write me a function to reverse a string," but the moment you ask for something specific to a framework's way of doing things, they start to hallucinate like it's 3 AM on a week-long on-call shift.

Take this simple task I gave a few of them last week: "Write an Ansible task to ensure the `netdata` package is installed, enabled, and started, but only if the OS family is Debian." You'd think that's bread-and-butter stuff. One assistant gave me a `yum` module for a Debian family (facepalm). Another used the `service` module with parameters that were deprecated two Ansible major versions ago. It's like they trained on a snapshot of documentation from 2020 and never got the memo about `ansible.builtin` or the modern `systemd` module best practices.

Here's a snippet one of them produced that had me chuckling into my coffee:

```yaml
- name: Install and start netdata
apt:
name: netdata
state: present
service:
name: netdata
state: started
enabled: yes
when: ansible_os_family == "Debian"
```

Looks okay at a glance, right? But any seasoned Ansible user spots the critical flaw immediately. You can't just mash two modules (`apt` and `service`) into a single task like that. It's a syntax error waiting to happen. The assistant got the logic, but completely bungled the framework's fundamental structure.

So, my question to the community: is this a universal experience? Have you found that certain frameworks or tools are particularly hard for AI to get right? I'm thinking of things like:
* Terraform with provider-specific resources
* Kubernetes manifests with non-standard annotations
* Framework-specific configs like `next.config.js` or `vue.config.js`

I'm starting to think the real skill is no longer just knowing the syntax, but being a good editor—knowing *which* 70% of the AI's output to keep and where to step in with the framework-specific nuance. It's like mentoring a very enthusiastic junior dev who has read all the books but never actually fought a fire in production.

What's been your experience? Any particular "framework fails" that stick out in your memory?

-- Dad


it worked on my machine


   
Quote
(@crm_hopper_2027)
Reputable Member
Joined: 2 months ago
Posts: 193
 

Oh, I feel this in my bones, but from a different trench. It's the same story when you ask these things for framework-specific configuration in a CRM context. Ask one to write a Salesforce Apex trigger respecting bulkification patterns, or a HubSpot custom module with the correct serverless function structure, and you'll get a Frankenstein's monster of deprecated syntax and insecure practices.

They confidently suggest using `@future` methods for everything in Salesforce like it's 2015, or they'll write a HubSpot serverless function that makes five separate API calls in a loop, completely ignoring rate limits and the existence of batch endpoints. The training data is clearly a graveyard of old forum posts and outdated official docs.

It makes you wonder if the real value is just as a very fast, very confident rubber duck that you then have to completely rewrite.



   
ReplyQuote
(@gracehopper2)
Estimable Member
Joined: 3 weeks ago
Posts: 178
 

That's a perfect example. They get the *shape* of the request right - you wanted a task with conditions - but the actual implementation details are from a forgotten era of the framework. It's like they're pattern-matching against outdated training data without any concept of versioning.

I see this a lot in CI/CD contexts too. Ask for a GitHub Actions workflow to build a Java project, and it'll often default to deprecated `set-env` commands or suggest actions that were archived years ago. The advice is structurally correct but practically hazardous.

Your netdata case is particularly funny because the `apt` vs `yum` mix-up is such a fundamental, rookie mistake. It suggests the model isn't reasoning about the constraints in your prompt at all, it's just stitching together phrases it's seen near "package installation." Makes you trust the output a lot less for anything beyond boilerplate.


ship early, test often


   
ReplyQuote
(@carlj)
Estimable Member
Joined: 3 weeks ago
Posts: 148
 

You've hit on the core issue: they're probabilistic text generators, not reasoning engines with an internal changelog. That "structural correctness but practical hazard" you describe is the most dangerous output because it looks plausible.

My specific annoyance is in infrastructure as code, where this versioning problem is critical. Ask for a Terraform module to deploy an AWS EKS cluster, and you'll get a `kubernetes` provider configuration littered with deprecated arguments like `load_config_file`. The shape is perfect - it defines a provider, a cluster, a node group - but it'll fail on apply because the API moved on two major versions ago. The training data is a snapshot of 2021 Stack Overflow, forever.

This is why I refuse to use them for anything requiring current API knowledge unless I can provide the exact documentation text as context. The "reasoning" is just an echo of old discussions.


Trust but verify.


   
ReplyQuote