Copilot++ Suggesting Markdown in Code Blocks/Other Extremely Wrong Things

Usually copilot++ has been great but for the past week/week and a half or so it’s been broken by doing one of the following:

  1. Suggesting large sections of markdown when I’m in a python block of a jupyter notebook. Refusing to do anything else but repeatedly suggesting that same markdown block. By experimenting it seems to do this consistently for me for markdown that’s above the current python block

  2. Suggesting very wrong additions to code. For example today I had the python block

Python
from sklearn.decomposition import FastICA
ica_test = FastICA(n_components = 2)
ica_output = ica_test.fit_transform(df)
plt.scatter(ica_output[:,0], …

the correct next thing to suggest, and what it used to suggest would be

plt.scatter(ica_output[:,0], ica_output[:,1])

instead, it suggests replacing the entire line with

plt.subplot(1,2,1)

Why? Because that’s used in some of the python blocks above that block. But it shouldn’t be getting stuck on that idea when I’m already halfway through a line that obviously isn’t what it’s suggesting.

In general it seems to take parts of my jupyter notebook, markdown or python code, and gets stuck suggesting it as new python code verbatim when it didn’t used to.

I’m not sure if I’m doing something wrong here. I took the following steps:

  1. Updated and restarted cursor
  2. Turned copilot++ off and on
  3. Forced legacy mode, then fast mode, issue seen in both
  4. Added something to the effect of ‘don’t use markdown in python blocks’ in the rules for ai
  5. Tried something like ‘don’t read markdown, don’t use markdown’ in the rules for ai

I can provide more info if needed.

3 Likes

Could you provide the request id of these requests?

In particular, if you switch this to copilot++ and get the request ids for the bad requests, then paste them in here

Yep, did some repeats as well in different blocks of python code

  1. For suggesting markdown in python blocks
    I. 3c7e0b88-bd33-44c1-b14b-fd6fe6f073e2
    II. 1e777b6-64a4-4ba1-81c2-bba53501699b
    III. 0c2cfb98-be5e-44e7-829d-45996d8db542’
    IV. very large removal suggestion, wants to just remove all the code in a block and replace it with a copy of earlier markdown: 338bb130-036b-4cfc-ab2e-8cac2f285e58

  2. For code weirdness, couldn’t make it do the exact thing in my post since I’ve kept working on that file but I got it to do similar.
    I. Suggested changing which array I’m using to plot, copying exactly, including the alpha, a line in a previous Python code block: 329c5513-89c4-48ad-9f1f-8fd4654d5dd1
    II. After doing space after a set_title call, suggests I delete a plot and replace it with some of the plotting code of the previous plot a few lines above it: 05583c04-746f-44b7-b295-3b4fe1a82bb8

would you be able to temporarily turn off privacy mode so we can see logs of the requests?

Yep, just turned off. Do you need me to redo or does it apply retroactively?

need to redo

markdown examples

  1. dc02ae67-32ef-4213-8f6c-9f2941971c00
  2. d6f2574e-a4b2-43f1-b6cb-da568ba830cf
  3. 67f71a3e-cee1-4c7b-8bca-b3dd88df74c5
  4. 19f5c645-5811-4a2f-a80f-9d2f3451cb32

Erroneous verbatim code suggestions

  1. Delete the last line and make it a commented-out version of an earlier line: efffee70-3162-4d47-b9b4-85044d73b2ea
  2. Instead of making the plot you’re making, replace it with a completely different plot from the blocks above: 8059c168-dbfa-41c0-9b31-6d37f5a056ef
  3. After plt.show(), make the 3rd subplot again, an exact copy: 4b6e339d-95c7-4532-b912-49471426a562
1 Like

Has anybody found anything to help this issue yet? it’s persisting stubbornly for me.

Hi mvp, I’ve investigated this problem and found some fixes (I made a thread for this issue as well: Copilot++ Not Behaving Properly with Jupyter Notebooks).

In short, it seems that removing TeX math delimiters ('$'s and '$$'s) in markdown fixes the issue for the most part.

Thanks for looping back around. I had forgotten to check this for a bit.

I have no ‘$’ characters in the entire file but I’ll keep that in mind. Copilot continues to work great for new files but on that specific older one I went back and it still has some trouble but seems to be much better. No markdown suggestions anymore.

It will still suggest exact copies of earlier code but the range is decreased and it’s not as persistent and intrusive as before (when it wouldn’t give up the idea to delete everything I’m working on and copy something else).

All in all it seems to be fixed? I’ll remember the dollar sign thing though, thank you for your investigation and letting me know.

1 Like

Any progress on this issue? My notebook requires $ sign and this bug made me really disappoint.