How Generative AI Works: A Clinician's Mental Model
Maria, the Oakland LCSW from the last lesson, finally tries an AI scribe. She types four lines of BIRP shorthand from her 4 PM 90834 session, hits generate, and watches a fluent, structured, payer-ready progress note assemble itself in eleven seconds. Her first reaction is relief. Her second is dread: "How did it know what to write? And if it can do that, what else does it think it knows about my client?" Both reactions deserve a real answer, because a clinician who does not understand how a large language model produces text will either trust it too much or refuse a tool that could return five unpaid hours a week. This lesson builds the working mental model: tokens, training data, temperature, and context window, through a single worked example you will recognize, your own session shorthand becoming a note. By the end, you will know exactly why the output is so fluent, exactly why fluency is not knowledge, and exactly which failure modes you are responsible for catching before you sign.
The Supervisee Who Never Met Your Client
Here is the controlling analogy for this lesson. Imagine a brilliant, tireless practicum student who has read every textbook, every sample note, every clinical writing guide ever published, millions of progress notes, intake summaries, and treatment plans, and has a perfect ear for how clinical documents sound. Now imagine this student has never met your client. Never sat in a session. Has no chart access, no memory of last week, no mental status exam, no risk assessment, no knowledge that your client's "I'm fine" on Tuesdays means the opposite. You hand this student your four lines of shorthand and say, "Write this up as a BIRP note." The student produces something gorgeous in seconds, because writing up clinical material in the standard format is exactly what all that reading trained them to do.
Would you sign that note unread? Of course not. You would read every word, because you know the student is working from your four lines plus general knowledge of what notes usually say, and "what notes usually say" is precisely where the danger lives. Where your shorthand was thin, the student filled the gap with plausible convention: a typical intervention, a typical client response, a typical plan. Plausible is the student's specialty. Accurate is yours.
A large language model, an LLM, is that student, industrialized. Everything in this lesson, tokens, training data, temperature, context window, is the mechanical explanation of how the student got so fluent and why the student remains so ignorant of your specific client. Hold the analogy; we will test it against each concept and then run the full worked example.
Tokens: The Note Is Built One Small Piece at a Time
An LLM does not compose a note the way you do, holding the whole session in mind and deciding what matters. It generates text one token at a time. A token is a small chunk of text, often a word or part of a word: "psychoeducation" might be three tokens, "CBT" one. At each step, the model asks a single question: given everything so far, what token most plausibly comes next? It answers by consulting patterns learned from its training, picks a token, appends it, and asks the question again. That is the whole trick, repeated thousands of times per note.
This explains the eerie fluency. After "Client presented with flat affect and reported," the most statistically plausible continuations in clinical writing are phrases like "increased anhedonia" or "poor sleep over the past week." The model has seen that neighborhood of text so many times that its next-token guesses read like a seasoned clinician's prose. But notice what the mechanism implies: the model is not checking whether your client actually reported poor sleep. There is no fact-checking step, no chart lookup, no memory of the session. There is only the question "what usually comes next?" answered extremely well.
This is why the field calls confident fabrications "hallucinations," and why they are not malfunctions. When the model writes "Client denied suicidal ideation" in a note about a session where you never asked, it is doing exactly what it was built to do: that sentence appears in an enormous share of the progress notes it learned from, so it is a highly plausible next thing to say. The practicum student filled the gap with convention. For a behavioral health clinician, this single insight should permanently reframe AI output: every sentence is a plausibility claim, not a truth claim. Plausibility is the model's product. Truth is your job, and your signature attests to it.
Training Data: Where the Fluency Came From, and What It Smuggles In
The model's next-token instincts come from training: processing enormous quantities of text, much of the public internet, books, articles, and for clinical scribes, additional fine-tuning on documentation-style material. Training is where the practicum student did all that reading. It is why the model knows what a BIRP note's Behavior section sounds like, how medical-necessity language is phrased, and that a plan section usually ends with a follow-up interval.
Three consequences matter clinically. First, the model's knowledge is general, not particular. It learned what clients-in-general say and what clinicians-in-general write. It has zero training on your client, your intake, your treatment plan, your last twelve sessions, unless you put that material in front of it, and even then it only sees what you provide in the moment. Second, training data has a cutoff and a bias: the model absorbed the documentation conventions, diagnostic framings, and cultural assumptions present in its sources, including their blind spots, a problem this program treats fully in the lesson on bias in mental health AI. Third, and this is the compliance edge: with some consumer tools, your inputs can become training data for future models. That is why the free tier of a general-purpose chatbot is a different animal from a HIPAA-oriented scribe operating under a Business Associate Agreement with a zero-data-retention commitment. The question "does my text teach the model?" is a contract question, and it is one of the first things this program will teach you to read in a vendor agreement.
Back to the analogy: the student's brilliance came from reading everything, but everything includes mediocre notes, outdated framings, and conventions from settings nothing like yours. The student's defaults are the field's averages. Your client is not an average.
Context Window: The Only Thing the Model Knows About Your Client
If training is the student's education, the context window is the student's desk. The context window is the bounded amount of text the model can consider at once: your prompt, your shorthand, any transcript or instructions you provide, plus what it has generated so far. Whatever is on the desk, the model can use. Whatever is not on the desk does not exist. There is no filing cabinet behind the student, no EHR access, no memory of the note you generated yesterday (in most tools, each request starts fresh unless the product deliberately re-supplies prior material).
This is the single most clinically important concept in this lesson, so sit with it. When Maria's scribe drafts a note from her four lines of shorthand, the model knows exactly four lines about a human being Maria has known for fourteen months. It does not know the trauma history, the F43.10 diagnosis, the safety plan from March, the medication change two weeks ago, or that this client minimizes. Every sentence in the output beyond those four lines is imported from the field's averages, not from the client's life. The note will look like it knows the client. It knows a desk with four lines on it.
The context window also has a hard size limit, which produces a sneaky failure mode: with very long inputs, a full 53-minute session transcript plus instructions, material can effectively fall off the desk, and details from early in the session get compressed, blurred, or dropped in the summary. The disclosure that matters most in a psychotherapy session often arrives in the last seven minutes, but the model has no concept of clinical salience, only of textual pattern. You, reading the draft against your memory of the session, are the salience check. That is not a courtesy review. It is the job.
The model's entire knowledge of your client is whatever you placed on its desk in this moment. Everything else in the note is the field's averages wearing your client's name.
Temperature: The Dial Between Rigid and Inventive
One more piece completes the mental model. At every next-token step, the model holds a ranked list of plausible candidates. Temperature is the setting that controls how adventurously it samples from that list. At low temperature, the model almost always takes the top candidate: output is consistent, conventional, repeatable, the student writing the most standard possible note. At higher temperature, the model samples more freely from lower-ranked candidates: output is varied, more "creative," and less predictable, the student getting stylish, and occasionally getting inventive with facts.
You usually cannot see this dial in a commercial scribe; the vendor sets it. But the concept explains two things every clinician notices. First, why the same shorthand can yield a differently worded note on a second run: generation is sampling, not retrieval. There is no canonical "correct note" stored anywhere being fetched; there is a fresh roll of weighted dice each time. Second, why "creative" settings and clinical documentation are a bad marriage: in a psychoeducation handout, varied phrasing is charming; in a progress note, an inventive flourish can become a clinical claim you never made. Documentation tools should behave like the low-temperature student: boring, conventional, and close to the provided facts. When evaluating vendors later in this program, "how is generation constrained to my input?" is a question worth asking, and the vendor's answer tells you how much of their product is the student and how much is the dice.
The Worked Example: Four Lines of BIRP Shorthand Into a 90834 Note
Now run the whole machine end to end. Maria's 4 PM session was a 45-minute individual psychotherapy session, billed as CPT 90834. Her shorthand, typed at 4:48 PM between clients: "B: tearful re: work conflict w supervisor, slept 4-5 hrs. I: CBT thought record on 'I'll be fired,' challenged catastrophizing. R: engaged, generated 2 alt thoughts, mood brightened end of session. P: continue thought records daily, next wk."
She prompts the scribe: "Write a BIRP progress note for a 45-minute individual psychotherapy session (90834) from this shorthand. Use only the facts provided. Do not add symptoms, assessments, or interventions not listed." The model tokenizes her shorthand and instruction onto its desk, then generates token by token. "B:" in a BIRP frame makes "Client presented as tearful" a near-certain continuation; "slept 4-5 hrs" pulls in clinical sleep phrasing; "thought record" summons the standard CBT description the model has seen thousands of times. Eleven seconds later: a clean, structured note expanding her 40 words into 200.
Now the audit, and this is the part that earns her signature. Reading the draft, Maria checks each sentence against the session and finds the expansion mostly faithful, plus two imports from the field's averages: the Response section says "Client denied suicidal ideation", never asked, never said, but statistically common in notes about tearful clients, and the Plan adds "Client will practice sleep hygiene techniques", a plausible companion to "slept 4-5 hrs" that she never assigned. Neither sentence is a malfunction. Both are the mechanism working as designed: gaps filled with convention. She deletes the SI line (and separately notes, clinically, that sleep loss plus tearfulness means she will assess directly next session, her determination, made by her, never the model's), corrects the plan, adds the time-in-session detail the payer expects, and signs a note that is now both fluent and true. Total time: four minutes instead of seventeen. The five hours a week come back, but only because the four-minute review is non-negotiable.
The Failure Modes, Named
The mental model gives you the complete list of what the LLM structurally lacks, and every later lesson in this certification builds on it. No clinical knowledge of your client: nothing exists outside the context window; history, diagnosis, dynamics, and the meaning of this client's silences are all absent unless supplied, and even supplied facts are just text on the desk, not understanding. No mental status exam: the model never observed affect, grooming, psychomotor activity, or thought process; any MSE-flavored language in a draft generated from thin input is convention, not observation. No history: no memory across sessions in the clinical sense; the longitudinal picture, the deterioration only visible across six weeks, lives in your chart and your mind, not in the model. No risk assessment: the model cannot assess what it cannot know, and risk lives in tone, history, means, intent, and the relationship, none of which are tokens. State the guardrail again because it can never be stated enough: AI never scores the CSSRS, never assigns a risk level, never makes the duty-to-protect determination under statutes like California Civil Code ยง43.92, and never makes a mandated-report call. The clinician makes every one of those determinations; the model may format the documentation after the determination is made.
Add the mechanical failure modes the concepts predict: hallucination (plausible gap-filling presented confidently), compression loss on long transcripts (the last-seven-minutes problem), run-to-run variation (sampling, not retrieval), and inherited bias from training data. None of these are bugs a vendor patch will eliminate, because each one is the flip side of the very mechanism that makes the tool useful. The practicum student's fluency and the practicum student's ignorance are the same trait viewed from two sides. You did not hire the student to know your client. You hired the student to type, and you kept the clinical mind, the review, and the signature.
This is also why the mental model is the best anti-hype equipment you can carry into a vendor demo. When a salesperson says the AI "understands the session" or "recognizes deterioration," you can now translate: it predicts plausible clinical text from the material on its desk. Sometimes that prediction is useful enough to feel like understanding. It is not understanding, and the gap between the two is exactly the territory your license covers.
The Applied Problem: The Annotated Shorthand-to-Note Test
Your artifact is the Annotated Shorthand-to-Note Test: a one-page document proving, with your own clinical material, that you can predict and catch an LLM's failure modes. You will reuse it when piloting any scribe, and it doubles as a training exhibit for supervisees and consultation group.
Step one: write four lines of BIRP shorthand from a recent session, fully de-identified, no name, no initials, no dates, no identifying details, or use a composite. Keep it as thin as your real 9:54 PM shorthand would be; the thinness is the test. Step two: before generating anything, write three predictions of where the model will import the field's averages: which section will gain an unstated client response, which plan item might appear unassigned, which conventional safety phrase might materialize. You are predicting the hallucinations from the mechanism, the way you predicted the practicum student's gap-filling. Step three: run the prompt, in a tool appropriate for the data you are using (de-identified content only, unless you are inside a BAA-covered scribe): "Write a BIRP progress note for a 45-minute individual psychotherapy session (90834) from this shorthand. Use only the facts provided. Do not add symptoms, assessments, or interventions not listed."
Step four: the verification pass. Print or paste the output and annotate every sentence with one of three marks: F (faithful: traceable to your shorthand), C (convention: imported from the field's averages, must be deleted or verified against your memory of the session), or M (missing: something clinically necessary, like time-in-session or the measure score, that the model could not know and you must add). Score your three predictions: each hallucination you called in advance is evidence the mental model is installed. Step five: write a closing paragraph, four sentences, in your own words, explaining each C-mark using the vocabulary of this lesson: which gap the token-prediction filled, why the context window guaranteed the model could not know better, and what your review caught that no temperature setting would have prevented.
"Done" looks like this: a single page with shorthand, predictions, annotated output, and explanation, that you could hand to a skeptical colleague as a live demonstration of both the tool's value (four minutes versus seventeen) and its boundaries (the C-marks). If your annotated page has zero C-marks, run it again with thinner shorthand; an audit that finds nothing is usually an audit that has not looked. File it, dated, beside your Consultation-Group Paragraph from the last lesson. Your governance file now has two entries.
Key Takeaways
- The controlling mental model: an LLM is a brilliant practicum student who has read millions of clinical documents and has never met your client. The fluency comes from the reading; the danger comes from the never-met-your-client part, and both are permanent features, not bugs awaiting a patch.
- Generation is next-token prediction: the model repeatedly asks "what plausibly comes next?" and answers from learned patterns. Every sentence is a plausibility claim, not a truth claim, which is why confident fabrications (hallucinations) like an unasked "denied SI" are the mechanism working as designed.
- Training data made the model fluent in clinical convention but only in the general, never in your particular client; it also carries the field's biases and averages. With some consumer tools, your inputs can become training data, which is why a BAA and a zero-data-retention commitment are contract questions you learn to ask, and why free-tier chatbots are a different animal from HIPAA-oriented scribes.
- The context window is the desk: the model's entire knowledge of your client is what you place in front of it right now. No history, no chart, no memory of last session, no MSE, no relationship. Long transcripts can lose early or subtle material, and the model has no concept of clinical salience, so the clinician is the salience check, especially for the disclosure that arrives in the last seven minutes.
- Temperature is the dial between conventional and inventive output, and it explains why the same shorthand yields different notes on different runs: generation is weighted sampling, not retrieval of a stored correct answer. Documentation tools should be boring and input-constrained; ask vendors how generation is tied to your facts.
- The structural failure modes to memorize: no clinical knowledge of your client, no MSE, no history, no risk assessment, plus hallucination, compression loss, run variation, and inherited bias. AI never scores the CSSRS, never assigns a risk level, never makes the duty-to-protect or mandated-report determination; the clinician decides, and the model formats only after the determination.
- The artifact is the Annotated Shorthand-to-Note Test: de-identified shorthand, three predicted hallucinations, the constrained prompt, an F/C/M annotation of every output sentence, and a mechanism-based explanation. It proves the mental model is installed, demonstrates the four-minutes-versus-seventeen payoff, and joins your growing AI governance file.
Skill.re