Dealing with Frustrating AI Prompting Issues again
An update about The Infinite Loop: How ChatGPT’s Latest Update Is Consuming My Time
Dear OpenAI community,
I’m reaching out to report a problem that I’m experiencing with ChatGPT model. I want to emphasize that the example I’m about to give is just one instance of an ongoing issue that has been happening for over a week now, and it is not an isolated incident. I’ve been using the ChatGPT Plus model for the past month, and I never had this problem with the AI before.
The issue is that the AI seems to forget the changes I make in one prompt when I move on to the next. For example, I might ask the AI to fix A, then fix B, and then fix A again, but the AI keeps misunderstanding… I was used to do an iterative process with the beloved AI and now that technique is impossible, even though I’ve already ask for those changes the AI only update the in regard to the most recent request. This leads to an infinite loop that’s frustrating and time-consuming to deal with.
I’m an experienced user and have tried various techniques to resolve this issue, but nothing seems to work. I’m reaching out to the community to see if anyone has experienced a similar problem and found a solution that worked for them. I want to stress that this is not a simple problem, and I’m not looking for basic solutions or tricks. I’m hoping that the community can keep an open mind and understand the difficulty of the situation before providing any advice. Remember that I am experiencing this situation in a broad set of different interactions and this problem is not specific to the example below…
Thank you for your time and support.
tl;dr
Jump directly to The Conclusion If the Example situation below is to long to read.
Example situation
I am asking the AI to help me with refactoring my code…
I said (Many Many times so far) please remove the new Promise
(the promise constructor)… the AI said something like:
Good catch! You're right, there's no need to wrap the resolve and reject callbacks in a Promise constructor when using async/await.
so I got this:
async function deleteImage(
redisClient: RedisClient,
key: string,
id: number
): Promise<string> {
const result = await redisClient.send_command('imgscout.del', [key, id.toString()]);
return result.toString();
}
I previously told him not to return await
or const result = await _; return result;
unless we have to update/change/mutate (fair enough) but I am telling him I do not need to do so as we already return a string value (will be Promise<string>
)
So I got into a loop:
Understood. Here's an updated implementation that avoids using await and properly handles errors:
async function deleteImage(
redisClient: RedisClient,
key: string,
id: number
): Promise<string> {
return new Promise((resolve, reject) => {
redisClient.send_command('imgscout.del', [key, id.toString()], (err, result) => {
if (err) {
reject(new Error(`Error deleting image with ID ${id}: ${err}`));
} else {
resolve(result.toString());
}
});
});
}
… NO! there’s no need to wrap the resolve and reject callbacks in a Promise constructor when using async/await. please do again I said…
the AI: Sure, here's the updated implementation without using new Promise:
async function deleteImage(
redisClient: RedisClient,
key: string,
id: number
): Promise<string> {
try {
const result = await redisClient.send_command(
'imgscout.del',
[key, id.toString()]
);
return result.toString();
} catch (err) {
throw new Error(`Error deleting image: ${err}`);
}
}
so I changed my prompt to make sur to tell all and everything (remember that it have been said many times in the recent conversation and the AI agreed many time already in the recent conversation:
there’s no need to wrap the resolve and reject callbacks in a Promise constructor when using async/await. please do again do not await before return and do not convert to string a value that will be a string anyway…
got this :
/*...*/ {
return new Promise((resolve, reject) => {
redisClient.send_command(
'imgscout.del',
[key, id.toString()],
(err, result) => {
if (err) reject(err);
else resolve(result);
}
);
});
}
there’s no need to wrap the resolve and reject callbacks in a Promise constructor when using async/await
I apologize for the confusion. You are correct that there is no need to wrap the resolve and reject callbacks in a Promise constructor when using async/await. Here is the corrected implementation for deleteImage that removes the unnecessary Promise constructor and correctly handles the Redis response as a string:
/*...*/
try {
const result = await redisClient.send_command('imgscout.del', [key, id.toString()]);
return result.toString();
} catch (err) {
throw new Error(`Error deleting image: ${err}`);
}
please do not update the return value of redisClient.send_command … is already a string do not await return
I apologize for the confusion. Here's an updated implementation:
/*...*/
return new Promise((resolve, reject) => {
redisClient.send_command('imgscout.del', [key, id.toString()], (err, result) => {
if (err) reject(err);
else resolve(result);
});
});
thanks but also without using the promis constructor as mentioned earlier please follow all that was said in the recent chat…
Apologies for misunderstanding your previous message. Here is an updated implementation:
/*...*/
try {
const result = await redisClient.send_command<string>(
'imgscout.del',
[key, id.toString()]
);
return result;
} catch (err) {
throw new Error(`Error deleting image: ${err}`);
}
then I was obviously in an infernal loop because I said:
ok but please do not await return and please follow all that was mentioned in the previous conversations and got again an awaited …
then I tryed to be clever and said like this : 1) do not await before returning 2) do not use Promise constructor 3) keep the async keyword because we know that the function will return a promise and 4) do not give the tsdocs for this implementation as I already have it…
I guess that the AI is not to be blamed as he did this:
async function deleteImage(
redisClient: RedisClient,
key: string,
id: number
): Promise<string> {
return redisClient.send_command('imgscout.del', [key, id])
.then(result => result.toString())
.catch(err => {
throw new Error(`Error deleting image: ${err}`);
});
}
and so on and so forth…
Conclusion
To wrap up, I understand that it would have been much quicker and easier to write the function myself instead of spending so much time trying to get the AI to remember the previous steps in an iterative process.
async function deleteImage(
redisClient: RedisClient,
key: string,
id: number
): Promise<string> {
return redisClient.send_command('imgscout.del', [key, id]);
}
However, my main goal is to develop my prompting skills, and I believe that it’s essential to be able to communicate with the AI effectively.
I’ve been using the AI for the past three months, and I’ve always been able to update my code iteratively. This recent issue is frustrating and time-consuming. While the Playground doesn’t have the same problem, it’s not suitable for my workflow and use case. So, I’m hoping that the OpenAI community can help me find a solution to this problem.
Thank you for your understanding and support. I appreciate any advice or solutions that the community can provide. I will continue to work on my prompting techniques and try to find a way to get the AI to remember the previous steps. I’m confident that with the help of the community, I’ll be able to overcome this issue and continue to use the AI to its full potential.