ChatGPT のクローラ GPTBot を拒否する方法

OpenAI

サイト管理者が ChatGPT のクローラ GPTBot のサイトへのアクセスを拒否する方法についてかんたんにまとめました(情報量は OpenAI の公式ドキュメントからほとんど増えていません)。

GPTBot とは

GPTBot は OpenAI 社が GPT モデルの学習のための情報収集に使用するウェブクローラの名前です。 本記事投稿時点( 2023 年 9 月)で OpenAI のクローラは User Agent に GPTBot という固有の名前を使うと言っています:

GPTBot is OpenAI’s web crawler and can be identified by the following user agent and string.

User agent token: GPTBot
Full user-agent string: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)

GPTBot - OpenAI API

What type of information is used to teach ChatGPT?

As noted above, ChatGPT and our other services are developed using (1) information that is publicly available on the internet, (2) information that we license from third parties, and (3) information that our users or human trainers provide. This article focuses on the first set: information that is publicly available on the internet.

For this set of information, we only use publicly available information that is freely and openly available on the Internet – for example, we do not seek information behind paywalls or from the “dark web.” We apply filters and remove information that we do not want our models to learn from or output, such as hate speech, adult content, sites that primarily aggregate personal information, and spam. We then use the information to teach our models.

How ChatGPT and Our Language Models Are Developed | OpenAI Help Center

この GPTBot を拒否することで、 OpenAI の言語モデルの学習に自サイトの情報が使われることを拒否できるそうです。

GPTBot を拒否する方法

公式ドキュメントによると GPTBot を拒否する方法として次の 2 つが用意されています:

  • A) robots.txt で拒否する
  • B) アクセス元 IP で拒否する

A) robots.txt で拒否する

ひとつめは robots.txt で拒否する方法です。 具体的には、次のような内容を robots.txt に記述して設置します:

User-agent: GPTBot
Disallow: /

ページ単位で許可・拒否を切り替えたい場合は次のように AllowDisallow を使います:

User-agent: GPTBot
Allow: /directory-1/
Disallow: /directory-2/

(これらの例は OpenAI の公式ドキュメントに載っています)

B) アクセス元 IP で拒否する

ふたつめの方法はアクセス元 IP で拒否するものです。 OpenAI が GPTBot でのクローリングに利用する IP アドレスを公表しているのでその情報を使います。 記事投稿時点で次の IP レンジが使われるとされています:

https://openai.com/gptbot.json:

{
  "creationTime": "2023-09-15T23:01:00.000000",
  "prefixes": [
    {
      "ipv4Prefix": "20.15.240.64/28"
    },
    {
      "ipv4Prefix": "20.15.240.80/28"
    },
    {
      "ipv4Prefix": "20.15.240.96/28"
    },
    {
      "ipv4Prefix": "20.15.240.176/28"
    },
    {
      "ipv4Prefix": "20.15.241.0/28"
    },
    {
      "ipv4Prefix": "20.15.242.128/28"
    },
    {
      "ipv4Prefix": "20.15.242.144/28"
    },
    {
      "ipv4Prefix": "20.15.242.192/28"
    },
    {
      "ipv4Prefix": "40.83.2.64/28"
    },
    {
      "ipv4Prefix": "20.9.164.0/24"
    }
  ]
}

以上です。

参考

2023/09/20 時点の OpenAI の公式ドキュメントの説明は次のようになっています:

GPTBot

GPTBot is OpenAI’s web crawler and can be identified by the following user agent and string.

User agent token: GPTBot
Full user-agent string: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)

Usage

Web pages crawled with the GPTBot user agent may potentially be used to improve future models and are filtered to remove sources that require paywall access, are known to gather personally identifiable information (PII), or have text that violates our policies. Allowing GPTBot to access your site can help AI models become more accurate and improve their general capabilities and safety. Below, we also share how to disallow GPTBot from accessing your site.

Disallowing GPTBot

To disallow GPTBot to access your site you can add the GPTBot to your site’s robots.txt:

User-agent: GPTBot
Disallow: /

Customize GPTBot access

To allow GPTBot to access only parts of your site you can add the GPTBot token to your site’s robots.txt like this:

User-agent: GPTBot
Allow: /directory-1/
Disallow: /directory-2/

IP egress ranges

For OpenAI's crawler, calls to websites will be made from the IP address block documented on the OpenAI website.

GPTBot - OpenAI API


アバター
後藤隼人 ( ごとうはやと )

Python や PHP を使ってソフトウェア開発やウェブ制作をしています。詳しくはこちら