4 ms·
I was able to get gpt4 to do a lot of useful work. But for some reason it completely falls apart for this scenario. May be because it has to think in second ord
by allisdust 3y ago
I was able to get gpt4 to do a lot of useful work. But for some reason it completely falls apart for this scenario. May be because it has to think in second order to achieve the task. Perhaps you could take a crack at this:
Prerequisite (for you the human)> You have a file at src/SampleReactComponent.jsx that has below simple react component:
const SampleReactComponent = (props) => {
const [var1, setVar1] = React.useState(false);
const [var2, setVar2] = React.useState(false);
const [var3, setVar3] = React.useState(false);
return (<></>);
};
export default SampleReactComponent;
**********
Prompt for GPT4: I'm at my project root working on a reactjs project. Update the component in src/SampleReactComponent.jsx file by adding a new const variable after the existing variables. You cannot use cat command as the file is too big. You can use grep with necessary flags and sed to achieve the task. I'll provide you the output of each command that you generate.
*************
That's it. It would do any complex modification on fully provided data (included in the prompt) but something like above where it has to build a model from secondary prompts will totally fall apart.
- jiggawatts 3y agoDude. Dude. I’m an IT professional and I have no idea how to begin answering that request! Pose that question verbatim to a dozen random people[1] and I guarantee you that you’ll get zero answers. Also, I find it hilarious that sed and awk are so counterintuitive that not even the AIs can do useful things with them. The same AIs that speak Latin, and can explain quantum mechanics. [1] I mean specifically not random Silicon Valley coworkers. Go talk to random relatives and the barista at the cafe.
- allisdust 3y agoThat would mean nothing because GPT4 isn't most people. I had it solve more complex problems than this particular one and using the same tools :)
- mannykannot 3y agoInteresting! I, for one, would be most appreciative if we could see some of the similar and more difficult tasks that it succeeds on.
- allisdust 3y agoI have cleared my chat history recently so don't have all the prompts but here is a recent use case I used it for: Prompt: "Generate a react mui component that fetches a Seller's shipping credits and shows his current credit balance in the top portion. There should be a recharge button next to the credit balance. The bottom portion should show recent transactions. Use below api for fetching credit balance: <api req/resp>. Use below api for fetching the transactions: <api req/resp> Recharge should be done with the below api: <api req/resp> Make the component beautiful with good spacing, elevation etc. Use Grid/Card components." Final result: https://res.cloudinary.com/dksmi6x98/image/upload/v1685274094/seller_credits_yipnsc.png https://res.cloudinary.com/dksmi6x98/image/upload/v168527409...
- mannykannot 3y agoThank you for your reply. The impression I'm getting is that it is producing concrete solutions to specific problems, but not generic solutions to abstract problems - does that sound about right?
- allisdust 3y agoKind of I guess. If it is a single step: That is modify or generate text (could be code or anything) in a specific way, it works great even on obscure things. However if the problem is stated in a way that it has to think through derivative of it's solution: that is generate some code that generates some other code which behaves in a certain way, it fails miserably. I'm not sure why. The problem I stated in current thread which it failed on I have tried multiple prompts to make it understand the problem but unfortunately nothing worked. It's as if it can do first level but but not second level abstraction.
- 3y ago
- IanCal 3y agoGive it space to think. It's like talking to someone and taking their train of thought as the only output, the worst kind of whiteboard programming interview. You can get them to talk through the problem, build parts, test things, etc. Also, this is a horrible problem to solve with awkward tools. Why is your code file to large to cat???
- allisdust 3y agoMost code files are usually too large to 'cat' because of the context size limitations. Even if they fit within the context window, it's waste of API credits to provide it the information that it doesn't need. Anyways posting this here isn't to get this particular problem solved. It is to see if there is a prompt that can solve it. And this is the only problem I found it not able to solve. It's not like it doesn't know about sed/awk/grep or other Linux tools, it is an expert on most of the common options involving them. My guess is there is something going on with this prompt that just breaks it's 'though patterns' for the lack of a better word :)
- IanCal 3y ago> Most code files are usually too large to 'cat' because of the context size limitations These are command line tools though, not piping it into the llm. My point though was more about giving it space to reason. It's very important for good results on more complex tasks.
- allisdust 3y agoAah, in case it wasn't clear the use case I'm trying to solve is exactly that: piping shell commands to and fro so that LLM has a bit of autonomy. I know that things like LangChain, AutoGPT exist but frankly they are really poorly thought out and seem to have become kitchen sinks too fast without solving anything properly.
- williamcotton 3y agohttps://github.com/williamcotton/autorails-alpha/pull/38 https://github.com/williamcotton/autorails-alpha/pull/38
- ilaksh 3y agoI think the issue is that it's trained with the assumption that it has all of the data it needs to answer. It's definitely tricky to get it to follow a data collection step and then stop before trying to complete a task. But it is possible. I think that langchain and ChatGPT demonstrates a good way to do this.