Jump to content

Help:Introduction: Difference between revisions

From RiskiPedia
m Undo revision 90768 by Gavinandresen (talk)
Tag: Undo
Updated: moving away from {result} to {{#expr: }}
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
We've found these prompts to be helpful to get AI chatbots to help create new RiskiPedia pages. With the current (2025) crop of AIs it seems to be best to have a conversation with the AI, having it create pages step-by-step and checking their work instead of trying to create all the pieces of the pages at once.
==Contributing to RiskiPedia==


<pre class="copyToClipboard"><nowiki>
Creating a new RiskiPedia article is only a little bit harder than creating a WikiPedia article.


Our task is to create a new RiskiPedia page about a specific subject. RiskiPedia is an interactive encyclopedia all about risks: https://riski.wiki
===Using an AI===


We will be producing two artifacts:
The easiest way to create RiskiPedia pages is to ask an AI to do most of the "grunt work". Follow the instructions on the [[Help:AIPrompt|AI prompt page]] to (hopefully!) have a productive conversation with the chatbot.


1. Wikitext for a main page (e.g., My_Risk_Name)
===Copy an existing page===
2. Wikitext for a data subpage (e.g., My_Risk_Name/Data)


We will start by identifying the risk and exploring relevant mitigating factors. I want your help deciding what risk measure(s) to choose, and how to present them to the user. A good RiskiPedia main page presents risks in a way that is easy to understand, with interactive elements that lets users explore how they might mitigate risks. Good RiskiPedia pages are backed by reliable data from peer-reviewed studies, reliable statistics, or well-respected organizations.
The second easiest way to create a new page is to find a page that is similiar to the one you want to create and [[Help:Copying_Pages|copy]] it. Most RiskiPedia pages are split into two parts-- the main page, and a subpage containing data and calculations related to the risk (e.g. "MyRisk" and "MyRisk/Data"). If you are copying a page to start, be sure to copy both.


Do not create any pages until I ask you to; I will be teaching you proper RiskiPedia syntax as we go.
===Creating a page "from scratch"===
Let's start the conversation: ask me what subject I'd like to explore.
</nowiki></pre>


After this prompt, have a back-and-forth conversation with the AI to decide exactly what the page should be about, use this prompt to help it create good RiskData tables:
If you want to create a page from scratch:


<pre class="copyToClipboard"><nowiki>
1. Find a study or studies or data about some risk that you're interested in. For example, maybe you're interested in the risks of skydiving, BASE jumping, and other parachuting activities-- use Google Scholar and find the best research with data on the risks.
Let's start by gathering data and creating the /Data subpage.


Syntax for the <riskdata> tag:
2. Insert the relevant data from the research into a RiskiPedia page. If the article about the risk will be called "Parachuting", create a page called "Parachuting/Data".  How? Just search for Parachuting/Data in the RiskiPedia page search box (at the top of the screen), and then poke the "Create the page Parachuting/Data" link that appears in the page-not-found result. Data goes inside &lt;riskdata&gt; tags. Include references to the studies somewhere in the Data page (or in the data table), and add any relevant comments about the data right on the Data page. For example, the table of risks for skydiving and BASE jumping might be defined as:
<pre>
<nowiki><riskdata table="skydiving" columns="variation|mean_fatality_rate|mean_injury_rate|reference">
Skydiving|0.000011|0.00044|[https://pmc.ncbi.nlm.nih.gov/articles/PMC9859333/]
BASE jumping|0.0004|0.004|[https://pubmed.ncbi.nlm.nih.gov/17495709/]
</riskdata></nowiki>
</pre>


<riskdata table="TableName" columns="Column1|Column2|...">
Your favorite AI chatbot is likely very good at re-formatting the data for you-- just give it the data and ask it to produce a [[Help:RiskData|RiskData-formatted table]] with the description of each row in the first column. Each row should be on a new line, with values separated by pipe "|" characters.
Row1_Value1|Row1_Value2
Row2_Value1|Row2_Value2
... etc for more rows...
</riskdata>


The `columns` attribute lists all column names, separated by pipes. Each row is a pipe-separated list of values, with rows separated by newlines ('\n'). The first column is a user-friendly description of the data in that row that the user will be shown to select the data in that row to use in risk calculations.
Whenever possible, copy data verbatim from the original source(s) so it is as easy as possible for other people to confirm that the data is accurate. Data conversions or calculations should happen in RiskModel calculations.


Create one <riskdata> per factor
3. Insert one or more "RiskModel" using the &lt;RiskModel&gt; tag into the /Data page. RiskModels define how to combine the various risk factors (as described in the data tables) to come up with an overall risk. They also define how to display the risk. The simplest RiskModel might just look up a single value in a single data table:
Do not create a <riskdata> table for single-value baseline factors; instead, just insert references and put the numeric value directly into RiskModel calculation(s).
<pre>
Use a unique table name for each, and give all columns globally unique names (prefix with the factor name if needed).
<nowiki><RiskModel name="fatality_risk_per_jump">Your chances of dying, per jump, are {{One_In_X|{mean_fatality_rate}}}</RiskModel>
Whenever possible populate rows with verbatim values from references for ease of review.
<RiskModel name="injury_risk_per_jump" calculation="mean_injury_rate">Your chances of being seriously injured, per jump, are {{One_In_X|{mean_injury_rate}}} in 1,000</RiskModel></nowiki>
After each <riskdata> block, explain the data briefly, including the timeframe (e.g., annual, monthly), and list references as bullet points in valid WikiText markup: [referenceURL reference title as link text]
</pre>


Be sure to use proper wikitext markup: https://www.mediawiki.org/wiki/Cheatsheet
Many risks will have multiple risk factors; calculation can be an arbitrary expression with as many risk factors as you need, combined using arithmetic.
Give me the complete wikitext for the data subpage in a single block for easy copying or downloading.
</nowiki></pre>


Copy and paste what the AI gives you into a new RiskiPedia /Data subpage (e.g. if the risk is "Driving", search for Driving/Data and then poke the red "create a new page" link that appears on the page-not-found result). You might need to ask the AI to regenerate the page, correcting links or wikitext formatting. Once the page looks good, ask it to create RiskModels:
The One_In_X template takes a not-very-understandable floating point risk (like 0.0000152543) and converts it into a more human-friendly form, like "13 in a million".


<pre class="copyToClipboard"><nowiki>
4. Now you can create the page visitors interested in the risk will see. Create the parent page (e.g. "Parachuting"), again by searching for it and poking the Create the page link. Put text about the risk along with interactive UI elements that let the user select or type in the risk factors that the RiskModel uses to calculate risk. If the risk factor comes from a data table, use a &lt;DropDown&gt;. Give the DropDown the name of the table on the /Data page and it will let the visitor choose one of the rows in the table. For example:
<pre>
<nowiki><DropDown title="What kind of jump?" table=skydiving></DropDown></nowiki>
</pre>


Let's create RiskModel elements and add them to the /Data subpage. The syntax for the RiskModel tag is:
The final piece that puts everything together is the &lt;RiskDisplay&gt; element. Put one or more of them on the page where the "Your chances are..." text should appear, and once the visitor has specified all of the relevant risk factors the text will appear. RiskDisplay has a model attribute that refers to a RiskModel on the /Data page. For example:
<pre>
<nowiki><RiskDisplay model="fatality_risk_per_jump"></RiskDisplay>
<RiskDisplay model="injury_risk_per_jump"></RiskDisplay></nowiki>
</pre>


<riskmodel name="ModelName" calculation="Formula">Your RISKDESCRIPTION risk is {{One_In_X|{result}}} per EXPOSUREMEASURE.</riskmodel>
==Working example==


Where RISKDESCRIPTION is the very brief description of the risk and EXPOSUREMEASURE is e.g. 'year' or 'million miles'.
Here's the data:
The RiskModel name must be unique on the page.
The calculation must use only column names from riskdata elements and numeric values, combined using the arithemetic operations + - * / ^
{result} is the result of the calculation; usually a fractional probability
{{One_In_X|{result}}} converts the fractional probability into a human-friendly "one in X" format (e.g. 0.01000221 becomes "about a 1 in 100 chance")


Create one RiskModel for each risk measure. If the calculation is complicated, append an explanation of the calculation (e.g. "The base risk is expressed per 100,000 incidents per month; that is adjusted to individual risk per year by... etc").
<riskdata table="skydiving" columns="variation|mean_fatality_rate|mean_injury_rate|reference">
 
Skydiving|0.000011|0.00044|[https://pmc.ncbi.nlm.nih.gov/articles/PMC9859333/]
End the page with an attribution line: Initially created by [AI_NAME_AND_VERSION] (e.g., AcmeAI 11.0).
BASE jumping|0.0004|0.004|[https://pubmed.ncbi.nlm.nih.gov/17495709/]
 
</riskdata>
Include a link to the main page: "Data and risk models are used on the [[My_Risk_Name|main page]]." Replace any spaces in the risk title with underscores to create the page title.
 
Be sure to use proper wikitext markup: https://www.mediawiki.org/wiki/Cheatsheet
Give me the complete wikitext for the data subpage in a single block for easy copying or downloading.
</nowiki></pre>
 
Edit the page, paste in the new text, and give the AI feedback if it got anything wrong. Once the /Data page looks good:
 
 
<pre class="copyToClipboard"><nowiki>


Now let's create the main page. Tone should be friendly, and avoid jargon. It should be understandable by an intelligent 14-year-old.
... and the RiskModel:


Begin with an introduction of the risk and the purpose of the interactive features.
<RiskModel name="fatality_risk_per_jump">Your chances of dying, per jump, are {{One_In_X|{mean_fatality_rate}}}</RiskModel>
<RiskModel name="injury_risk_per_jump">Your chances of being seriously injured, per jump, are {{One_In_X|{mean_injury_rate}}}</RiskModel>


For each risk mitigation factor, include a DropDown linked to the relevant table on the /Data subpage.
... and this is what a visitor would see:
DropDown syntax is:


<dropdown table="TableName" column="ColumnName" default="DefaultValue" />
<DropDown title="What kind of jump?" table=skydiving />


The column attribute defaults to the first column, and will be shown to the user as choices. When a row is chosen the other columns are set as variables and any RiskModels that use them are re-calculated. If a default value is set it will be chosen when the page is initially loaded; only set default values if there is an obvious default choice. Put an easy to understand description of the dropdown choice before the dropdown (e.g. "Do you ever drive drunk?").
<RiskDisplay model="fatality_risk_per_jump" />


For each risk measure include a RiskDisplay to display the risk, based on the DropDown choices. The syntax for RiskDisplay is:
<RiskDisplay model="injury_risk_per_jump" />
 
<riskdisplay model="ModelName" />
 
ModelName refers to a previously defined RiskModel on the /Data subpage. RiskDisplays display nothing until all of the variables in the RiskModel's calculation are chosen.
 
Include a link to the /Data page: "See the [[My_Risk_Name/Data|data page]] for all of the details on how these risks are calculated."
 
End with the attribution line: Initially created by [AI_NAME_AND_VERSION].
 
</nowiki></pre>
 
At this point the AI should be pretty good at creating valid RiskiPedia pages. Either continue the conversation to have it tweak wording, appeareance, etc, or edit the pages yourself to make the pages better.
 
It is a good idea to ask the AI to sanity check it's work. Make some selections from the DropDowns, then ask the AI something like:
 
<pre>
Let's do a sanity check. I've selected "10-40 years old" "No Impairment" and "Nighttime Driving" and I get a risk of 1 in 1,000 per year. Is that reasonable?
</pre>


==See also==


If you want to create another risk page, continue the conversation; the AI is less likely to repeat mistakes it made before if you continue rather than start a new chat.
* [[Help:RiskData|RiskData help]]
* [[Help:RiskModel|RiskModel help]]
* [[Help:RiskDisplay|RiskDisplay help]]
* [[Help:DropDown|DropDown help]]
* [[Help:RiskParameter|RiskParameter help]]

Latest revision as of 18:53, 17 September 2025

Contributing to RiskiPedia

Creating a new RiskiPedia article is only a little bit harder than creating a WikiPedia article.

Using an AI

The easiest way to create RiskiPedia pages is to ask an AI to do most of the "grunt work". Follow the instructions on the AI prompt page to (hopefully!) have a productive conversation with the chatbot.

Copy an existing page

The second easiest way to create a new page is to find a page that is similiar to the one you want to create and copy it. Most RiskiPedia pages are split into two parts-- the main page, and a subpage containing data and calculations related to the risk (e.g. "MyRisk" and "MyRisk/Data"). If you are copying a page to start, be sure to copy both.

Creating a page "from scratch"

If you want to create a page from scratch:

1. Find a study or studies or data about some risk that you're interested in. For example, maybe you're interested in the risks of skydiving, BASE jumping, and other parachuting activities-- use Google Scholar and find the best research with data on the risks.

2. Insert the relevant data from the research into a RiskiPedia page. If the article about the risk will be called "Parachuting", create a page called "Parachuting/Data". How? Just search for Parachuting/Data in the RiskiPedia page search box (at the top of the screen), and then poke the "Create the page Parachuting/Data" link that appears in the page-not-found result. Data goes inside <riskdata> tags. Include references to the studies somewhere in the Data page (or in the data table), and add any relevant comments about the data right on the Data page. For example, the table of risks for skydiving and BASE jumping might be defined as:

<riskdata table="skydiving" columns="variation|mean_fatality_rate|mean_injury_rate|reference">
Skydiving|0.000011|0.00044|[https://pmc.ncbi.nlm.nih.gov/articles/PMC9859333/]
BASE jumping|0.0004|0.004|[https://pubmed.ncbi.nlm.nih.gov/17495709/]
</riskdata>

Your favorite AI chatbot is likely very good at re-formatting the data for you-- just give it the data and ask it to produce a RiskData-formatted table with the description of each row in the first column. Each row should be on a new line, with values separated by pipe "|" characters.

Whenever possible, copy data verbatim from the original source(s) so it is as easy as possible for other people to confirm that the data is accurate. Data conversions or calculations should happen in RiskModel calculations.

3. Insert one or more "RiskModel" using the <RiskModel> tag into the /Data page. RiskModels define how to combine the various risk factors (as described in the data tables) to come up with an overall risk. They also define how to display the risk. The simplest RiskModel might just look up a single value in a single data table:

<RiskModel name="fatality_risk_per_jump">Your chances of dying, per jump, are {{One_In_X|{mean_fatality_rate}}}</RiskModel>
<RiskModel name="injury_risk_per_jump" calculation="mean_injury_rate">Your chances of being seriously injured, per jump, are {{One_In_X|{mean_injury_rate}}} in 1,000</RiskModel>

Many risks will have multiple risk factors; calculation can be an arbitrary expression with as many risk factors as you need, combined using arithmetic.

The One_In_X template takes a not-very-understandable floating point risk (like 0.0000152543) and converts it into a more human-friendly form, like "13 in a million".

4. Now you can create the page visitors interested in the risk will see. Create the parent page (e.g. "Parachuting"), again by searching for it and poking the Create the page link. Put text about the risk along with interactive UI elements that let the user select or type in the risk factors that the RiskModel uses to calculate risk. If the risk factor comes from a data table, use a <DropDown>. Give the DropDown the name of the table on the /Data page and it will let the visitor choose one of the rows in the table. For example:

<DropDown title="What kind of jump?" table=skydiving></DropDown>

The final piece that puts everything together is the <RiskDisplay> element. Put one or more of them on the page where the "Your chances are..." text should appear, and once the visitor has specified all of the relevant risk factors the text will appear. RiskDisplay has a model attribute that refers to a RiskModel on the /Data page. For example:

<RiskDisplay model="fatality_risk_per_jump"></RiskDisplay>
<RiskDisplay model="injury_risk_per_jump"></RiskDisplay>

Working example

Here's the data:

variation mean_fatality_rate mean_injury_rate reference

Skydiving

0.000011

0.00044

[1]

BASE jumping

0.0004

0.004

[2]

... and the RiskModel:

riskmodel: missing calculation attribute riskmodel: missing calculation attribute

... and this is what a visitor would see:

[{"variation":"Skydiving","mean_fatality_rate":"0.000011","mean_injury_rate":"0.00044","reference":"[https:\/\/pmc.ncbi.nlm.nih.gov\/articles\/PMC9859333\/]"},{"variation":"BASE jumping","mean_fatality_rate":"0.0004","mean_injury_rate":"0.004","reference":"[https:\/\/pubmed.ncbi.nlm.nih.gov\/17495709\/]"}]

See also