Ask HN: How are you using GPT to be productive?
With GPT so hot in the news right now, and seeing lots of impressive demos, I'm curious to know, how are you actively using GPT to be productive in your daily workflow? And what tools are you using in tandem with GPT to make it more effective? Have you written your own tools, or do you use it in tandem with third party tools?
I'd be particularly interested to hear how you use GPT to write or correct code beyond Copilot or asking ChatGPT about code in chat format.
But I'm also interested in hearing about useful prompts that you use to increase your productivity.
751 comments
[ 2.9 ms ] story [ 466 ms ] threadIt’s great for bash one-liners with flags and OS-specific nuances.
Haven’t really been able to use it for really advanced things. But maybe someday.
I asked some for a moderately complicated tax situation and ChatGPT very authoritatively imagined a deduction that didn’t exist by combining two different but related parts of the tax code.
Do I always get stuff that I can apply? No, not really. But given that discoverability can be low for things like that, it's usually helpful at finding me things to, at the very least, look into.
- Asked it to improve a HN comment I wrote.
- Asked about an idiom I couldn't remember, by saying it in other words.
- Asked it to dumb down some things about options (finance) I didn't understand.
- Asked it if I could use the eBay API to list my purchase history (you can, and it knew how).
- Asked it to generate pretty standard Terms of Service for an app I'm working on.
- Asked it to generate a moderately complex Prisma (ORM) query that I described in natural language.
- Described what I wanted Nginx to do in natural language (e.g. "the index file will be served whenever no file is found") and asked it to output a configuration file.
- Asked it what the "XDG" in "XDG_CONFIG_HOME" stood for.
Also, occasionally ask it to generate shell commands using a CLI I wrote[0].
[0] https://github.com/clevercli/clevercli
I toyed around with it a while back, and it looked potentially awesome, but different enough that I was worried about using it on a work project in case it failed in some use case.
Im so sick of the SQL ORM situation in Typescript, but Prisma might have an answer.
Segmentation fault with NodeJS 18. Its about prisma having linked a different version of OpenSSL than NodeJS. A workaround is to use the "binary" engine, meaning you run another process, talk via IPC to that, and that then talks to the DB, which is ridiculously roundabout.
But this issue is finally worked on, so once that is fixed its good.
So you're using it generate a legally actionable document. Is this a good idea?
Until it isn't. Live and learn, as they say.
Employment or other contracts, health decisions, taxes ... that's how I roll.
That's just me, and I'm not you. It may also just be a hobby project or otherwise of negligible consequence. In which case it would seem to fall under the rubric of what generative AI is arguably suitable ("better than nothing").
You inspired me to try it for finding a book I can't quite remember the title of. Unfortunately no joy. Still, for the amusement of anyone who is interested, or anyone who might be able to help me with this book:
---
Mindcrime: What was that horror novel from way back when, about the time traveling demon hound?
ChatGPT: It's possible that you're thinking of the horror novel "The Hound" by H.P. Lovecraft, which was first published in 1924.
In the story, two grave robbers become obsessed with obtaining a certain artifact from a tomb in Holland. After obtaining the artifact, a small bronze statuette of a hound, they begin to experience strange and terrifying visions. The hound appears to come to life and stalks them through their nightmares.
Later, one of the grave robbers travels to Egypt and discovers that the artifact was made by a sinister and ancient cult, and that the hound is actually a demon summoned from another dimension. The hound then follows the man back to his home in England, where it continues to torment him until he meets a gruesome fate.
It's worth noting that there have been many horror novels and stories featuring time-traveling demon hounds over the years, so if "The Hound" isn't the specific book you're thinking of, there may be another that matches your description.
Mindcrime: No, it was more recent than that. I think from sometime between the late 1980's to mid 1990's. I think the word "hound" might have been in the title.
ChatGPT: Thank you for the additional information! The book you may be thinking of is "The Hound of the Baskervilles" by Arthur Conan Doyle. Although it's not a horror novel, it's a detective story featuring the famous detective Sherlock Holmes and his companion Dr. John Watson investigating a supernatural curse and a demonic hound that is terrorizing the Baskerville family on their estate in Dartmoor.
"The Hound of the Baskervilles" was first published in 1902, but it has been adapted and retold in various forms over the years. There may be a horror novel that is a retelling or adaptation of the original story that you're thinking of, but without more specific details, it's hard to say for sure.
Mindcrime: No, it's much more contemporary than that.
ChatGPT: I apologize for the confusion. Let me try to narrow it down further. Do you remember any other details about the book? For example, do you remember the author's name or any other specific plot points or characters?
Mindcrime: There was some stuff about an airport or airplane near the end.
ChatGPT: Thank you for the additional detail! The book you might be thinking of could be "Watchers" by Dean Koontz.
"Watchers" is a horror novel that was published in 1987. The story follows Travis Cornell, a man who is hiking in the mountains when he stumbles upon a genetically engineered creature known as "The Outsider." The Outsider is a highly intelligent dog with extraordinary abilities that has escaped from a government laboratory.
Cornell takes the dog under his wing, but soon discovers that a ruthless government agent is after the dog and will stop at nothing to retrieve it. The novel reaches its climax at a local airport, where a final showdown takes place between the agent and the dog.
While "Watchers" does not feature a time-traveling demon hound, it does involve a genetically engineered dog that could possibly fit your description.
Mindcrime: No, it wasn't by Dean Koontz. And time travel was definitely a plot element.
ChatGPT: Thank you for letting me know. I apologize for not being able to find the book you are thinking of. Without more specific details, it's difficult to narrow down the possibilities. If you remember any other details about the book, please don't hesitate to let me know and I'll do my best to help you identify it.
Search engines with SEO are so reliant on keywords that it often feels like I'm suggesting answers rather than asking questions - it's so refreshing to be able to just ask again.
Google used to be good at that task, but it's sucked for the last four years or so. Whenever they gave up on search and leaned into sludge content plus ads.
ChatGPT is better than Google ever was anyway.
And much worse than Google for, "site:miguelgrinberg.com nested comments"
Unfortunately I don't know the equivalent of Miguel for everything I need to know, so on average I suppose GPT is better. However it also means that you may never discover the Miguel of your domain!
Like if you dont know it is called sharding but you know you wanna store stuff on several databases.
Me: I have a postgresql database but it has too much data in it. I wanna split the data in several databases. What is that called?
GTP: Splitting a database into multiple smaller databases is known as database sharding. Sharding is a technique used to horizontally partition large databases across multiple servers or instances in order to distribute the workload and improve performance. Each shard is typically hosted on a separate physical or virtual machine and stores a subset of the total data, allowing for more efficient queries and faster data retrieval.
Then i know what to google for
Later, when they released their API, I developed a CLI tool for this purpose (https://github.com/pncnmnp/grammatical). Note that it is not flawless, but it works well. It has improved my writing productivity, both for blogging and emails.
To be honest, my work style can be a bit lazy at times, and this may reflect in my approach. My tool simply copies any changes directly to the clipboard. I then replace them with the original text and make adjustments on the same page. However, for more complex workflows, your approach is awesome. It could potentially transform the process into something similar to Grammarly.
Edit: Have you noticed any differences in terms of quality between GPT-4 and Turbo3.5 for this particular task?
> Overreliance occurs when users excessively trust and depend on the model, potentially leading to unnoticed mistakes and inadequate oversight.
> At the model-level we’ve also made changes to address the risks of both overreliance and underreliance. Weve found that GPT-4 exhibits enhanced steerability which allows it to better infer users intentions without extensive prompt tuning.
> To tackle overreliance, we’ve refined the model’s refusal behavior, making it more stringent in rejecting requests that go against our content policy, while being more open to requests it can safely fulfill. One objective here is to discourage users from disregarding the model’s refusals.
> However, it’s worth noting that GPT-4 still displays a tendency to hedge in its responses.
However, it appears that the self-hosting option only gives access to the basic version (https://news.ycombinator.com/item?id=32238705), which is still impressive, but the premium version supposedly has better grammar and style features.
Honestly, ChatGPT's $0.002 per 1k tokens is quite tempting for me. Even after hundreds of queries, my monthly usage is less than 50 cents.
For programming, all sorts of things. I use it all the time for programming languages that I'm not fluent in, like AppleScript or bash/zsh/jq. One recent example: https://til.simonwillison.net/gpt3/chatgpt-applescript
I use it as a rapid prototyping tool. I got it to build me a textarea I could paste TSV values into to preview that data as a table recently, one prompt produced exactly the prototype I wanted: https://github.com/simonw/datasette-paste-table/issues/1
I use it for brainstorming. "Give me 40 ideas for Datasette plugins involving AI" - asking for 40 ideas means that even if the first ten are generic and obvious there will be some interesting ones further down the list.
I used it to generate an OpenAPI schema when I wrote my first ChatGPT plugin, see prompt in https://simonwillison.net/2023/Mar/24/datasette-chatgpt-plug...
It's fantastic for explaining code that I don't understand: just paste it in and it will break down what it's doing, then I can ask follow up questions about specific syntax to get further deeper explanations.
Similar to that, I use it for jargon all the time. I'll even paste in a tweet and say "what did this mean by X?" and it will tell me. It's great for decoding abstracts from academic papers.
It's good for discovering command line tools - it taught me about the macOS "sips" tool a few weeks ago: https://til.simonwillison.net/macos/sips
In the past, I'd have used forums to find examples. There were still some forum posts about wxWidgets on Google, but I got the impression they were hiding most. Either way, GPT had them on demand.
Here's an example capturing a session from earlier this week:
https://twitter.com/JoshCMandel/status/1638723030154203138
For public APIs, I ask to make sure its aware of the api. Then I ask for endpoints. I find the endpoint I want. Then I ask it to code a request to the endpoint in language X (Ruby, Python, Elixir). It then gives me a starting point to jump off from.
Thirty seconds of prompt writing saves me about 20 minutes of getting setup. Yes, I have to edit it but generally it is pretty close.
1) Use Chat GPT in GPT-4 mode. I have found GPT-3 doesn't work in the same way.
2) I ask "What APIs does EasyPost have?"
It will respond with 7+ API endpoints
3) I ask "Can you write code in Ruby for the rates API?"
It responds almost perfectly with workable code from my experience in Ruby.
4) Then I ask "Can you give me that in Elixir?"
It responds with something I think is about 90% right. I am not as familiar with it but it seems close.
I am not trying to replace myself... I am just trying to make my job easier. And this seems to do it.
ChatGPT hallucinates SVG path attributes. Ask it to make an svg of a unicorn - it will give you markup that looks okay, but if you look at the values of the paths, it's clearly gibberish.
(SVG is a particularly interesting case because it's XML on the outside, but several attributes are highly structured, esp g.transform and path.d. Path.d is basically the string of a Logo-like programming language. I was specifically looking at these attributes for realism, and didn't find it.)
I don't know whether that is because that is a common way of doing things or whether a previous prompt responded with a bearer token... But it wasn't right.
For me, it's a leaping off point that often saves time if I ask the right question. To your point, you have to be quick to know enough about the API to deduce whether you and Chat GPT are in the same universe.
This is the sort of thing that will force a lot of legal teams to shutdown access to GPT-4 api/gui from internal networks.
Ppl never think of unintended consequences.
Ask it a prompt fine but don't provide internal information as an input.
That said,I think it will be interesting as Microsoft introduces this into Office 365. You bring up a great point. Most people will not realize they are sending potentially confidential information to Microsoft.
Perhaps it's no different than Grammarly... But I think you are right that legal departments are going to be all over this.
If they put it in Office and guarantee siloing information the legal departments will just have a regular contract to review and approve.
https://help.openai.com/en/articles/5722486-how-your-data-is...
I built a free ChatGPT chrome extension that integrates with Gmail for better UX: https://chatgptwriter.ai (300k users so far)
Since it went to the trouble of writing code for the API as well, I contacted the API developers to follow up about the topic. The code given was kind of a hand-wave anyway so I'd need to polish it up.
The developers were surprised to hear they had an API. In truth, there was no such thing.
I then found myself in one of those awkward "welp, guess I can keep my job" conversations...good for them, but for me: Go home, no API here. A disappointment with some meta-commentary sprinkled on top.
It got the format etc right but the actual content was completely hallucinated.
Being able to have a quick back and forth can keep me on track and productive instead of falling down a rabbit hole of research. An example might be this discussion with Bing from earlier today
https://docs.google.com/document/d/1jCZICl8wrsk8b5OTM9xpFbL5...
Sometimes I ask it to make music: https://github.com/carbocation/jinglebells
GPT-4 has been great at breaking down complex regexes that I am too lazy to parse out in the moment.
I’m also finding it helpful as a creative partner on naming things. Something I feel like I spend a lot of time noodling on. Like: creative names for a data warehouse that are surfing related (BoardRoomData lol).
> We’ve also been using GPT-4 internally, with great impact on functions like support, sales, content moderation, and programming. We also are using it to assist humans in evaluating AI outputs, starting the second phase in our alignment strategy.
Source: https://openai.com/research/gpt-4
Basically I created a small app to streamline the workflow. https://henshu.ai
We are building a GPT integration as well that helps users analyze reviews. Check out our demo https://show.nnext.ai/
Sometimes I use it to help me come up with names for projects/classes, sometimes I use it for debugging help (X doesn't work, why not?)
I think I could get a lot more out of it if I was more creative. It's an incredibly valuable tool already (on a similar level as intellij for me)
- Non-technical explanations. Useful for the pointy-haired boss. And his boss as well.
- Stack Overflow (but on steroids).
- Summarizing long-form articles my friends send me.
- Generating rudimentary programs/scripts I'm too lazy to write on my own.
- Tutorial-style resources for unfamiliar technology (like writing CRDs in k8s).
- Generated a working Makefile.
- Sometimes, I'll take existing small programs in Go and have them rewritten in another language. It's just fucking cool to watch.
- Rudimentary translations from English to French.
Can't use CoPilot for work yet since, well, they can (and will) upload proprietary IP. But for everything else in life, the productivity gain has been enormous.
As a "domain specific words" generator for building up a glossary, it can't be beat. From a prompt perspective I have to tell it that we are both world class neuroscientists but it knows more about this specific question than i do. Then I tell it to reply using correct jargon for the domain like that written in a textbook
Since then I've asked some about general knowledge, history, religion, geography, politics, other topics of interest. Mostly in English, but some in Portuguese and a little in Spanish. It's extremely good in all three languages.
Mostly though I've been asking about random work topics that come up every day. We use a lot of lots of systems, tools at work, and I need to write software to handle diverse areas. ChatGPT cuts right to what I need as far as: (a) general knowledge of tools and what their purpose is; (b) surveys of categories of tools, comparisons between competing offerings; (c) specifics on how to use, configure, program against various tools, query data, change things; (d) questions on best practices and pitfalls. This is mostly in context of macOS, Linux, AWS, kubernetes, observability tools, and APIs for lots of DevOps-related systems. I do lots of coding in Python, I also do a lot of ad-hoc diagnosis of situations. (We have a great DevOps team that manages infrastructure with standard DevOps tools -- my job is to build what those tools don't address so well, and also to help build out future data-engineering efforts.)
I'd say my use of Google search to find relevant articles / pages has gone down 70%. One small example today, I wanted to use `jq` to process some `docker ... --format json` output to pull out some data. I don't want to learn the ins and outs of `jq`, I described my problem and it gave me a good template I could adapt.
Any time now in scrum or other meetings, if there's any question about something, we often just consult ChatGPT during our Zoom/screen-share sessions. I think generally I have a better sense on how to structure questions and question progressions to get quick answers than some others.
I've also found ChatGPT makes up stuff sometimes ... but it's usually close enough.
One comfort I have is that, at least for now, ChatGPT can't direct the overall organization of code for the many situations I need to address, so I'll have a job for a while. It does though fill in the knowledge gap at the edges, I don't waste near as much time searching for and reading documentation and examples. ChatGPT usually has good ready-made low-level examples when I need them, and high-level descriptions of tradeoffs and best practices.
I'm "committed" to Jetbrains tools, been using them for a long time. Today I began wondering what I might be missing from CoPilot, downloaded the CoPilot plugin for PyCharm (would also work for IDEA, DataGrip, etc.). I couldn't get the CoPilot plugin to log into Github and saw that others have had similar problems in the past ... so I can't use CoPilot yet. Maybe in a week or two I'll have a basis for comparison. (I don't want to switch to VSCode.)
EDIT: word choice, minor clarifications
Summary: - The user has been a paying ChatGPT subscriber for 3-4 weeks and has found it to be extremely helpful in resolving work-related issues. - ChatGPT has been helpful in providing general knowledge, surveys of categories of tools, specifics on how to use/configure/program against various tools, and advice on best practices and pitfalls. - The user mainly asks questions related to macOS, Linux, AWS, kubernetes, observability tools, and APIs for DevOps-related systems. - ChatGPT has reduced the user's reliance on Google search by 70%. - The user has found ChatGPT to be helpful in structuring questions and question progressions to get quick answers. - ChatGPT sometimes makes up stuff, but it's usually close enough. - The user is committed to Jetbrains tools but is exploring CoPilot and has downloaded the CoPilot plugin for PyCharm.