# Teaching the AI

> **In short.** The AI answers users only from your product's **Knowledge**: plain Markdown with a
> first paragraph saying what the product is, then `## Areas`, `## Money`, `## Accounts and
> data`, `## Using it`, `## Known issues` and `## Not in it yet`. Short bullets with the exact
> names of buttons and screens. Under about 15,000 characters, as it's read for every ticket.

Junco's AI answers your users **only** from your product's knowledge. If something isn't there,
it says it doesn't know and passes the ticket to you. So the knowledge is the most important thing
you set up, and worth keeping up to date.

## Getting a first version

On the **Knowledge** page:

- **From your help text.** Paste an FAQ, README, help page or your own notes; the AI rewrites it
  in the shape below for you to check. (It's charged to your AI credit, usually a cent or two.)
- **From your code, with your AI.** Copy the prompt into your coding AI inside your project. It
  reads the code and writes the knowledge for you to paste in. (The Knowledge page gives you the
  same prompt with your product's name in it.)

  ```prompt
  Write a support knowledge file for your product, for Junco: an AI support agent that answers our users using only this file. It has no other knowledge of the product, so anything missing here, it will say it doesn't know and pass to me.

  Read the codebase (and any README, docs, FAQ or changelog in it) and write Markdown, under 20,000 characters, in this shape:

  - A first paragraph: what your product is, who it's for, where it runs (web, phone, desktop), who makes it.
  - ## Areas: the main parts of the product, one line, separated by " · " (the AI files each ticket under one).
  - ## Money: anything users pay for, and that support can't give refunds, credit or items (a person handles those).
  - ## Accounts and data: how users sign in, where their data or progress is saved, how to back it up or move devices, what can't be recovered.
  - ## Using it: short how-tos for the things users most often ask, as bullet points with exact names of buttons and screens.
  - ## Known issues: bugs we know about, with any workaround.
  - ## Not in it yet: things users ask for that don't exist, so the AI doesn't invent them.

  Plain facts, short bullets, exact names from the UI. No marketing, no guesses: if you're not sure, leave it out. Format guide: https://desk.juncodesk.app/docs/knowledge.md

  Give me the file to paste into Junco (Knowledge page).
  ```

Either way, **read every line before saving**: the AI will repeat it to users as fact.

## The shape that works best

```markdown
Moth Quest is a puzzle game for phones and browsers, made by Moth Games.

## Areas
Levels · Shop · Accounts · Saves · Sound · Other

## Money
- Gems are bought with real money. Refunds and purchases are handled by a person.
- Support can't give gems or items.

## Accounts and data
- Progress is saved to your account; sign in on a new phone to get it back.

## Using it
- Hints: tap the bulb, top right. Three free hints a day.

## Known issues
- Level 42 can freeze on older iPhones. Workaround: turn off Effects in Settings.

## Not in it yet
- There's no multiplayer, and no date for it.
```

- **Areas** are what the AI files each ticket under, so you can see where problems cluster.
- **Known issues** with workarounds save you the most tickets.
- **Not in it yet** stops the AI inventing features.
- Use the exact names of buttons and screens. Short bullets beat paragraphs.
- It's read for every ticket, so shorter is cheaper: under 15,000 characters is plenty.

## What replies may hold

Under the editor:

- **Sites replies may link to**: your own help pages. A reply with any other link waits for you.
- **More phrases that count as promises**: words specific to your product, on top of the usual
  ones (refunds, free items, fix dates). A reply that promises something waits for you.

Money, accounts, bans and reports about other users always go to a person, whatever the knowledge says.
