How to stop Placeholders and Examples in code?

Ive tried multiple ways to stop this behavior but nothing I do seems to work for more than 1 or 2 prompts. It keeps adding TODOs, Examples and Placeholders in any code that it returns. This happens no matter if I have a system prompt or if I make it go file by file and use prompts disallowing it each time. It will still pump out placeholders like #…this is an example function, if this were a real application you should do XYZ, or #…These are placeholders assuming you build this functionality elsewhere. But it just coded the functionality in the previous file.

It wasnt as bad in the experimental 1.5 but 002 seems to be heavily guarding against producing a complete application. Prompts that work with other models just dont seem to work on Gemini Pro.

1 Like

Hi @Beyond

Welcome to the forum!

  1. Start by writing a clear and structured prompt that outlines the specific steps you want the model to follow in its output.
  2. If the initial prompt isn’t producing the desired results, try using few-shot prompting by providing examples to guide the model.
  3. Adopt an iterative approach to refine the model’s output. For instance, after generating code, you can feed the output into another prompt to remove any unnecessary examples or comments. This method helps in progressively improving the results.

Thanks