Editing prompts and the knowledge base (admin)
How the AI prompt templates and help/KB articles work — including the support chatbot's system prompt and KB, and how to keep the bot's answers correct and on-product.
# Editing prompts and the knowledge base (admin)
Platform-admin only, at **admin.contexta.uk**.
## Prompts
The **Prompts** page edits the AI prompt templates the platform uses. Each template
has a key + versions; you can edit text, activate a version, or clone one.
The **support chatbot's system prompt** is the `chatbot_system` template. Keeping it
correct matters: it tells the model what Contexta IS. For launch it must describe
**Site Check + Performance Studio** — not the older requirements-analysis framing.
A wrong system prompt makes the bot answer off-product even when the knowledge base
is right.
## Knowledge base / help articles
The **Knowledge base** page edits the help articles that `/studio/help` AND the
support chatbot draw on (they share one `PluginHelpArticles` table — single source,
no drift between the help UI and what the bot quotes).
How the support bot uses articles:
- It keyword-searches published articles, scoring **Keywords ×3**, Title ×2, Content
×1 — so a good `Keywords` line is the strongest lever for the bot finding the right
article.
- The bot's search is scoped to the **launch products** (`site_check`, `nfr_perftest`,
`recorder`); backlog plugins are excluded so their articles can't pollute answers.
- Weakly-matched questions are logged as "unanswered" — review those to see which
articles to write next.
### Seeding articles from files
Help articles can also be authored as `content/help/*.md` files with frontmatter
(`title / slug / plugin / category / position / summary / keywords`) and seeded with
`scripts/seed_help_from_markdown.py` (idempotent — re-run after editing a file). This
keeps article source in the repo, reviewable, alongside the live DB copy.
Tags: edit prompt, prompts, prompt templates, chatbot system prompt, edit chatbot, knowledge base, KB, help articles, support bot, activate version, clone prompt, seed articles