ChatGPT application cases for programmer's tasks

The OpenAI ChatGPT model came out the other day and has already made a lot of noise.

ChatGPT is a large language model (LLM) equipped with OpenAI that can generate plausible text in response to user input. It can hold context and gives better results than reconstructed models. The main language is English, but other languages can be used as well.

You can read more about how the model works in the press release . I will attach an illustration of the learning schemes here.

In this article, I will give examples of ChatGPT usage. I will intentionally not publish tracks with philosophical problems or errors in models on the subject of tasks. Obviously, ChatGPT will not replace anyone, but the laptop will become for a quick search. Instead of searching for code in StackOverflow or googling, you can send a query and sync faster. I'm waiting to see if they pump up the second pilot or continue the expansion with ChatGPT in the main IDE. Here's an amateur one on VSCode, by the way.

General tips on promts (the text of the request that you write).

  • If the model suddenly responds with a stub, it is not necessarily because it does not know the answer. You can correct the message. Usually something like "I want you to act like {___}" helps.
  • If the answer is too long, it may bind to the 1000 character limit. However, you can write "continue output from {___}" and it will continue.

Now let's move on to the self. The main ones I took from popular Twitter threads and blogs. I also added a couple of cases.

Use it instead of a search engine

You can ask everything from burger recipes to questions about LaTeX.

Simulating the work of a virtual machine

I advise you to read the Engraved article, there are even more case studies in the comments. The guys in the comments even managed to compile some simple C code. As an illustration, here is a simulation of running a docker container.

Creating Prompts for Stable Diffusion

One of the challenges when working with models like Stable Diffusion is to augment your own promt to get the results you want. Here are some examples of generating images from augmented promt from ChatGPT. An image of a girl and the generation of interiors.

Write a small application

As an example we decided to make a summarizer for essays based on GPT-3. The model uses minimal code and api of different services.

Solving and explaining algorithmic problems

I scored this promt on my own. I liked that the model first explains the essence of the problem, and then gives the code with comments.

Solving homework

@yorko has a great article on how ChatGPT solves the "coreference resolution" problem with kaggle at the level of a non-teintuitive BERT. And the homework with mlcourse.ai did 7/10.

Write in the comments if you know what else there are interesting and useful examples of ChatGPT. If you want to know the answer to some query, but too lazy to register an account on OpenAI, write here - I'll ask it for you and post the answer to the comments model.