What are the best s...
 
Notifications
Clear all

What are the best system prompts for DeepSeek Coder V2?

4 Posts
5 Users
0 Reactions
83 Views
0
Topic starter

Hey everyone! I've been experimenting with DeepSeek Coder V2 lately for a React and Python project, and while the model is super fast, I'm struggling to get it to follow my coding style perfectly. I usually want it to focus on type safety and avoid deprecated libraries, but it keeps suggesting older stuff.

I've tried a few basic instructions like 'act as a senior dev,' but I feel like I'm missing some secret sauce for this specific model architecture. I'm especially looking for prompts that help with:

  • Writing clean, modular TypeScript code
  • Handling complex logic without hallucinating imports

Does anyone have a go-to system prompt that really makes this model shine?


4 Answers
12

Hey! I totally get the frustration. I've been using the DeepSeek Coder V2 Lite MoE for a bit now and it can definitely get ahead of itself if you dont set some hard boundaries. Since I'm all about reliability and keeping things stable, I usually stick to one of two prompt setups. Option 1: The Strict Documentation approach.
This one focuses on telling the model to only use LTS versions and verify every import against current docs before writing a single line.

  • Pros: Super safe, rarely suggests weird outdated hacks.
  • Cons: It can be a bit overly cautious and might miss some cool new syntax. Option 2: The Modular Type-Safety prompt.

Here, I force the model to avoid 'any' at all costs and split everything into small, testable modules from the start.

  • Pros: The code is incredibly clean and easy to test.
  • Cons: It takes a bit more effort to stitch everything back together manually. Honestly, I recommend the first one for most projects. It stops the model from hallucinating imports that dont exist anymore. I run mine on a rig with a Crucial T705 2TB NVMe SSD and an NVIDIA GeForce RTX 4080 Super 16GB and it handles these long system prompts like a champ. Just remember to be specific about which React version you are on, otherwise it might try to give you class components from 2018 or something lol.


12

Honestly, the biggest issue with these MoE models is that they tend to drift toward the most common (often outdated) patterns found in their training data. To fix the hallucination and legacy code issues, I found that version locking your system prompt is the way to go. Instead of generic titles, tell it exactly which versions of Python or React you are using. For my workflow, I use a prompt like: Expert Dev. Enforce strict TS types. Use Vite and React 18 patterns only. No class components. Python 3.10+ syntax with Pydantic v2. If you are running the 236B version locally, make sure your hardware is up to it or you will get truncated logic. I am running mine on an ASUS ROG Strix GeForce RTX 4090 24GB and the speed is great for real-time coding. Another cheap tip: Tell the model to think step-by-step before outputting code to reduce those weird import hallucinations. It forces the model to verify the module exists in its internal map first.


3

I usually just include a line about minimizing tokens to save money and it actually stops the model from rambling into weird hallucinations. Honestly though, the money I saved on my last project let me finally fix up my old mountain bike. I spent all morning trying to bleed the brakes and got hydraulic fluid all over the garage floor... anyway sorry kinda went off topic there lol


1

100% agree


Share: