Wikipedia:Bot policy
|
|
|
Wikipedia policy |
---|
Behavioral standards |
Assume good faith Bots Civility Editing policy No legal threats No personal attacks Ownership of articles Sock puppetry Three-revert rule Username Vandalism |
Robots or bots are processes that interact with Wikipedia using the editing interface(s). Bots may be completely automated processes, or human assisted processes. All actions performed by a bot are the responsibility of its operator. Some low-speed user assistance programs (e.g. Auto Wiki Browser in normal operation mode) are not considered "bots". This policy does not cover server-side scripts run by developers.
Please read the guidelines below before designing and implementing any bot on Wikipedia.
Contents |
Policy
Prior to use, bots must be approved at Wikipedia:Bots/Requests for approval. State there precisely what the bot will do, observe and participate in the discussion, and await authorization from someone in the approvals group. Approval may take up to one week. After approval you may run the bot for a short period so it can be monitored. After the trial the bot will be evaluated by someone in the approvals group and, if the approvals group determines that a "bot flag" is required, the user will be marked as a bot by a bureaucrat.
Please do not start running your bot without:
- Creating a talk page for the bot, describing its functions
- Listing it on Requests for approvals
- Getting the go-ahead from someone in the approvals group
When seeking approval on Requests for approvals, please state the following:
- Whether the bot is manually assisted (run by a human) or automatically scheduled to run
- The period, if any, we should expect it to run
- What language or program it is running
- Its purpose
Create a user page for your bot before seeking approval on BRFA:
- Describe the bot's purpose, language it uses, what program(s) it uses (pywikipedia framework, etc)
- Describe whether it is manually assisted or automatically scheduled to run
- The period, if any, we should expect it to run
- Describe who the maintainer is
- Add its user page to Category:Wikipedia bots by adding {{Bot|Original Username}} to the top of the bot's user page
Usernames for new bots should incorporate the word "bot" so that editors realize they are dealing with an automaton, despite historical counterexamples such as Pearle. The username for the bot should also incorporate the username of the bot operator or a recognizable fragment of it.
- Administrators should block bots if they are unapproved, doing something the operator did not say they would do, messing up articles, editing too rapidly, or running anonymously. If they have a fixed IP address, bot operators may wish to post their IP address on their bot's user page so that the owner of an anonymously running bot can be found.
- While performance is generally not an issue, bots should avoid making an excessive number of requests, and be conservative in their editing speed, to minimize any effects they may have on performance.
- Bots in trial periods should be especially careful to limit their edit rate to no more than two to three per minute so that their edits may be reviewed.
- Unflagged bots should edit more slowly than flagged bots, as their edits are visible in users' watchlists.
- The urgency of a task should always be considered; tasks that do not need to be completed quickly (for example, renaming categories) can and should be accomplished at a slower rate than those that do (for example, reverting vandalism). Bots doing non-urgent tasks should edit approximately once every ten seconds, while bots doing more urgent tasks may, if approved to do so, edit approximately once every four seconds. It is recommended that bots run with larger delays during peak hours (0800 – 2000 UTC), and days (middle of the week, especially Wednesdays and Thursdays) or operate during the quietest times (weekends). Ideally, bots should be run at a rate that permits human editors to review the bot's edits if the need arises.
- Bots' editing speed can be regulated by forcing them to wait for a fixed time interval before making an edit. However, it is better to vary the editing speed based on slave database server lag, where possible, as this allows bots to edit more quickly during quiet periods while slowing them down considerably when server load is high, thereby creating a sort of self-correcting mechanism. This can be achieved quite easily by appending the "maxlag" parameter to the query string of each URL the bot requests. This accepts an integer value; if the database lag, in seconds, is higher than the specified value, an HTTP 503 status code is returned with a "Retry-After" header set; on receiving this, bots should wait for 5 seconds before retrying. If it is not, the request is served as usual. MediaWiki developers recommend a "maxlag" parameter value of 5 (seconds). Higher values mean more aggressive behaviour, lower values are nicer. An example query string would be http://en.wikipedia.org/w/index.php?title=Main_Page&maxlag=5 – try this a few times and note that when the database is experiencing lag issues, a machine-readable status page is returned instead of the request. This feature was implemented specifically for use by client–side bots and maintenance scripts.
- The operator should be at, or logged into, the machine the bot is running on to terminate it if necessary during the debugging phase, otherwise the bot is liable to be blocked without notice.
- Bots that download substantial portions of the page database are prohibited. Instead, download the database dumps. See also Wikipedia:Mirrors and forks.
- Do not log in as your bot when replying to enquiries. Questions or concerns can be addressed at bot's talk page or the operator's talk page, but since bots can't reply, the one responsible for replying is its operator.
The burden of proof is on the bot-maker to demonstrate that the bot:
- is harmless
- is useful
- is not a server hog
- has been approved
- has appropriate community consensus for each task
- abides by all guidelines, policies and common practices
Note that according to Wikipedia:Categorization of people, certain types of person categories should not be filled/emptied using a bot. Before adding sensitive categories to articles by bot, the input should be manually checked article by article, rather than uploaded from an existing list in Wikipedia.
To help prove that a bot is harmless and useful, a trial period may be asked to demonstrate the bot. Any complaints made about the bot during the trial period require that the bot be stopped immediately, and the issue should be resolved at Wikipedia talk:Bots.
If you plan to make any modifications to your bot that expand the scope of its original purpose, please leave a note on the talk page regarding the nature of the change to assert that no one has any problems with your bot, and with such additions the bot will still be harmless and useful, and not a server hog.
Under exceptional circumstances, one or more aspects of this policy may be set aside by a consensus of administrators.
Spell-checking bots
There should be no bots that attempt to fix spelling mistakes in an unattended fashion. It is not technically possible to create such a bot that would not make mistakes, as there will always be places where non-standard spellings are in fact intended. Manually-assisted spell-checking bots are acceptable, so long as they include international spell checking and not only country-specific spell checking. Statistic-generating spell-checking bots, which generate statistics on common misspellings, are also acceptable.
Wikipedia:Maintenance reports that list possible misspellings are welcome. See Wikipedia:Typo for existing efforts and a list of existing interactive spell-checking tools.
Interwiki bots
If using the pywikipedia framework:
- Please run the latest version
- Update on a daily basis
Bot operators must be reasonably familiar with the languages that they are linking from and to, in order to confirm that interwiki linkings between the two encyclopedias are done correctly.
Exceptions to this are bot developers, those working very closely with bot developers, or users that have proven themselves as harmless and useful to the community.
- Wikipedia:Interlanguage links
- Interwiki bot FAQ
- m:Interwiki bot
- m:Interwiki sorting order (See & vote: bugzilla:2867)
Problems with a specific bot
If you spot a problem or have a complaint about a specific bot, take your query to the bot operator's talk page. If you think the problem is serious and would like greater input, leave a short note at Wikipedia:Administrators' noticeboard pointing to the discussion at the operator's talk page. An administrator can block on sight any bot that appears to be out of control.
Good form
Bot operators are encouraged (but not required) to:
- Publish the source code of their bot (unless it's a clone)
- Program his or her bot to stop editing if someone leaves a message on its talk page. This can be checked by looking for the "You have new messages..." banner in the HTML for the edit form.
- Program his or her bot to stop editing if they detect that they have logged out. This can be accomplished by checking the value of wgUserName in any retrieved wiki pages. Bots running anonymously may be blocked.
- Be compliant with the bots opt-in/opt-out facility.
Repairing damage
If, despite all efforts and review, a bot is found to have caused unintentional damage, it is the responsibility of the bot operator to repair it. Note that this could require either lots of manual work, or the creation (and perhaps approval) of a new bot. If you are not prepared to clean up after your bot if it misbehaves, you should not run it. There is, of course, no reason that help cannot be asked for or offered.
Assisted bots
Assisted bots are defined as any software that allows rapid editing of articles, while not saving any changes without some human interaction. Typical assisted jobs include those which are repetitive, but cannot be done fully automatically e.g. disambig repair, stub sorting and typo fixing.
- Assisted bots don't necessarily need bot approval, though some software has built in approval detection, whereby approval from some subset of "trusted" users is required (developers are permitted to build in approval mechanisms). If you have any doubts, it is safer to go through the approval process.
- A separate account is advised if many edits are going to be made.
- Always make extra sure there is consensus before making a large series of edits.
- Assert that software is being used to perform the edit, if this is not already clear. This can be accomplished by a message on the account's userpage, if a separate account is being used, or in the edit summary. It may also be desirable to identify the specific software being used.
See also
- How to create a bot
- About bots
- Bot policy and requests
- Wikipedia:User access levels
- Toolserver
Wiki integration bots
Below is a list of bots on other systems or solutions that extend system-specific functionality with Wiki integrations.