How to prompt ChatGPT to provide full answers, including technical details such as source code?

Hi everyone,
I’m trying to study some IoT codes by ChatGPT help.
How can i get the completely answers from ChatGPT, he very often stop his reply when the answer was still not completed.

Thank you!


You can always ask it to continue its sentence. (ref)

For example


Some question


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <rest is missing>




magna aliqua.

EDIT 03/28/2023

For completions that now require continue ChatGPT is sometimes noting

Note: the code above might be split into two parts due to character limits
in the platform, please make sure to combine them before trying to use it.

Thanks, i have tried this, but it seem work well for text reply only, with the complex combine codes and explain text, it often give the continue answer not exactly with the previous content.

As a programmer know exactly what you are asking. There is a varition on the continue but it is not widely publized and since I have only used it once can’t say if it is better but noting for the record.

Instead of just continue try using the last partial sentence or lines of code then add continue, e.g.

If the full expected output is (ref)

const matrixA = math.matrix([[0, 1], [2, 3], [4, -5]]);
const matrixB = math.matrix([[1, -1], [-2, 4], [-7, 4]]);

// addition
const matrixAdditionAB = math.add(matrixA, matrixB);
// [ [ 1, 0 ], [ 0, 7 ], [ -3, -1 ] ]

// subtraction
const matrixAdditionAB = math.subtract(matrixA, matrixB);
// [ [ -1, 2 ], [ 4, -1 ], [ 11, -9 ] ]

// multiplication
const matrixK = math.matrix([[0, 1], [2, 3], [4, 5]]);
const matrixL = math.matrix([[2, 4], [6, 2]]);

const matrixKL = math.multiply(matrixK, matrixL);
// [ [ 6, 2 ], [ 22, 14 ], [ 38, 26 ] ]

// division
const matrixY = math.matrix([[0, 2], [2, 4], [4, 6]]);
const matrixZ = math.matrix([[2, 1], [2, 2]]);

const matrixYZ = math.divide(matrixY, matrixZ);
// [ [ -2, 2 ], [ -2, 3 ], [ -2, 4 ] ]

and ChatGPT gives

const matrixA = math.matrix([[0, 1], [2, 3], [4, -5]]);
const matrixB = math.matrix([[1, -1], [-2, 4], [-7, 4]]);

// addition
const matrixAdditionAB = math.

then in the next prompt try


// addition
const matrixAdditionAB = math.


// addition
const matrixAdditionAB = math.


Also the sooner you try continuing after the partial completion is written the better it works. In other words if you are waiting for a completion to complete and then do another task and come back to find a partial completion and try this, it will often be seen as a new prompt and start over as opposed to continuing.



I usually copy the last line and type “continue from ‘paste’. It def works to let it pick up where it left off, although it doesn’t always continue with the code format if i wanted it to complete a code section. I’ve seen someone say” continue, in code block" but haven’t tried yet. Good luck


Check the max tokens. Sometimes if the prompt is too big, it’s stop when the total tokens reach the max token.


I have had this problem I just interrupt the response because it will go on for a long time.

I then say The last response was interuoted please continue.

If it doesn’t continue correctly tell it to repeat the entire response to your query instead. That almost always works.

You can also go to your query and resubmit it manually, but Chat GPT doesn’t always answer the same and sometimes the 2-5th time answering the same query gets a much better result.


The model produced a complete response, It don’t known that its last response was cut.
If you just type ‘continue’, It will think that the previous response was not enough and reelaborate.

That can produce a lot of incomplete source code. Sometimes having allucinatory code trying to complete the previous good/simple code.

To get the most accurate sequence, the best way I found, is copy all (or most at the end) saying:

Your previous messages was cut, please repeat after:

It will complete the code, or bring a refactored version.


Could you please edit the title of this topic. Your title is very generic but your paticular question is much more specific, e.g. you note that continue works find for just text but that you have complex combine codes, which I have no idea what that means other than it is not simple text. :slightly_smiling_face:

The reason I ask is that there are several good options for your specific case and finding this topic would be much harder without a more specific title.


Hi cehlab14,

I have found a solution which works very good for me. No advanced sorcery but quite reliable:

Input 1 (Prompt & Specification how to awnswer):
Explain different ways to align a CSS-Element.
Split your awnswer in two seperate replys, mark them with (1/2) and (2/2), send me first the first awnswer and when I send “next” send the second one.

Input 2 (let ChatGPT continue)

Work’s well for me because you can specify that you want to continue the awnser - also you can check with the (1/X) that you are at the right response.


Thank for your advice, could you give me the suggesstion for this topic ?

Are you asking for more adivse on this or how to make the title more specific?

If you are asking for a more specific title for the topic then perphas

How to prompt ChatGPT to provide full answers, including technical details such as source code?

That was created using ChatGPT, the prompt was

rephrase question, keep to one sentence, this is for a topic title

ChatGPT often stops short of a full answer, in this case something very technical such as source code, how can it be prompted to provovide the answer?

I know I am using the phrase source code and you did not use source code, many programmers do use this site and the phrase source code will grab their attention so that they read this even if it is not something they might currently be seeking but may need in the future.

The real distinction with your question is that normally with just prose continue is more likely to work but with something technical, the last part of the previous completion needs to be included so that the next completion will continue correctly.

1 Like

I tried: “your code was interrupted please write it out again in one code block”, and it did a bit better but not a full answer

The I wrote: “your code was interrupted again please continue to write from the last complete line of code, in a code block”.

Hi, I tried your idea, but sometimes the two fragments cannot form a complete recovery due to network problems, if you have any other ways, please let me know, thank you

Hi @xutianhaoisme , did you try it using the api or via the Website? By doing the first one you would have a way to mitigate this issue because the whole content of the conversation will be resubmitted.

In general I believe the current network issues are temporary due to the current infrastructure changes and ongoing deploents of cgpt4 and the other Things, so by waiting a couple of days this might resolve itself :slight_smile:

Well, thank you very much for answering my doubts. I asked the question through the website, but sometimes even if there is no problem with the network, the display will be incomplete during the code writing. I tried to use continue or go on but got The snippets of the code are always missing some key information, which makes me so sad :worried:

After upgrading to Pro, and enabling GPT-4, this was no longer an issue for me.

This is due to the higher token limits on GPT4 - @xutianhaoisme maybe this also might help you too.

If you are switching to the playground enviroent or the API you can also increase the number of tokens for the response - this might help you to mitigate the issue generally.