33 points · by paulpauper · 3y ago · 51 comments
I just did a little test involving a question about the Link component in Nextjs, and phind is aware of the major API change nextjs recently made to that component, whereas of course chatgpt/gpt-4 isn't, due to the training data cutoff.
It literally just copy-pasted me code from the top result blog it found on the sidebar - and it didn't solve my question in the least.
GPT-4 on the other hand was correct on the first try.
The question was about controlling Home Assistant remotely with Python. Phind's solution included RedisMQ just because the blogger had set up one as their home automation main bus. [0]
GPT-4 just gave me the code how to use the official homeassistant python package to control entities.
The correct code is literally 3 lines:
from homeassistant.remote import API
api = API('http://localhost:8123', '<api_token>')
api.services('light', 'turn_on', {'entity_id': 'light.kitchen'})
[0] https://www.phind.com/search?q=how+can+I+control+lights+on+h...I feel dirty having clicked the link, some how it's worse than the "that paragraph you just read was written by AI!" trope.
For those who didn't click it's just 3 awful samples that no one would ever use ChatGPT for and a note that the current unguaranteed access for plus subscribers is 25 queries/3 hours.
I'm not being hyperbolic GPT-4 would produce a better article although the limiting factor is a lack of creative premise for the article. And that'd be needed either way it reassures me to think that AI won't (yet) replace good writers. Just the lazy ones.
Also, in first sentence, we can have a glimpse of writer's life: "When I logged into OpenAI’s website on Monday morning to continue testing...". I wonder if it rained.
I dislike this (very popular) way of writing, didn't make it past the first sentence.
GPT-4 is definitely better at some tasks and moderately less prone to hallucination, but it botched the first couple scripting tasks I gave it, so it didn't exactly wow me. The main difference I've observed is that it gives wordier responses than GPT-3.5.
That said, I might have a different opinion if usage of GPT-4 weren't so severely rate-limited. Currently, you can only send 25 requests every 3 hours, so it's hard to experiment with it as freely as I want.
12 attempts and it still couldn't connect. After 6 attempts (of me pasting back compilation errors) it compiled, but didn't run. The last 6 attempts were me trying to get Rust to ignore TLS errors so it could connect. I gave up after that.
I had a set of ancient (10+ year old) shell scripts and Python controlling Deluge. I wanted to move to Transmission and still retain the same functionality.
Except for using an API from 2021, the code it gave me was 100% correct and properly named and even commented. I had to spend 5 minutes correcting the import and changing a few named variables (user -> username type stuff) and it just worked.
However, you need access to the GPT-4 API which you have to request separately. So even if you have GPT-4 with chatGPT Plus you might not have access to GPT-4 through the playground/API.
Although if they did that then I'd probably hit the 25 request limit a lot more.
You pay per token, and they're way more expensive with GPT-4. Coincidence?
[edit] I will add that even though the article is barely more than a few (rather oddly chosen, IMO) prompts, it is useful for folks to be able to see 3.5/4 side by side.
But people are dumb. Wait 15 years or something and the question will be something like, "Should you pay $100 per month for a 1000 IQ exocortex that is fully integrated with on-demand AI experts in every field and seamlessly inserts useful thoughts and abilities into your daily life?"
I rather keep my exocortex on the outside before getting subtle advertisements as thoughts and genuinely believing they are my own desires.
At the very least, you owe it to your basic curiosity if not your career.
A massive productivity boost at the very least.
I hadn’t heard this part, can you expand?
I wanted to create a pretty complex form with autofill. It suggested react select, helped me customize the styling and deploy it within minutes. Normally, I would have taken an hour just to go through the documentation and the somewhat complicated styling.
I have a larger personal project using GPT-4 API, LangChain, and LlamaIndex that I am currently obsessed with.
Arguably, ChatGPT Plus service fee helps them create a large pool of developers and early adopters which can be used as robust sounding board better than free service users can or will.
Getting a paid account allows you to create an API key and use it with things like codegpt in vs code and intellij and other places. There's a gpt for docs and slides as well. And you can of course build your own tooling. And you can configure all of these to use gpt-4.
So, definitely worth it to me.
Codegpt is pretty nice. You can get it to review code, suggest improvements/optimizations, spot potential bugs, etc. And it can write code, generate tests for existing code, etc.
The hardest part of using gpt is 1) remembering to use it, and 2) coming up with good questions to ask of it. The better your questions, the more useful it gets. I've caught myself using Google a couple of times to figure stuff out before realizing "I could just ask chat gpt ....". Mostly, that works spectacularly well. You can save yourself a lot of time this way.
I've done some fun stuff with it:
- I needed German translations for a mozilla fluent localization file. It understands the format and generated hundreds of translations for me in a few minutes. And so far, I've not found anything that is wrong.
- I needed a bit of kotlin code to encrypt plain text using AES. It generated working code for me. I asked it about improvements and it suggested using an IV and then added the code for that. I asked it to generate a test, and it did. And it passed. Having done similar code in the past in Java, all this looks perfectly legit to me.
- It's aware of geospatial relations (cities, countries, major landmarks) and you can ask it questions about that. And get it to answer in in geojson format. Or calculate surface areas. I'm not sure, I'm ready to trust all of it but at face value it seems to be doing reasonable things.
- I've worked on spicing up our sales pitch a bit. One of our customers started talking about kpis, so I selected some text from our white paper and asked chat gpt to suggest some kpis based on that and how that would benefit our customers context. Then for giggles I asked for fifty of them ... and it did. All of them were reasonable. A quarter of them were really good.
- We had a customer in the air carrier sector and we needed to understand their business challenges in a hurry. So we asked chat gpt to list key challenges and then grilled it a bit on things like cost breakdowns, and details about fuel cost, and other factors. Most of this stuff comes from public reports but basically we were asking it the same questions we would have asked our customer .. and getting really informative answers.
- I went to Rotterdam over easter, which is a city I had not visited properly. So, I asked it for some suggestions for stuff to do. And got lots of usable suggestions.
So, you can code with it, explore complicated topics with it, use it to sharpen pitches, outsource translation work to it, and ask it for directions, and get it to play tourist guide.
My bill for March was 0.90$. Amazing value. Absolute no brainer.