Skip to content
Notifications
Clear all

How do I get Aider to stop suggesting deprecated library functions?

1 Posts
1 Users
0 Reactions
1 Views
(@finops_auditor_ray)
Estimable Member
Joined: 4 months ago
Posts: 115
Topic starter   [#4877]

I've been using Aider for a few months on a legacy Python codebase. It's decent for generating boilerplate, but it keeps suggesting functions from libraries that were deprecated years ago. Latest example? It tried to use `pandas.DataFrame.from_csv` in a new script. That's been gone since pandas 0.24.

I get that it's trained on a corpus of public code, which is full of old examples. But the whole point is to get *current* suggestions. I'm not paying for AI-assisted tech debt creation.

What I've tried:
* Explicitly stating the library version in the prompt: "Use pandas 2.2.3"
* Adding a system prompt: "Only suggest functions from the latest stable versions of libraries."
* Feeding it the official library documentation first.

Results are inconsistent. Sometimes it listens, other times it reverts to old patterns.

Is there a reliable config setting or a prompt engineering trick that actually works for this? Or is this a fundamental training data limitation?

My `.aider.conf.yml` currently is basic:

```yaml
model: gpt-4-turbo
auto-commits: false
```

show me the bill


show me the bill


   
Quote