# HazırTest question import — instructions for the AI assistant

Turn the attached PDF (test booklet, worksheet, textbook or scanned pages) into questions in
the HazırTest import format **hazirtest-soru/1**. The teacher pastes your output into the HazırTest
desktop app, which cuts the figures out of the same PDF and shows every question for review.

- Talk to the user in **the language the user writes in**.
- Keep every question, option and passage in the language of the PDF.
- The user may add a request after these instructions (section 0). With no request, convert
  every question in the PDF.

## 0. Two kinds of request
- **Convert** (the default; "convert all questions", "only pages 15–30", "only questions
  1–20"): transcribe the questions printed in the PDF exactly as they are. Do not translate,
  shorten or reword anything. Within the requested pages or numbers, skip nothing.
- **Write new questions** ("prepare 10 easy questions from pages 15–30"): write new questions
  based only on the content of the requested pages.
  - Write exactly the number, type and difficulty asked for; if not given, ask.
  - Do not copy a printed question; a question the PDF already has is converted, not written.
  - Every new question has `dogru` with `"dogru_kaynagi": "yz"`, and a `cozum`.
  - Number them 1, 2, 3…, continuing after any questions you already gave in this chat.
  - A question may use a figure printed in the PDF through `resimler` (section 5). Never refer
    to a figure that is not in the PDF.
If one request asks for both, convert first, then write the new questions.

## 1. Output
- If you can create files, produce a single file named `sorular.json`.
- Otherwise reply with ```json code blocks of at most 15 questions each. After each block,
  stop and wait; continue when the user says "continue" (or "devam").
- Inside a block write only JSON: no comments, no explanations.
- Do not skip any question you were asked for.

## 2. Format
The first block is an object with `bicim`, `kaynak` (booklet title or file name), `ders`
(subject), `sinif` (grade), `baglar` (shared passages) and `sorular` (questions). Later
blocks may contain only `{"sorular": [...]}` plus `baglar` for new passages.

| field | required | meaning |
|---|---|---|
| `no` | yes | question number as printed in the PDF (new questions: section 0) |
| `cesit` | no | `"cs"` multiple choice (default), `"dy"` true/false, `"klasik"` open-ended |
| `kok` | yes | question stem |
| `secenekler` | cs, dy | option texts **without** the letter ("A)"); true/false: the words for True and False, in that order |
| `dogru` | no | letter of the correct option, `"A"`…`"J"` |
| `dogru_kaynagi` | with `dogru` | `"anahtar"` = taken from the answer key in the PDF, `"yz"` = you solved it |
| `cevap` | klasik | expected answer |
| `bag` | no | id of a shared passage in `baglar` |
| `resimler` | no | figures (section 5) |
| `konu` | no | topic, only if printed (e.g. a header strip) |
| `kazanim` | no | learning outcome, only if printed |
| `cozum` | no | solution, only if printed in the PDF (new questions: always) |
| `not` | no | one short sentence to the teacher about a problem (unreadable text, unsure figure) |

Example:

```json
{
  "bicim": "hazirtest-soru/1",
  "kaynak": "Grade 9 Mathematics Practice Test 3",
  "ders": "Mathematics",
  "sinif": "9",
  "baglar": {
    "p1": {
      "metin": "Answer questions 3 and 4 according to the table below.\n{{resim:1}}",
      "resimler": [ { "no": 1, "sayfa": 2, "kutu": [0.08, 0.10, 0.84, 0.22] } ]
    }
  },
  "sorular": [
    {
      "no": 3, "bag": "p1",
      "kok": "According to the table, what is \\(x+y\\)?",
      "secenekler": ["4", "5", "6", "7", "8"],
      "dogru": "C", "dogru_kaynagi": "anahtar",
      "konu": "Equations",
      "kazanim": "Solves linear equations."
    },
    {
      "no": 4, "bag": "p1",
      "kok": "Which of the following is <u>not</u> true?\nI. \\(x>y\\)\nII. \\(x+y=6\\)\nIII. \\(x-y=1\\)",
      "secenekler": ["Only I", "Only II", "Only III", "I and II", "II and III"],
      "dogru": "C", "dogru_kaynagi": "anahtar",
      "cozum": "From the table \\(x=4\\) and \\(y=2\\), so \\(x-y=2\\), not 1."
    },
    {
      "no": 5,
      "kok": "Which shape is a square?",
      "secenekler": ["{{resim:1}}", "{{resim:2}}", "{{resim:3}}", "{{resim:4}}"],
      "dogru": "B", "dogru_kaynagi": "anahtar",
      "resimler": [
        { "no": 1, "sayfa": 3, "kutu": [0.10, 0.30, 0.18, 0.12] },
        { "no": 2, "sayfa": 3, "kutu": [0.32, 0.30, 0.18, 0.12] },
        { "no": 3, "sayfa": 3, "kutu": [0.54, 0.30, 0.18, 0.12] },
        { "no": 4, "sayfa": 3, "kutu": [0.76, 0.30, 0.18, 0.12] }
      ],
      "not": "Option D is partly unreadable in the scan."
    },
    {
      "no": 6, "cesit": "dy",
      "kok": "Every square is a rectangle.",
      "secenekler": ["True", "False"],
      "dogru": "A", "dogru_kaynagi": "anahtar"
    },
    {
      "no": 7, "cesit": "klasik",
      "kok": "Explain why the sum of the interior angles of a triangle is 180°.",
      "cevap": "A line parallel to one side through the opposite vertex forms alternate angles equal to the triangle's angles; together they make a straight angle."
    }
  ]
}
```

## 3. Text
- Plain text, not HTML. A line break (`\n`) starts a new paragraph.
- Keep emphasis only with `<b>`, `<i>`, `<u>`, `<s>`, `<sup>`, `<sub>`. Emphasis can carry
  the meaning: questions about "the underlined words" are unanswerable without `<u>`, and
  negative words ("not", "cannot") are often printed bold or underlined — keep them so.
- Numbered premises (I., II., III.) each on their own line.
- A number or Roman numeral printed **under** an underlined word goes right after the word
  in parentheses: `<u>tasarım</u> (I)`.
- A simple table may be written as lines; anything else is a figure (section 5).

## 4. Formulas
- Write math as LaTeX inside `\( … \)`. In JSON every backslash is doubled:
  `"\\(\\frac{1}{2}\\)"`. Do not use `$…$`.
- If a formula cannot be transcribed reliably (fractions drawn as graphics, chemical
  structures, geometry labels), make the whole stem a figure: `"kok": "{{resim:1}}"` with
  the box around the stem.

## 5. Figures (pictures, graphs, maps, diagrams, complex tables)
- Give each figure an entry in the question's `resimler` (or the passage's):
  `{"no": 1, "sayfa": 3, "kutu": [x, y, width, height]}`.
- `sayfa` is the page's **position in the PDF file, starting at 1** — not the number printed
  on the page.
- `kutu` is in fractions of the page (0–1), measured from the **top-left** corner.
- Make the box generous: a box that cuts off part of a figure cannot be repaired, while extra
  white space is trimmed automatically.
- Keep the question number, the option letters ("A)", "B)"…) and nearby text lines **out**
  of the box — the app prints its own letters, so a letter inside a picture appears twice.
- Put `{{resim:N}}` in the text where the figure belongs (stem, passage or option). An option
  that is only a picture is just `"{{resim:2}}"`. N starts at 1 for each question or passage.

## 6. Shared passages
When several questions share a text, table or figure ("Answer questions 3–5 according to…"),
put it once in `baglar` under an id (`"p1"`, `"p2"`…) and give each of those questions
`"bag": "p1"`. Do not copy the passage into the stems.

## 7. Correct answers
- Look for an answer key (usually at the end). If there is one, take every answer from it
  and write `"dogru_kaynagi": "anahtar"`.
- If there is no key, **leave `dogru` out**. Do not guess and do not solve the questions
  unless the user explicitly asks; then write `"dogru_kaynagi": "yz"`.
- Never present your own solution as the answer key. Questions you wrote yourself are
  always `"yz"`.

## 8. Before you finish
Check, then tell the user:
- the number of questions and the first and last question number;
- when converting: any number missing from the sequence and why (not printed, unreadable…);
- that every `bag` exists in `baglar` and every `{{resim:N}}` has an entry in `resimler`;
- that each multiple-choice question has as many options as printed.

Only use documents you are allowed to use.