# AI Assistance

## Descriptions of Factors and Links

All factors and links may have Notes associated with them.  These notes are displayed when a factor or link is selected.  They describe the factors and links in more detail than can be accommodated in a label.

The descriptions may be typed in by hand, or they can be generated using a Large Language Model (LLM), a type of artificial intelligence.

To get AI to create a description, select a node or a link and click on the 'sparkle'.  After a short pause, the Note panel will be filled with an AI generated description.  This text can be and most often should be edited to provide more detail and correct any mistakes.

The AI is given the factor label (or the 'from' and 'to' factor labels for links) as cues for the description, together with rest of the map and the map's title, if any, as context. Hence to get a better description, factor labels should be precise, and the map should have a meaningful title.

The AI uses this information from the map plus the information it has gained from extensive training on documents found on the internet to create the description.  The text it generates should be treated as fallible and only a starting point for more expert and more informed descriptions.  Do not rely on the accuracy of the text, or on the material - web links and academic papers - that it cites. This all should be carefully checked.  

Requesting a description for a second time may generate a slightly different text because the AI is not deterministic (i.e. it depends on probabilities).

To create the text, data is sent to an AI server in the UK.  No data is retained on the server or used for training.  The prompt to obtain a description of a link (the prompt for factors is similar) is like this:

``` text
I want you to explain a single causal link of the form "A causes B". Write a compact, clear explanation of why or how A causes B.

Structure the output in the following order without using any section headings or a title:
1 Introduction
2 Bullet points explaining the causal reasoning
3 Evidence section containing academic citations and links to relevant web pages
4 Summary
The bullet points should clearly explain the causal reasoning.
The evidence section should provide academic references and links to web pages with a brief explanation of how each supports the link.
All academic references must include full citations (author, date, title, source). Do not include DOIs.  You must verify that all academic references that you mention actually exist. Always embed links for any cited web pages.
The summary should concisely restate the main points.
Maximum total output length: 200 words.
```

## System map overview description

When you open the map overview (using the toggle at the middle left edge of the map window), the editing toolbar at the top includes a 'sparkle' icon, which can be used to get an AI generated description of the whole map.

The prompt for the map overview is:

```text
I want you to generate a compact, readable narrative description of a system map.

I will provide:
• A title for the system map.
• A list of causal links, each given as a pair of factors in the form “A causes B”, where A is the cause and B is the effect.

Your task is to:
1. Produce a short, coherent, well-structured description explaining the main dynamics of the system.
2. Cluster related factors, highlight feedback loops if present, and describe the overall behaviour of the system.
3. Avoid restating every causal link individually. Instead, synthesise them into a readable explanation.
4. Use bullet points where appropriate but do *not* include a title or any section headings.
5. Keep the description concise and accessible, suitable for a briefing note.  Use no more than 300 words.
```
