How to use OpenAI's GPT-3 for SEO

Learn how to use Open AI and GPT-3 inside the spreadsheet to generate keywords, blogpost titles and other SEO activities.

About OpenAI and GPT

OpenAI developed GPT, a type of artificial intelligence model that is capable of generating human-like text. It uses a machine learning technique called pre-training to learn the statistical patterns of a large dataset and then fine-tunes its knowledge on a smaller dataset to perform a specific task. It is trained on a dataset with billions of elements, including a significant part of the internet web pages, books, and more.

GPT can be used for a variety of language-based tasks, such as language translation, summarization, question answering, and text generation. It can generate coherent and coherently structured paragraphs, articles, and even entire books, given a prompt or topic. GPT has the ability to learn and adapt to new tasks quickly, making it a powerful tool for natural language processing.

NOTE: There are known limitations to these models and the output is not guaranteed to be factually accurate.

What is SEO?

Search engine optimization (SEO) is the process of optimizing web pages so that they rank higher in search engine results pages (SERPs). SEO involves optimizing content for keywords and phrases related to the topic of the page, as well as other factors such as page speed and user experience. SEO helps websites get more organic traffic from search engines like Google and Bing.

How to use OpenAI in Rows

OpenAI template

There's a near-infinite amount of tasks you can solve using OpenAI. Follow this guide on how to set up the integration and use this template showcase to get started with 10 pre-built examples, follow along the list, or watch our video tutorial.

Using the ASK_OPENAI function

The OpenAI integration contains one function - ASK_OPENAI - that you can use to perform hundreds of tasks

You can use the ASK_OPENAI function via the Autocomplete in the editor, or via the Actions wizard.

ASK_OPENAI on the editor

The function has 4 parameters: 1 mandatory and 3 optional, with the following signature: ASK_OPENAI(prompt,[temperature], [max_tokens],[model]) prompt. Let's go one by one.

Prompt

The prompt is the instruction to give to the model. This is where you'll enter the "ask" you want the AI to answer. You can use the prompt to solve a task by explicitly writing it in prose or you can use spreadsheet functions to concatenate values in different cells to construct the prompt. Examples:

  • Use =ASK_OPENAI("Population of France is, in millions, :") if you are not using any cell references inside the prompt.
  • Use =ASK_OPENAI(CONCATENATE("The population of ",A2," in millions, is: ")) if you're using A2 as an input (the country name) to the prompt.

Prompt creation with Concatenate

Temperature (optional)

The temperature is the sampling temperature to use, varying between 0 and 1. Use 1 for creative applications, and 0 for well-defined answers.

If you're doing tasks that require a factual answer (e.g. country populations, capitalize text), then 0 (the default) is a better fit. If you're using the AI for tasks where there aren't definite answers - such as generating text, summarizing text, or translating - then experiment with a higher temperature

Max_tokens (optional)

This max_tokens represents the maximum number of tokens to generate in the completion. You can think of tokens as pieces of words. Here are a few helpful rules of thumb examples from the Open AI Help center:

  • 1 token ~= 4 chars in English
  • 1 token ~= 3/4 words

You can use any number starting with 0. The default value is 200. Most models have a context length of 2048 tokens, except for the newest models which support a maximum of 4096. For tasks that require more text output - text generation/summarization/translation - pick a higher value (e.g. 250).

Model (optional)

The AI model to use to generate the answer. By default, it uses "text-davinci-003". You can see here a list of all of the available GPT-3 models.

Examples of ASK_OPENAI for SEO

There are several ways to use OpenAI to automate SEO tasks inside a spreadsheet:

  • Generate keywords: Generate keyword ideas based on a topic.
  • Generate blog post titles: Create a list of ideas for blog post titles based on the topic of the post.
  • Generate the outline of a blog post: Create the rough outline for a blog post based on its title.
  • Generate meta descriptions: Generate the meta description for a blog post based on its title.
  • Translate keywords: Translate a list of keywords to several languages to capture traffic in multiple geographies.

Generate keywords

Goal: Generate keyword ideas based on a topic. Create separate lists for Informational., Transactional, Navigational and Commercial keywords.

Example:

1=ASK_OPENAI(CONCATENATE("Generate a list of 10 Informational keywords based on the topic of: ",A2))

Add new columns to the spreadsheet for different keyword types.

Details: Assumes that A2 contains the topic.

Generate keywords

💡 To expand the list of keyword ideas into different cells in the spreadsheet ask for a "JSON table" in the prompt. This way OpenAI will generate a data cell that you use to create a table in Rows.

1=ASK_OPENAI(CONCATENATE("Generate a JSON list of 10 Informational keywords based on the topic of Vegan dog food"))

Expand keywords in list

If the initial response does to include the full list, or if the response is an incomplete JSON object, try setting a large value in the max tokens parameter (e.g. 500).

Generate blogpost titles

Goal: Create a list of ideas for blog post titles based on the topic of the post.

Example:

1=ASK_OPENAI(CONCATENATE("Generate a list of 10 blogpost titles ideas based on the topic of: ",A2))

Details: Assumes that A2 contains the topic.

Blogpost titles

Generate the outline of a blog post

Goal: Create the rough outline for a blog post based on its title.

Example:

1=ASK_OPENAI(CONCATENATE("Generate a list of 10 blogpost titles ideas based on the topic of: ",A2))

Details: Assumes that A2 contains the title of the post.

Blogpost outline

Experiment with generating several outlines for the same topic. The model is likely to respond with different variations and give you more inspiration before putting your pencil down and starting writing.

Note: Generating blog outlines work well for cases where the content of the blog post does not need specific details about a company or product. For cases such as writing case studies or feature launch blog posts, try adding more content in the prompt and giving it a bullet point summary of the details you want to cover in the post.

Generate meta descriptions

Goal: Generate the meta description for a blog post based on its title.

Example:

1=ASK_OPENAI(CONCATENATE("Generate a meta description for a post titled: ",A2))

Details: Assumes that A2 contains the title of the post.

Meta description

Translate keywords

Goal: Translate a list of keywords to several languages to capture traffic in multiple geographies.

Example:

1=ASK_OPENAI(CONCATENATE("Translate '",A2,"' to Spanish"))

Add new columns with the languages you want to translate to. In this example, we added additional columns for Japanese and Arabic.

Details: Assumes that A2 contains the keyword.

Translate keywords