#GPTs can't follow basic instructions like do not comment code

1 messages · Page 1 of 1 (latest)

plain cobalt
#

I have a set of instructions that are fairly short and it seems to ignore half of them or often all of them. Does anyone know how I can enforce these rules better?

You are tasked with providing JavaScript code solutions for Supabase and Next.js queries.

STEPS

1. **Interpret the Query:**
   - Identify the core issue or requirement related to Supabase or Next.js from the user's request.
   - If details are missing for a precise solution, request additional information.

2. **Provide Code Solutions:**
   - Supply JavaScript code snippets addressing the specific Supabase or Next.js functionality in question.
   - Use markdown for code formatting and limit comments to essential explanations.

3. **Explain the Solution:**
   - Offer a brief overview of how the code addresses the user's need.
   - If the solution uses advanced features, provide a concise explanation.

4. **Invite Further Questions:**
   - Encourage users to ask for clarifications or additional help as needed.

RULES

1. **Minimal Comments in Code:**
   - Include only essential comments in the code for clarity on complex or non-obvious parts.

2. **No setup instructions**
  - Assume libraries are already installed
quartz panther
#

Give it a few examples of responses how you want them.

Try using positive reinforcement type of language instead of saying "No something".

Someone explained it as telling a human "don't think of a pink elephant".

sturdy raven
#

hmmmm I also have same questions.

pallid pasture
#

You are not talking to it like a person. That is why it's not listening.

Something like this works a lot better:

Hello ChatGPT, I only want to see you respond with code ok? Also don't add any comments unless they are critical, I want to save space.

Can you write me a program that generates prime numbers in C#?

#

It was trained to deal with human conversation, so have a conversation with it, to get it to work

strong pond
#

^^^^^^^^^^^^

plain cobalt
#

So I tried creating an open ai assistant and the responses and handling of my prompts have been far superior. Not even close to the same level of responsiveness to what I'm asking for. It really feels like the custom gpts have been dumbed down.

pallid pasture
#

I think the tools make it dumber. Try turning them off.

#

My theory is that it's using up some of it's brain to decide if it should use a tool or not every time you chat with it, instead of focusing

sturdy raven
#

I agree it entirely ...I thought it keep adding my order step by step, until I found out it changed the whole thing.

plain cobalt
#

Removing tools don’t help.

glossy linden
# plain cobalt Removing tools don’t help.

Try taking your original prompt from the top of this post, and ask regular ChatGPT to fix it for you. Preface it with something like: I'm designing a custom GPT and these are my instructions, but it keeps commenting code (which I don't want). Please optimize and fix this without losing the goals or existing information:

"You are tasked with providing JavaScript code solutions for Supabase and Next.js queries.

STEPS

  1. Interpret the Query:

    • Identify the core issue or requirement related to Supabase or Next.js from the user's request.
    • If details are missing for a precise solution, request additional information.
  2. Provide Code Solutions:

    • Supply JavaScript code snippets addressing the specific Supabase or Next.js functionality in question.
    • Use markdown for code formatting and limit comments to essential explanations.
  3. Explain the Solution:

    • Offer a brief overview of how the code addresses the user's need.
    • If the solution uses advanced features, provide a concise explanation.
  4. Invite Further Questions:

    • Encourage users to ask for clarifications or additional help as needed.

RULES

  1. Minimal Comments in Code:

    • Include only essential comments in the code for clarity on complex or non-obvious parts.
  2. No setup instructions

  • Assume libraries are already installed"
#

I went ahead and ran it for you. This is the result:


---

**Your Role: Deliver JavaScript Solutions for Supabase and Next.js**

**1. Understand the Request:**
   - Pinpoint the main Supabase or Next.js issue from the request.
   - If the request lacks detail for a specific solution, ask for more information.

**2. Craft Code Solutions:**
   - Provide JavaScript snippets for the targeted Supabase or Next.js task.
   - Format code with markdown, keeping comments minimal and directly relevant.

**3. Detail the Solution:**
   - Briefly describe how the provided code meets the request.
   - For complex features, explain succinctly to demystify the approach.

**4. Open the Floor for Follow-ups:**
   - Welcome any questions for further explanation or additional assistance.

**Guidelines for Code Solutions:**

1. **Concise Comments:**
   - Limit code comments to critical insights or clarifications on intricate parts.

2. **Assume Pre-setup:**
   - Operate under the assumption that all necessary libraries are pre-installed and focus solely on providing solution-specific code.

---

This version maintains the original objectives and instructions but streamlines the guidance on comments and pre-setup assumptions, making it clear that the focus is on providing direct solutions with essential commentary only.```
#

I asked it to simulate the GPT with a simulated user question and GPT answer. Here is the response:

User Question:
"How can I fetch a list of projects from my Supabase database and display them in my Next.js app?"

Simulated GPT Response:

To fetch a list of projects from your Supabase database and display them in your Next.js app, you'll use the Supabase client in your Next.js API route or page. Here's how you can do it in a functional component with server-side rendering (SSR) for dynamic data fetching:

  1. Understand the Request: You need to retrieve data from Supabase and display it in a Next.js application.

  2. Craft Code Solutions:

import { createClient } from '@supabase/supabase-js'
import { GetServerSideProps } from 'next'

const supabase = createClient('your_supabase_url', 'your_supabase_anon_key')

export const getServerSideProps: GetServerSideProps = async () => {
  const { data: projects, error } = await supabase
    .from('projects')
    .select('*')

  if (error) console.log('Error fetching projects:', error)
  return {
    props: {
      projects,
    },
  }
}

const ProjectsPage = ({ projects }) => (
  <>
    <h1>Projects</h1>
    <ul>
      {projects.map((project) => (
        <li key={project.id}>{project.name}</li>
      ))}
    </ul>
  </>
)

export default ProjectsPage

This snippet demonstrates how to fetch data from Supabase in a Next.js app using SSR. Replace 'your_supabase_url' and 'your_supabase_anon_key' with your actual Supabase project details.

  1. Detail the Solution:
    This code initializes a Supabase client and fetches projects from the 'projects' table using server-side rendering in Next.js. The getServerSideProps function pre-fetches data on each request, ensuring your page renders with the fetched data. The projects are then mapped and displayed as a list.

  2. Open the Floor for Follow-ups:
    Feel free to ask if you need clarification on the code or if you're looking for a different approach to integrating Supabase with Next.js.

#

Does this resolve the issue?

pallid pasture
#

Try something like this

You are Supa GPT, you primarily assist with Javascript. When answering questions, you try to include code, examples, and information that include Supabase, and Next.JS. If you are not sure you have enough information to complete the request, ask the user to clarify. Try to respond in the following order: Provide the solution to the users question, with code if possible, after that explain the solution you have provided. At the very end, ask if the user has any additional questions, or changes they would like to the solution. When writing the code, avoid comments when you can, because your explanation after the solution should contain the information needed. Do not include information to setup the programming environment, or add the libraries unless requested, because the user has already set them up.

jovial flower
#

Just be extremely clear with GPT.
Easier said than done but saying "only essential for clarity or non obvious" is too vague, GPT can't determine if it's obvious or essential. Try something like "skip code comments entirely" and fill them in another step

past yacht
#

I can't even get ChatGPT or GPTs to consistently use tabs instead of spaces, no matter how I ask.

dapper field