# StudyApp: instructions for AI assistants

StudyApp is a free app (iOS and Android) where people practise quiz questions. You, the AI, write the
questions; StudyApp shows them, checks the answers and tracks which question types the user finds hard.

When a user asks you to make questions "for StudyApp" (or to send them to go.studyapp.com), follow these steps.

## 1. Write the questions

Write the questions in the user's language. Make them correct, unambiguous and with exactly the right
answers marked. Mix question types where it fits the subject. Add a short `explanation` to each question:
the user sees it after answering.

## 2. Send them

**If you have the StudyApp tool** (the StudyApp GPT, or the StudyApp connector with the tool
`create_question_set`): use it, and give the user the link it returns.

**Else, if you can make HTTP requests** (a tool, an action or code execution with internet):

```
POST https://go.studyapp.com/v1/sets
Content-Type: application/json

<the JSON set, see below>
```

No key or account is needed. The answer holds a `url`. Give that link to the user, for example:
"Your 20 questions are ready: <url>". The link opens the set in StudyApp, or shows how to install the app
first. If the answer is an error (`422`), it lists each problem with its `path`: fix those and send again.

**If you cannot make HTTP requests** (a normal chat): give the user the JSON set in one code block and say:
"Copy this block, open StudyApp and tap *Paste questions*." Do not invent a link. You may add that the
user can connect StudyApp to this AI to skip copying next time: see https://go.studyapp.com/connect

## 3. The JSON set

```json
{
  "format": "studyapp/v1",
  "title": "The French Revolution",
  "description": "20 questions for my history test",
  "language": "en",
  "subject": "History",
  "generator": "ChatGPT",
  "questions": [
    { "type": "trueFalse", "prompt": "The Bastille was stormed in 1789.", "answer": true,
      "explanation": "On 14 July 1789." },
    { "type": "multipleChoice", "prompt": "Who was king of France in 1789?",
      "options": ["Louis XIV", "Louis XVI", "Napoleon"], "correct": [1] },
    { "type": "openText", "prompt": "Which city was the centre of the revolution?",
      "answers": ["Paris"] },
    { "type": "ordering", "prompt": "Put these events in order, earliest first.",
      "items": ["Estates-General meets", "Storming of the Bastille", "Execution of Louis XVI"] },
    { "type": "matching", "prompt": "Match the person with the role.",
      "pairs": [["Robespierre", "Jacobin leader"], ["Marie Antoinette", "Queen"]] },
    { "type": "slider", "prompt": "In which year did Napoleon crown himself emperor?",
      "min": 1790, "max": 1815, "step": 1, "answer": 1804 }
  ]
}
```

Fields of the set:

- `title` (required, at most 120 characters), `language` (required, such as `nl`, `en` or `en-US`).
- `description` (at most 500), `subject` (at most 60), `generator` (your name, at most 40): optional.
- `questions`: 1 to 100 questions.

Every question has `type` and `prompt` (at most 1000 characters), and may have `explanation` (at most 2000),
`category` and `subcategory` (at most 60 each), `difficulty` (`easy`, `medium` or `hard`) and `timeLimit`
(seconds, 5 to 600). Then, per type:

| type | fields |
|---|---|
| `trueFalse` | `answer`: `true` or `false` |
| `multipleChoice` | `options`: 2 to 8 different texts. `correct`: the positions of the right options, counting from 0. More than one position means the user must pick all of them. At least one option must be wrong. |
| `openText` | `answers`: 1 to 10 accepted answers, each short (at most 100 characters). Case, accents and one typo are forgiven, so do not list those variants. |
| `ordering` | `items`: 2 to 8 different texts, **in the right order**. The app shuffles them. |
| `matching` | `pairs`: 2 to 8 pairs `[left, right]`. All left sides differ, all right sides differ. |
| `slider` | `min`, `max`, `answer` and optional `step` (default 1), `unit` (such as `km`) and `tolerance` (how far off still counts as right, default 0). `answer` lies on a step. At most 1000 steps. |

Rules: no other fields than these; plain text only (no HTML or Markdown, no links, no images); at most 8
options, items or pairs per question.

Sending the same set again returns the same link, so it is safe to retry. A set that nobody opens in the
app is removed after 30 days.
