Use deepseek R1 (vs claude sonnet 3.5) for cursor
The lastest cursor version support deepseek R1 and V3 in Chat but not in Composer. It seems R1 in cursor is not the full stable version. I use it for C an js development. Here are some tips (or bugs):
- R1 just can't count correctly. If an array has 10 elements, R1 initializes its size 9. If it has 11 elements, R1 initializes 10. AAAgonizingly!
- If I ask R1 to program according to a requirement file(.md format), or to check if it is programmed prorperly, it is always negligent, and misunderstands something. But if I tell R1 to check a specific paragraph of the requirement, it will find the bug or misunderstood.
- R1 will not check the logic error of the requirement file. Prepare a good requirement before coding. Maybe ask R1 to improve it.
- Instead of reading R1 generated codes line by line, ask it to create some unit tests and system tests to test itself code.
Claude sonnet 3.5 is supported much more better than Deepseek R1. But it also has some weird bugs.
- Try to declare static function in .h file.
The problems of those LLMs are
- verbose, very verbose. And the code is also verbose. They will create a lot of junk codes.
- Cannot create too much codes. Maybe LLMs are limited by tokens, too much codes will generate too much errors.
- Be careful of LLM's counting and arithmetics. They will sometimes count a wrong number and cause a bug.
- If a LLM made a bug and you let him fixed it, he will make the very same bug again when you ask him to refactor the code which bug was fixed.