Skip to content

Learn From Web Chats Design

Ed Mozley edited this page Dec 5, 2026 · 4 revisions

Knowledge from web chats a person answered - Design

Status: BUILT (5 December 2026, all three stages, for the next release) - the queue, drafts from a chat, the privacy check, improving an existing article and the hand-offs saved: Knowledge Assistant - From web chats.

Ed's idea, 5 December 2026. Related: Web chat, Web chat hand-off (#525), Knowledge, Knowledge assistant (write-ups from tickets), Knowledge Versions (#465).

The idea, in short

When a web chat visitor is handed to a person and the person answers, that answer is knowledge the AI did not have. A review screen lets an analyst turn it into knowledge: improve the article that was nearly about it, or write a new one, using the person's answer. Only general "how to" knowledge goes in - never anything about the visitor or their own account. The next visitor with the same question gets the answer from the AI instead of waiting for a person.

ITIL: this is Knowledge Management, and specifically the Knowledge-Centred Service idea - capture knowledge as part of the work, reuse it, improve it each time it falls short. About as close to the ITIL practice as a feature gets.

What exists today (and is reused)

Piece Where How it is used
The chat is kept webchat_conversations (one ticket per chat, ticket_id) and webchat_messages (sender visitor / ai / analyst) The question and the person's answer are already stored and told apart
The hand-off moments handoff_datetime, agent_joined_datetime (#525) agent_joined_datetime set = a person answered; this is the trigger
The Knowledge assistant includes/knowledge/writeup_ai.php Refuses first (thin material = "no article here" or 2-4 questions for the analyst), and its prompt already bans names, email addresses, phone numbers, job titles, locations, machine names, IP addresses, ticket references and company names ("the user", "the affected machine")
Finding close articles includes/knowledge/kb_embeddings.php (article embeddings) "Which articles are nearly about this?" with a closeness score
Safe changes to an article Knowledge Versions (#465) An improvement is saved as a new version - compared and restored like any other
Who may read an article includes/knowledge/visibility.php The new or improved article must be readable by web chat (published, the web chat's company and audience) or it helps nobody

The proposed shape

1. The queue - "Chats to learn from"

A list in Knowledge of web chats where a person answered and the chat's ticket is resolved or closed. Each row: when, the question in a few words, who answered, the widget. Actions: Review or Dismiss. Nothing is added automatically; dismissed chats stay dismissed. Only analysts who can write Knowledge articles see it.

2. The review screen

  • Left: the chat transcript, the person's answer highlighted (the AI's own answers greyed, so it is clear what it got wrong or did not know).
  • Right: what the assistant proposes:
    • The question, in general terms - "How do I connect to the VPN from home?", not "Sam can't get on the VPN".
    • The closest articles (two or three) with how close each is.
    • One of three outcomes:
      • Improve an article - the change shown as a before / after; saved as a new version.
      • New article - a draft (unpublished until the analyst saves it published).
      • Nothing to learn - the answer was an action, not knowledge ("I've unlocked your account"), or about this person only. One click and the chat leaves the queue.
  • The analyst can edit everything before saving; the assistant may ask 2-4 questions when the answer is too thin, as the ticket write-up already does.
  • The visibility of a new article defaults to what web chat can read, and is shown plainly - an article web chat cannot see does not stop the next hand-off.

3. Privacy - three layers, not one

  1. The instruction - the assistant's existing "no personal details" rule, plus: write the general how-to, not this person's case.
  2. A check in code before saving - scans the text for anything that looks like an email address, phone number, IP address, ticket reference or machine name, and for the visitor's own name and email (known from the chat). Anything found is highlighted and the save waits until it is removed or the analyst confirms it is fine (e.g. a support email address that belongs in the article). This does not depend on the AI behaving.
  3. A person always approves - nothing is published or changed without an analyst saving it.

4. Seeing it work

Count the web chats later answered from an article that came from this screen without needing a person - shown on the queue ("This has saved 14 hand-offs").

Settings

Setting Level Default Why
Suggest articles from chats a person answered Knowledge -> Settings -> AI Off Existing installs see no change until someone turns it on
Which chats join the queue: once the ticket is resolved / closed, or as soon as a person answered Knowledge -> Settings -> AI Resolved or closed Some teams want to capture while it is fresh; most want the final answer
Visibility for a new article made here Knowledge -> Settings -> AI What web chat reads (published, public / portal audience) Teams differ in what they publish to the outside world

Build stages

  1. Built - The queue and new-article drafts - the trigger, the list, the review screen with transcript, New article and Nothing to learn, reusing the write-up assistant; the code privacy check.
  2. Built - Improve an existing article - closest articles by embedding, the before / after, saved as a new version.
  3. Built - Seeing it work - the "hand-offs saved" count.

Each stage: tests, help, user wiki, developer guide, Feature Bingo, translations.

Not included

  • Publishing anything without a person.
  • Learning from email tickets or phone notes (the same screen could later take any solved ticket - the write-up assistant already does that one ticket at a time).
  • Training or fine-tuning a model - this only writes articles, which the existing web chat AI already reads.

Watch out for

  • The person's answer may be a one-off workaround, not the right fix - the review is where that is caught; the screen says so.
  • Answers that are actions ("I've reset it") are the commonest case - Nothing to learn must be one click, and the assistant should propose it by itself.
  • Company scope - a chat belongs to a widget and its company; the article it produces belongs there too.

Decisions

Date Decision Who
2026-12-05 Build it: a review screen that turns a person's web chat answer into an improved or new Knowledge article, general how-to only, a person always approves Ed
2026-12-05 Order: after #530, #398, #329 and #505 stages 2-3 Ed
2026-12-05 Stage 3: a chat counts as saved only when the article was its CLOSEST (rank 1 of web chat's embedding search, recorded per answer in a new table), after it came from here, with no hand-off asked for, offered or joined, quiet 30 minutes; needs embeddings; recorded only while the setting is on. Shown as a fair estimate, not proof me
2026-12-05 Stage 2: Improve sits beside Write on each chat (the analyst chooses, rather than the assistant choosing between new / improve / nothing in one step) - the closest articles are listed, the AI then proposes or says NO_CHANGE; saved as a new version straight onto the article (a published one changes at once - the analyst has just read the before / after); refused if the article changed meanwhile me
2026-12-05 Stage 1 built on the Knowledge Assistant page (a From web chats tab) rather than a new screen, reusing its write-up engine on the chat's ticket - the transcript is already there me

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally