Create your own glossaries with GPT-3 and Google Sheets

Although now everyone is talking about ChatGPT and Prometheus, both developments of OpenAI (the second one together with Microsoft) they owe a lot to GPT-3, the generative artificial intelligence model capable of creating texts of all kinds and with practically any style. With a more professional orientation (unlike ChatGPT, GPT-3 is not free), in this case we are not talking about a chatbot, but rather a tool designed to offer a service similar to hiring the services of a professional writer. The cost is cheaper, but of course, the result does not offer the level of finish and quality that a writer provides (and I am not speaking only for myself).

So, first of all it is clear that what is explained in this tutorial is not free… although it is quite likely that it will not cost you money. The reason for this is that OpenAI grants, to all accounts, a balance of 18 dollars that they can use in their wide catalog of services based on artificial intelligence. And no, in case you are wondering, the use of ChatGPT does not have an impact on said balance, since it is a free service, unless you contract its Plus modality, but in that case you will have to pay a monthly fee, which will not come out of said balance either. balance.

Therefore, if you have an OpenAI user account (which is the same for ChatGPT as for the rest of the services) and Google, in order to use Google Sheets (Google spreadsheets), you can use them in combination with an extension for the same ones that integrates the GPT-3 functions directly into your spreadsheets. If you still do not have an OpenAI user account (I assume that Google does), here we will tell you how to sign up.

Create your own glossaries with GPT-3 and Google Sheets

A personalized glossary?

You may be wondering what exactly I mean, that is, what we are going to create in this tutorial. Well then, imagine that, for example, you consider taking your first steps in World of Warcraft (or any other game, it’s just an example). To help you, you would like to have a small dictionary that brings together the most common terms in the game, but Internet searches do not offer you something like that and, of course, since these are your first steps, you still do not have the necessary information to be able to create it yourself. Another example, let’s say you need, for whatever reason, a list of the most common diseases, along with a simple description of them. You could spend hours creating that list, but you can also have GPT-3 and Google Sheets do it for you in a few seconds.

However, it is very important to be clear that if ChatGPT sometimes responds incorrectly, this problem can also occur with GPT-3, so it is always recommended that once the initial text is generated process to review it to ensure it is correct. You should never count on the output of text generative AIs as final, you should view it as a rough draft that will still need some work. However, much less than if you had to do it all from scratch.

Therefore, there are many reasons that may lead you to need or want a personalized glossary, be it medical terms, car brands, pirate lingo… the options are endless, and surely if it hasn’t happened Well, soon you can think of some interesting use for this function.

Remember, yes, that as we have indicated previously in this tutorial We assume that you already have a Google and OpenAI user account.

Connect GPT-3 with Google Sheets

The first thing you will have to do is open a new book in Google Sheets, something you can do by clicking on this link and, on the page that will open, with a click on the “Blank” design shown in the list above, on the left. In this way, in a few seconds you will already be in front of a blank page.

Then click, in the top menu, on Extensions, then on Add-ons and finally on Download Add-ons, which will display the Google Workspace marketplace (extensions store)

Create your own glossaries with GPT-3 and Google Sheets

Then type, in the search box, “GPT for Sheets and Docs” and from the results that will be displayed, choose and install the following

Create your own glossaries with GPT-3 and Google Sheets

This way the extension will already be associated with your Google account, but we still need to connect the extension with your GPT-3 account, otherwise it won’t work.

To do this, back in the spreadsheet, click on Extensions again, where you will now see that a new entry called GPT for Sheets and Docs has appeared. Move the mouse pointer to it and, in the menu that will be displayed, click on the Set API Key entry, to open the dialog in which you will have to enter a key generated specifically for this purpose.

And where can you get such a key? Well, it’s actually quite simple, you can click on this link, which is the same one shown at the top of the box, which will take you to a page like this (you may have to log in with your account beforehand). OpenAI):

Create your own glossaries with GPT-3 and Google Sheets

Once there, click on the Create new secret key button, and copy the newly created key to the clipboard. It is very, very important that you do not share that key with anyone. When you have it, go back to the spreadsheet and paste the key in the box labeled Enter your OpenAI API key. Once you have done so, click on Check to verify that it has been copied correctly and, when you have received confirmation of this, you can confirm the operation with a click on Save API Key.

Now yes, the extension is already installed and you have access to your OpenAI account, so you can now use GPT-3 in your spreadsheets. Keep in mind, and this is important, that this operation will only have to be carried out once, not every time you are going to create a book in which you want to use GPT-3.

generate the list

Surely, at this point, you are already looking forward to taking action, right? Well, as you will see, once the connection is established, using the GPT-3 functions in Google Sheets is really simple.

First of all click on Extensions, scroll down to GPT for Sheets and Docs and click on Enable GPT Functions, to make sure that the functions are active.

Now you must enter the first query that you want to pass to GPT-3, that is, the one that will generate the list that you want to create. To do this, go to cell A1 and write, without the quotes “=GPT_LIST(“Prompt of what you want to search«). For example, if you want a list of the most popular European motor brands, your query might look like this:

=GPT_LIST(“Create a list with the 25 most important European car brands”)

Hit enter, wait a few seconds, and shortly, you’ll see the list that GPT-3 just created based on your query:

Create your own glossaries with GPT-3 and Google Sheets

I have given the example of the car brands so that you can verify that the list may not completely adjust to your preferences (I already told you at the beginning that you may have to review and edit to refine them). Thus, if you wish, you can add and/or delete brands from the list. Of course, keep in mind that the list is generated based on a formula, so if you reload the document later, it may be generated again. To avoid this, before editing the list click Extensions, scroll down to GPT for Sheets and Docs and click Replace GPT formulas with values ​​in entire sheet. Then go to cell A1 and, as you can see, the formula you wrote at the beginning will no longer be there.

Create your own glossaries with GPT-3 and Google Sheets

Generate the descriptions

If all you wanted was the list, then you already have what you wanted. However, we’ve talked about creating a glossary, so we’re still missing the descriptions, right? Well, that is what we are going to see next, since generating them is just as simple as creating the list.

The first thing you have to do is write the query that will generate the descriptions. At this point it is important that you be as specific as possible, especially if you want them to include any particular data. For example, suppose you want a brief description of each brand, including its country of origin and best-selling car model. The query could be something like this:

«I want a short review about this brand including its country of origin and its best-selling car model«.

Of course, you can add more elements, if you wish. When you have it ready, write it in column A, a few rows below the last result in the list. For example, if this has 25 entries and therefore ends in A25, type the text, without the quotes, in A30.

Ready? Well, now go to the right of the first entry in the list, that is, in cell A2, and write the following, without quotes:


Press enter and, in a few seconds, you will get the expected description, for example:

Create your own glossaries with GPT-3 and Google Sheets

To generate the rest of the descriptions, select cell A2, position the mouse pointer in its lower right corner so that it changes shape to look like a +, then click and hold, drag down to select. all cells in column B that have, to their left, one of the entries in the list. In this example, you would drag to B25. After a few seconds, the rest of the descriptions will begin to be displayed until the list is complete:

Create your own glossaries with GPT-3 and Google Sheets

NOTE: Depending on the number of descriptions and the length of the descriptions, the text #ERROR! in the place where some descriptions should be displayed. If you move the mouse pointer to any of these cells, a message will be displayed indicating the cause of the error, which is that you have exceeded the maximum queries per minute allowed for your account.

Create your own glossaries with GPT-3 and Google Sheets

Don’t worry, in that case wait a minute, go to one of the cells and copy its formula to the clipboard. Then delete the cell content, re-paste the previously saved formula and the text will be generated correctly:

Create your own glossaries with GPT-3 and Google Sheets

Repeat this process in the rest of the cells in which the error has occurred and, in this way, you will have the list you wanted. Remember now, yes, to click on Extensions, move to GPT for Sheets and Docs and click on Replace GPT formulas with values ​​in entire sheet to change the formulas for the values ​​and, in this way, Google Sheets does not ask again for GPT-3 that generates the texts.

Check your OpenAI balance

As you will remember, at the beginning of this tutorial I told you that GPT-3 is not free, but that you have a credit of 18 dollars so you can try it. So, surely you are wondering the impact that the glossary you have created has had on it, right? Well, you can check it very easily. You just have to click on this link and, on the page that will open, you will be able to see a summary of your “finances”:

Create your own glossaries with GPT-3 and Google Sheets

As you can see, in my case, with the list of the 25 brands and their descriptions, I have spent about seven cents, that is to say that with the $18 balance, you will be able to make a good amount of glossaries.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *