DEV Community

Cover image for Will AI Replace Documentation?
David Finster
David Finster

Posted on • Updated on

 

Will AI Replace Documentation?

Updated Feb 14th, 2023 with new information and corrections.

Except for the indicated ChatGPT responses, nothing in this article was written, edited, or otherwise touched by AI, including tools like Grammarly. This is me, off the cuff, without a net.

Introduction

I've heard lots of chatter that ChatGPT might be able to write documentation, so I wanted to see if ChatGPT could, without editing, write an article that might be considered for a community writing program.

My full conversation with ChatGPT follows later in this article. I chose a simple topic about old technology I'm already familiar with. It took me about 30 minutes, but most of that was researching the best prompts to use. I have a personal library of prompts now and I think I can reproduce this in less than 10 minutes next time.

I came away from this conversation with a new insight:


Large Language Models like ChatGPT will not replace technical writers. They will replace the docs entirely.


Why use AI to write static articles? Use it to produce on-the-fly answers with current information instead. Soon your customers will be trained to expect that by Bing and Google anyway.

This isn't true for everything, obviously. I'm looking through the lens of documentation libraries that are primarily based on upstream product docs, often published specifically for the SEO-juice.

Today, the canonical product documentation still needs to be written by humans. But, in the near future, tech writers may feed the AI instead—at least until until it learns how to read the source code, understand the APIs and user interfaces, and replaces tech writing entirely.

That's a bold idea with many ripple effects beyond unemployment. It changes how we think about SEO. It changes what we mean by "search." Search engines that don't adapt will die like the human-curated directories that proceeded them.

When I look at community writing programs today, I see this notices like this:

Linode is not accepting new writers

Maybe it's a good time to reevaluate how we work as technical writers.

Predictions

  • In the short term, freelance writers for community writing programs should find new ways to add value. Repackaging upstream documentation for SEO-juice is cheap and easy now.

  • Strive to be an original source of new information. You'll get ripped off over time as the AI scrapes your content, but by building a personal brand as a writer, you'll still have value to employers—for now.

  • Links to AI prompts will eventually replace documentation libraries. Click the prompt, and it will be answered on-the-fly with current information. This will be superior to static articles.

Today is Feb 5th, 2023, and things are moving fast. What I've written today will be quaint and ill-informed soon—or perhaps even now! I'm working hard to keep up with this new tech, and I'm sure I'll get lots of exciting comments from people who know more.

Consider this a Cunningham's Law post. I'm listening.


The Chat

This is my session with ChatGPT, unedited. I asked the AI to do it in sections to avoid hitting length limits in the free version. I very nearly succeeded, but eventually did hit an error at the very end. That was my cue to stop and write this post.


David Finster (DF): I want you to write an outline for a tutorial. The title of the tutorial is "How to install a free Let's Encrypt TLS certificate for Nginx on Ubuntu 20.04"

ChatGPT (CG):

I. Introduction
A. Explanation of TLS certificates
B. Explanation of Let's Encrypt
C. Explanation of Nginx
D. Explanation of Ubuntu 20.04
E. Purpose of the tutorial

II. Prerequisites
A. A domain name
B. Access to a terminal
C. An Ubuntu 20.04 server with Nginx installed

III. Installing the Certbot client
A. Adding the certbot repository
B. Installing the certbot client
C. Verifying the installation

IV. Obtaining the TLS certificate
A. Running the certbot command
B. Entering your email address
C. Agreeing to the terms of service
D. Verifying domain ownership
E. Saving the certificate files

V. Configuring Nginx to use the TLS certificate
A. Finding the Nginx configuration file
B. Adding the certificate information to the Nginx configuration file
C. Restarting the Nginx service

VI. Verifying the TLS certificate installation
A. Checking the Nginx configuration for errors
B. Testing the connection to the website using HTTPS
C. Checking the certificate information using online tools

VII. Conclusion
A. Summary of the steps taken
B. Importance of using TLS certificates
C. Final thoughts and suggestions for further reading.

DF: For the rest of this chat session, I'll refer to the outline you've generated as "the outline". I want you to write the introduction for the outline. Return only the main response. Remove pre-text and post-text. Format your response using markdown. Use headings, subheadings, bullet points, and bold to organize the information. Voice and style guide: Write at a 8th grade level. Use clear and simple language, even when explaining complex topics. Bias toward short sentences. Avoid jargon and acronyms.

CG:

Introduction

What are TLS certificates?

TLS certificates are used to secure connections between a website and its users. They ensure that data transmitted between the website and the user remains private and cannot be intercepted by third parties.

What is Let's Encrypt?

Let's Encrypt is a free, automated, and open certificate authority that provides TLS certificates to any website. It is a more secure and cost-effective alternative to traditional certificate authorities.

What is Nginx?

Nginx is a popular open-source web server software that is used to serve websites and applications. It is known for its speed and stability.

What is Ubuntu 20.04?

Ubuntu 20.04 is a popular Linux distribution that is widely used as a server operating system. It is known for its stability and security.

Purpose of the tutorial

In this tutorial, you will learn how to install a free Let's Encrypt TLS certificate for Nginx on Ubuntu 20.04. By following the steps in this tutorial, you will be able to secure your website and protect your users' data.

DF: I want you to write the prerequisites section of the outline.

CG:

Prerequisites

A domain name

Before you can install a Let's Encrypt TLS certificate, you need to have a domain name for your website. This domain name will be used to verify your ownership of the website.

Access to a terminal

You will need to have access to a terminal in order to run commands on your Ubuntu 20.04 server. This can be done through a terminal application on your computer or through a web-based terminal provided by your server host.

An Ubuntu 20.04 server with Nginx installed

You will need to have an Ubuntu 20.04 server with Nginx installed and set up. If you do not already have this, you may need to follow a separate tutorial to set it up. Make sure that Nginx is running and serving a website before proceeding with this tutorial.

DF: I want you to write the "III. Installing the Certbot client" section of the outline.

CG:

III. Installing the Certbot Client

Adding the certbot repository

The first step in installing the certbot client is to add the certbot repository to your server. This repository contains the certbot software and its dependencies.

Installing the certbot client

Once the repository is added, you can install the certbot client using the following command:

    sudo apt-get update
    sudo apt-get install certbot

Verifying the installation

After the certbot client has been installed, you can verify the installation by running the following command:

   certbot --version

This should output the version of the certbot client that is installed on your server.

DF: I want you to write the "IV. Obtaining the TLS certificate" section of the outline.

CG:

IV. Obtaining the TLS Certificate

Running the certbot command

The certbot client can be used to obtain a Let's Encrypt TLS certificate for your website by running the following command:

    sudo certbot --nginx

This command will automatically configure Nginx to use the newly obtained TLS certificate and start serving your website over HTTPS.

Verifying the certificate

After the certificate has been obtained, you can verify that it has been installed correctly by visiting your website in a web browser and checking the security information for the page. The web browser should display a padlock icon and indicate that the connection is secure.

Renewing the certificate

Let's Encrypt TLS certificates are only valid for 90 days. The certbot client can be used to automatically renew the certificate before it expires by running the following command:

    sudo certbot renew

It is recommended to set up a cron job or systemd timer to run this command regularly in order to keep your certificate up to date.

DF: I want you to write the "V. Configuring Nginx to use the TLS certificate" section of the outline.

CG:

V. Configuring Nginx to Use the TLS Certificate

Updating the Nginx configuration

The certbot client will have automatically updated the Nginx configuration to use the newly obtained TLS certificate. However, it is a good idea to verify that the configuration is set up correctly.

Checking the Nginx configuration

You can check the Nginx configuration by running the following command:

    sudo nginx -t

This command will check the syntax of the Nginx configuration and report any errors. If there are no errors, the command will output the following message:

    nginx configuration file /etc/nginx/nginx.conf test is successful

Restarting Nginx

After verifying the Nginx configuration, you can restart Nginx to apply the changes by running the following command:

    sudo systemctl restart nginx

This will ensure that Nginx is using the newly obtained TLS certificate to serve your website over HTTPS.

DF: I want you to write the "VI. Verifying the TLS certificate installation" section of the outline.

CG:

VI. Verifying the TLS Certificate Installation

Testing the HTTPS connection

You can verify that your website is being served over HTTPS by visiting your website in a web browser and checking the security information for the page. The web browser should display a padlock icon and indicate that the connection is secure.

Checking the SSL report

You can also use an SSL reporting website to check the details of your TLS certificate and verify that it has been installed correctly. One such website is SSL Labs.

To use SSL Labs, simply enter your website's URL in the form on their website and run a test. The report generated will give you detailed information about the configuration of your TLS certificate and any potential issues that may need to be addressed.

Testing the renewal process

Finally, you can verify that the renewal process is working correctly by waiting until your certificate is due to expire and then running the following command:

    sudo certbot renew

This command will renew your TLS certificate if it has expired. You can then check your website in a web browser and verify that the new certificate has been installed correctly.

DF: I want you to write the "VII. Conclusion" section of the outline.

CG:

VII. Conclusion

In this tutorial, we went through the process of installing a free Let's Encrypt TLS certificate for Nginx on Ubuntu 20.04. We covered the following steps:

  • Installing the necessary software and packages
  • Installing the Certbot client
  • Obtaining the TLS certificate
  • Configuring Nginx to use the TLS certificate
  • Verifying the TLS certificate installation

By following these steps, you should now have a secure HTTPS connection for your website. You can continue to use the renewal process to keep your TLS certificate up-to-date, ensuring that your website remains secure.

Remember, having a secure website is important for both you and your users, as it helps to protect sensitive information and maintain the privacy of your visitors.

DF: I want you to expand the "A domain name" section of the outline.

CG:

A. Domain Name

Before you can install a TLS certificate, you'll need to have a domain name. A domain name is the address that people use to find your website on the internet, like example.com. If you don't already have a domain name, you'll need to purchase one from a domain registrar.

Here are some things to keep in mind when choosing a domain name:

  • Keep it simple and memorable
  • Make it easy to spell and pronounce
  • Consider the extension, such as .com, .org, or .net
  • Make sure it's available

Once you have a domain name, you'll need to point it to your server's IP address. This tells the internet where to find your website when someone types your domain name into their browser. You'll need to do this with your domain registrar or your web hosting company.

DF: I want you to explain more about how to point a domain name to your server's IP address.

CG:

Pointing a Domain Name to Your Server's IP Address

If you have a domain name that you would like to use for your website, you need to point it to your server's IP address. Here's how:

  1. Log into your domain registrar's website. This is the company where you purchased your domain name.
  2. Look for the DNS (Domain Name System) management page. This is usually where you can update the settings for your domain name.
  3. Find the option to add a new record. This could be called "Add Record," "Create Record," or something similar.
  4. Create a new A record. This type of record links your domain name to an IP address.
  5. Enter your server's IP address in the "Value" or "Destination" field.
  6. Save the new A record. It may take up to 24 hours for the changes to propagate.

After you've pointed your domain name to your server's IP address, you can proceed with obtaining a free Let's Encrypt TLS certificate as described in this tutorial.

DF: I want you to explain more about how to add the certbot repository.

CG:

Adding the Certbot Repository

To add the certbot repository, you'll need to run a few commands in your terminal. Here's what you need to do:

Open the terminal and type the following command:

    sudo apt-get update
```



Next, add the certbot repository by typing the following command:



 ```
    sudo apt-get install software-properties-common
```



Then, type the following command:



 ```
    sudo add-apt-repository universe
```



Finally, type the following command to update the package list:



 ```
        sudo apt-get update
```



By adding the certbot repository, you'll be able to install the certbot client, which is the tool you'll use to obtain the TLS certificate.

DF: In section IV. of the outline, please expand subsections D and E.

CG:

IV. Obtaining the TLS certificate

D. Running the certbot client

The Certbot client is a command-line tool that you can use to obtain a TLS certificate from Let's Encrypt. To run the certbot client and obtain the certificate, follow these steps:

  1. Open a terminal window
  2. Run the following command: sudo certbot --nginx
  3. Follow the on-screen instructions to complete the process

The certbot client will interact with Let's Encrypt servers and request a TLS certificate for your domain. If everything is set up correctly, the certbot client will automatically configure Nginx to use the newly obtained certificate.

E. Verifying the certificate installation

To verify that the certificate was installed correctly, you can use the following command:

    sudo certbot certificates

This command will display a list of all the certificates that were obtained using the certbot client, including the one for your domain. Make sure that the certificate for your domain is listed, and that the expiration date is in the future. This means that the certificate was installed correctly, and that your server is now secured with a valid TLS certificate.

DF: I want you to create an example Nginx control file for www.example.com with the certbot certificate installed.

CG:

    server {
        listen 80;
        server_name www.example.com;
        return 301 https://$server_name$request_uri;
    }

    server {
        listen 443 ssl;
        server_name www.example.com;

        ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

        location / {
            root /var/www/html;
            index index.html;
        }
    }

DF: I want you to expand the "Importance of using TLS certificates" section of this outline.

CG:

Importance of Using TLS Certificates

TLS (Transport Layer Security) certificates play a crucial role in the security of your website. Here are a few reasons why it is important to use them:

Protects sensitive information

TLS certificates help secure the connection between the user's web browser and your website. This is important because it helps to protect sensitive information such as passwords, credit card numbers, and other personal information from being intercepted by hackers.

Improves website security

Using a TLS certificate can also help to improve the overall security of your website. When a user visits a website without a TLS certificate, the connection is vulnerable to being intercepted by third parties who can steal sensitive information or even modify the content of the page. With a TLS certificate, the connection is encrypted, which makes it much harder for hackers to access the information being transmitted.

Boosts search engine ranking

Having a secure website can also improve your search engine ranking. In recent years, search engines have started giving preference to websites that use TLS certificates in their search results, as they are seen as more secure and trustworthy.

Increases customer confidence

Customers are more likely to trust and feel confident in a website that uses a TLS certificate. When they see the padlock icon and "https" in the address bar, they know that the connection to the website is secure and that their personal information is protected.

In conclusion, using a TLS certificate is important for the security, search engine ranking, and customer confidence of your website.

DF: I want you to expand the "Final thoughts and suggestions for further reading" section. Include at least three links to other reference documentation.

CG:

VII. Final Thoughts and Suggestions for Further Reading

Congratulations on setting up your website's TLS certificate! Here are a few more things you might find helpful:

A. Keeping Your Certificate Up-to-Date

It's important to keep your TLS certificate up-to-date so that your website remains secure. You can set up automatic renewals for your certificate using Certbot.

B. Improving Website Security

Setting up a TLS certificate is just one step in securing your website. There are many other security measures you can take, such as:

  • Enforcing strong passwords for all users
  • Keeping your web server software and all plugins up-to-date
  • Backing up your website regularly

C. Further Reading

Here are three resources you can use to dive deeper into website security:

ChatGPT error message


Final Thoughts

It very nearly finished; that was going to be my last prompt to ChatGPT for this test anyhow. I believe the error is related to load on the free version.

With some light editing and reassembly, that's not a terrible article after we review it for QA. It's not Hemingway, but most community submissions aren't either, including what I’ve written here today.

Tell me your thoughts! Would you prefer an on-the-fly answer from an AI instead of a static article?

Top comments (1)

Collapse
 
mjhumphrey profile image
Humphrey Mpairwe

As a Technical Writer, this is so frightening, but from my point of view, nothing interests like reading content generated by a fellow human. That small element of human-error adds value that ChatGPT is yet to have.

But since OpenAI is training ChatGPT even more, we can only watch what the tool will be able to do in the coming months.

For now, a straight answer from AI would be great, but not as perfect like a static article generated by a human who may consider multiple code samples, and errors to tweak before deciding on what's best for the reader (user).

In summary, yes, AI is here to stay, but 'too perfect is never perfect', and as per ChatGPT replies, it strives to be perfect.