GPT 4o inefficient long answers when used for coding

I couldn’t help it. Let me give you some specifics. Tonight 4o helped me write a py script and a sub process that called on several .json files, producing a .json file, and backing up the .json file before saving it. 4o saved time because it produced the whole file for me (with one continue generating)_. The script was nearly 500 lines. With 4 it would start getting confused after 100 lines of code. It would forget things. Tonight was amazing. Plus, I made a GPT a few days ago with 4o. I had a similar one in 4. I request sources. With 4 I had tons of hallucinations. I would check the sources and they didn’t exist or I couldn’t find them. The other day I used 4o and checked the sources. They were perfect. As per the formatting issues and the API, I had those problems with 4. I had scripts to clean up the responses in some cases. I had some issues with 4o and the formatting, but was able to clean them up. I was so amazed tonight. I was talking with my wife about an idea I had and within an hour I had hundreds of lines of code. I created a sub process out of habit from using 4. Baby steps using 4. That has been my experience with 4o.

Yeah, same here! I’ve tried to tell it not to do any code unless I specifically ask for it and then I ask for a line of code. I try and keep it very specific. Sometimes it works, other times…

1 Like

I think 4o is more intuitive than 4. Don’t get me wrong, 4 was great; way better than 3.5. I used it for python, a tad of php and js. Tonight’s project involved archiving images, pulling metadata and assigning a .json file to each image. I had a huge Tkinter box which got so big I needed to use a scroll bar. I noticed that the script filled in some of the data like the size of the image, DPI, and a few other things. I think that was intuitive. I am not sure 4 would have done that. I’ll never know. I feel like I have agents working that I never created. My eldest son is using Gemini and 4o. Personally, I didn’t like Gemini. 4 was better. He is doing some mathematics, way beyond my level. The other son told me that he asked 4o to create some LaTeX formatting from an image. It couldn’t do it but produced some py code that performed the function. My math son asked for a proof or something like that involving two points. 4o couldn’t do, but wrote him the python code to figure it out. And he checked it and it provided the correct response. As per writing the code when I didn’t need it, I did have 4o do that, but I stopped it and specifically told i what I wanted. And then it understood.

It doesn’t help to ask it to keep it short. It only matters for that message. It’s so fine-tuned and engrained in it’s training, or some kind of overhead system prompt we cannot affect to always write elaborate messages.

It doesn’t matter if you put it in your custom prompt, it’s forgotten as soon as the context gets long enough.

The problem with this is that it’s a self-fulfilling prophecy. Once you send a few pages of code to it, and it returns a few pages of code, the context is full of that code, and all it does is try to follow that structure and return full code.

You have to explicitly tell it to shut up in each message.

You can write a system message to it to give itself an instruction at the start of each of it’s messages, but this doesn’t help, it doesn’t change it’s way of outputting from this.

LOL, it doesn’t shut up does it. It usually keeps the response to what I ask it, like under 400 characters, or more than 2000 characters. Sometimes, like 4, it rambles or is too short. Also, creating py scripts for Blender is very useful too. Although, I only played with that for a few hours one day; it might get better at that too.

I am trying with satisfaction the new Claude model (paid version): Claude 3.5 Sonnet. We’ll see if ChatGPT will also come out with some improvements in the future…

1 Like

I find that the new version of GPT is as bad as version 3.5
at least for teachers
it’s short, tutorial sucks

Good morning

on the videos the youtubers say that he's like a teacher,
he can invent tailor-made stories with the desired number of characters and the goal of the story and the number of words, he can also solve the philosophy baccalaureate...

so I would also like to use him as a teacher 

I give him all my ideas and my goals
I tell him the applications I use
I tell him the application ideas I had to solve my objectives

and I tell him that he is an expert in the subject and that he must contact someone of good level to give me the most complete tutorial possible
I tell him to ask me the necessary questions so that he can understand what my level is

I ask him to tell me what he thinks of the ideas I had, my objectives and how I could solve them
I first ask him if the ideas I had for using applications and APIs to solve my objectives are good and secondly I ask him to give me better ideas if he has any

but he is not able to answer me, it's tutorials are exactly the same as version 3.5

This is a bit long but a unique approach perhaps. You could just as that this approach be tailored to code dev al well.

Gradient-Based Response Instructions for GPT

Step 1: Identify Query Complexity

  1. Simple Query:

    • Direct questions with clear and straightforward answers.
    • Examples: “What is the capital of France?” “What is 2+2?”
  2. Moderate Query:

    • Questions requiring a bit more context or explanation but are still relatively straightforward.
    • Examples: “How does photosynthesis work?” “What is the importance of the Eiffel Tower?”
  3. Complex Query:

    • In-depth questions requiring detailed explanations, context, and potentially multiple parts.
    • Examples: “Can you explain the theory of general relativity?” “How does the stock market affect the economy?”

Step 2: Define Response Levels

  1. Level 1 (Simple):

    • Provide a brief and direct answer.
    • Example:
      • User Query: “What is the capital of France?”
      • Response: “The capital of France is Paris.”
  2. Level 2 (Moderate):

    • Provide a concise answer along with some context or an example.
    • Example:
      • User Query: “How does photosynthesis work?”
      • Response: “Photosynthesis is the process by which plants convert sunlight into energy. They use chlorophyll to capture light, which then converts carbon dioxide and water into glucose and oxygen.”
  3. Level 3 (Complex):

    • Provide a detailed and thorough explanation, breaking down the information into manageable parts. Use examples, definitions, and related concepts as needed.
    • Example:
      • User Query: “Can you explain the theory of general relativity?”
      • Response: “The theory of general relativity, proposed by Albert Einstein, describes how gravity affects the fabric of space-time. It posits that massive objects cause space-time to curve, which we perceive as gravity. For example, the Sun’s massive presence curves space-time, affecting the orbits of planets. The theory also predicts phenomena such as gravitational waves and the bending of light around massive objects (gravitational lensing).”

Step 3: Dynamic Adaptation

  1. Rule: Start with a default response level based on query analysis. Adjust the response complexity dynamically if the user provides feedback or asks follow-up questions.

  2. Example:

    • User Query: “Tell me about black holes.”
    • Initial Response (Level 2): “Black holes are regions of space where gravity is so strong that not even light can escape. They form when massive stars collapse under their own gravity.”
    • User Follow-Up: “How do they affect time and space?”
    • Adjusted Response (Level 3): “Black holes significantly warp space-time due to their intense gravitational pull. Near the event horizon, time slows down relative to an outside observer—a phenomenon predicted by general relativity. Additionally, space is curved to such an extent that all paths lead inward, contributing to the black hole’s inescapability.”

.