Hey everyone! I recently began trying out the AI built into the Cursor editor with some Nim projects I've been working on (saw suggestion about using Cursor from @Araq a while back) I wanted to ask if anyone has some best practices/suggestions about how to get the best results from the AI when using the Agent mode. The issue I'm running into is with Nim (more often than a more mainstream language like Python) the IA is hallucinating features of the language that don't exist. For example:
var s: seq[int]
s.add(42) # append “42” as new last element
echo s[^] # 42
and
var i = 0
# do { i += 1; echo i; } while i < 3;
repeat
i += 1
echo i
until i >= 3
These are contrived examples but I was able to get the AI to hallucinate things like the [^] last element index, as well as repeat and until keywords which don't exist! So if anyone out there is able to get Cursor working well on creating larger code blocks I'm interested in your approach.
Thanks!
Odd I’ve had Cursor hallucinate some things but usually not basic syntax like that. More imagining library functions.
Which agent are you using? I’d recommend Claude 3 or 4. Who knows what Cursors default model uses. I also find Gemini capable.
I find Cursors $20/mo the best deal as well. I haven’t hit limits on the above models yet.
Also in case you’re not aware, the inline edit function hallucinates much more. It’s a very simple model.
If you want to generate bigger bits of code use the chat box. That’s where you can set the model.