Prompt library

Prompts as records you edit. Not strings hardcoded in source.

Every AI prompt in m18t is a database row with a slug, system prompt, user template, model, and brand scope. Edit in the UI; call by slug from anywhere. SEO prompts auto-inject the resolved canonical URL so the model literally cannot hallucinate it.

Prompt library list
The problem this solves

Hardcoded prompts are technical debt.

Most apps embed AI prompts as string constants in source code. Want to tune the prompt? You ship a deploy. Want a marketing person to iterate on the writing voice? They need to file a Jira ticket. Want different prompts per brand? You write a switch statement. The friction kills iteration.

m18t treats prompts as content. Each prompt is a record with system_prompt, user_prompt_template, model, brand scope, category. You edit prompts in the UI like you'd edit any other content. The app calls them by slug — the calling code doesn't change when the prompt does.

Prompts become editable content, not deploy-gated strings.

What you get

Capabilities

Slug-based invocation

The app and workflows call prompts by slug like seo.meta-title or content.blog-intro. Code is decoupled from prompt text.

Template interpolation

Use {{title}}, {{brand}}, {{locale}}, {{canonical_url}}, etc. in user_prompt_template. The calling context provides values; the system interpolates.

Per-brand or platform-wide

A prompt can be scoped to one brand or set to "all." Brand-specific prompts override platform-wide defaults for that brand.

Multi-provider

OpenAI, Gemini, Anthropic — set per prompt. Switch providers by editing the prompt record, no code change.

SEO canonical injection

Prompts with category "seo" get the resolved canonical URL auto-injected with an explicit anti-hallucination instruction.

Per-call usage log

Every invocation logged with prompt slug, model, content ID, token estimate. Cost visibility without the platform holding your bill.

The anti-hallucination move

SEO prompts that can't invent URLs.

When a prompt is categorized as seo and the calling context provides a brand and content type, m18t looks up the matching SEO index, computes the canonical URL from brand.website_url + path_prefix + slug, and auto-injects it into the system prompt with an explicit "do NOT invent URLs" instruction.

This is the kind of guardrail that's only possible because the SEO model is opinionated, the prompts are records (not strings), and the prompt library is wired to the content workspace. Three things that have to be true together.

The LLM gets the right URL inline. It cannot hallucinate one even if it wanted to.

State today

Where the prompt library stands.

Solid today

  • — Prompts as DB records (CRUD)
  • — Slug-based invocation
  • — Template interpolation with structured context
  • — Multi-provider (OpenAI, Gemini, Anthropic)
  • — Per-brand and platform-wide scope
  • — SEO canonical auto-injection
  • — Per-call usage log

Rough today

  • — Token estimates are chars/4 (rough magnitude)
  • — No per-prompt A/B testing built in

Coming

  • — Shared starter prompt library (fork-and-adjust)
  • — Versioning + diff view for prompt edits
  • — Per-prompt performance metrics

Frequently Asked Questions

Make your prompts a first-class workspace.