✅ BenefitsService ManagementIntermediate✨ AI-assisted

Benefits of Claude for Writing Knowledge Base Articles

WittyTech Daily··5 min read
#claude#knowledge-base#itsm#message-batches

Your service desk closes the same "VPN fails after a password reset" ticket again and again, and each fix sits in a closing note nobody reads twice. Claude knowledge base articles close that gap: Claude drafts an article from every resolved ticket, a person approves it, and the next agent finds an answer. Below are five benefits, a batch script you can run, and costs from the Claude pricing page.

Repeat incidents get a documented fix

The fix already exists in the worklog. Claude reshapes "cleared cached creds in Credential Manager, restarted client" into symptoms, cause, numbered steps and a check that an L1 agent can follow cold. That is ITSM knowledge management as a by-product of closing tickets, not a chore nobody schedules.

One prompt rule makes it safe: use only facts in the ticket, and write "Not recorded in ticket" where the notes are silent. A draft with an honest gap is useful. A draft with a confident invention is an incident with good formatting.

One template gives every service desk article the same shape

Agents scan, so shape matters. Put the template in the system prompt and every draft gets the same headings, placeholder rules and a link back to its source ticket.

You turn one resolved IT service desk ticket into a draft knowledge base article.

Rules:
- Use only facts present in the ticket. Never invent commands, versions or causes.
- If a section cannot be filled from the ticket, write 'Not recorded in ticket'.
- Replace names, email addresses and hostnames with <user> and <hostname>.
- Write for an L1 agent who has not seen the ticket.

Output exactly this structure:

# <Short symptom title an end user would search for>

**Applies to:** <product, version, environment>
**Source ticket:** <ticket id>

## Symptoms
## Cause
## Fix
1. <numbered steps>
## How to verify
## When to escalate

Save it as kb_template.md. The placeholder rule helps with privacy, but run your own PII scan before publishing, because a model can miss one.

Haiku 5.5 with Message Batches turns resolved tickets into KB articles for cents

A ticket-to-template rewrite fits the cheap tier. Haiku 5.5 costs $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100,000 tokens. Sonnet 5.5 costs $2 and $10.

The Message Batches API takes 50% off both directions, accepts up to 100,000 requests or 256 MB per batch, and most batches finish within an hour. Knowledge capture is not urgent, so you give up nothing. Assuming a 3,000-token template, a 1,500-token ticket and a 700-token article, 1,000 drafts cost:

| Setup | Input / output per MTok | 1,000 drafts | | --- | --- | --- | | Sonnet 5.5, standard | $2 / $10 | $16.00 | | Sonnet 5.5, batch | $1 / $5 | $8.00 | | Haiku 5.5, standard | $0.10 / $0.50 | $0.80 | | Haiku 5.5, batch | $0.05 / $0.25 | $0.40 |

import json
import anthropic
from anthropic.types.message_create_params import MessageCreateParamsNonStreaming
from anthropic.types.messages.batch_create_params import Request

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY

template = open('kb_template.md', encoding='utf-8').read()
# each ticket: {'id': 'INC0012345', 'summary': '...', 'resolution_notes': '...'}
tickets = json.load(open('resolved_tickets.json', encoding='utf-8'))

system = [{
    'type': 'text',
    'text': template,
    'cache_control': {'type': 'ephemeral', 'ttl': '1h'},
}]

def ticket_prompt(t):
    return '\n'.join([
        'Ticket ' + t['id'],
        'Summary: ' + t['summary'],
        'Resolution notes:',
        t['resolution_notes'],
    ])

batch = client.messages.batches.create(
    requests=[
        Request(
            custom_id=t['id'],
            params=MessageCreateParamsNonStreaming(
                model='claude-haiku-5-5',
                max_tokens=2000,
                system=system,
                messages=[{'role': 'user', 'content': ticket_prompt(t)}],
            ),
        )
        for t in tickets
    ]
)
print(batch.id, batch.processing_status)

The custom_id maps results back to your ticket numbers. Thinking tokens bill as output, so run 20 tickets first and read usage.output_tokens before trusting the table, and compare those drafts against Sonnet 5.5 before committing to the cheaper tier.

Prompt caching makes the fixed template nearly free

The template is identical in every request, so it is a textbook cache prefix, marked by the cache_control block above. Haiku 5.5 caches prefixes of 512 tokens or more, and a cache read costs $0.01 per million tokens against $0.10 for base input. The prompt caching docs say the 1-hour option costs 2x base input to write. Batch requests run in any order, so cache hits are best-effort.

The win is modest: at 3,000 tokens on Haiku batch, caching saves roughly 14 cents per 1,000 drafts. It pays off when the prefix grows to include few-shot examples of your best articles, or when you run the same job on Sonnet 5.5.

Reviewers edit a draft instead of facing a blank page

Nothing publishes itself. The collection script writes each draft with status: draft and its source ticket, so a reviewer checks it beside the ticket. Capture becomes a queue with an owner.

import time
from pathlib import Path
import anthropic

client = anthropic.Anthropic()
BATCH_ID = 'msgbatch_...'  # printed by the submit script

while client.messages.batches.retrieve(BATCH_ID).processing_status != 'ended':
    time.sleep(60)

out = Path('drafts')
out.mkdir(exist_ok=True)
retry, cache_read = [], 0

for item in client.messages.batches.results(BATCH_ID):
    if item.result.type != 'succeeded':
        retry.append((item.custom_id, item.result.type))
        continue
    message = item.result.message
    cache_read += message.usage.cache_read_input_tokens or 0
    text = ''.join(b.text for b in message.content if b.type == 'text')
    header = '---\nstatus: draft\nsource_ticket: ' + item.custom_id + '\n---\n\n'
    (out / (item.custom_id + '.md')).write_text(header + text, encoding='utf-8')

print('cache read tokens:', cache_read)
print('to retry or fix:', retry)

If cache read tokens prints 0, caching did not kick in and you are paying full price for the template. Failed or expired requests land in retry: fix validation errors, resend the rest.

When human-written articles still win

Some fixes should not come from a bulk run: a database failover runbook, a security incident procedure, anything touching production data. A wrong step costs far more than the draft saved.

A single ticket also gives Claude nothing to generalize from, so a one-off workaround can read like standard procedure. If a draft says "Not recorded in ticket" in three sections, the notes were too thin: interview the engineer who fixed it.

Route by risk, not volume: bulk-draft the routine fixes, hand-write the dangerous ones, and remember the real cost is reviewer time, not the 40 cents.

For anyone deploying AI in production, this is a low-risk place to start: the model never touches a live system, a person approves every output, and the whole run costs less than the reviewer's coffee.

← More in Service Management