under the hood

Anatomy of a book rating

When a service says a book is “Sexual Content: 4 of 5,” it shows you the 4. It does not show you where the 4 came from. Here is the entire path, with the real input and the real output from a live model. Watch how little is actually under the hood.

every block below is verbatim · nothing staged · model output captured locally, 2026-07-21

  1. the input
    What the machine is given

    Not the book. It never sees the book. It gets a title, or at most a couple of sentences of description. Here is everything it was handed about Gender Queer:

    input textGender Queer: A Memoir by Maia Kobabe. An autobiographical graphic novel about the author's journey of self-identity from adolescence into adulthood, exploring being nonbinary and asexual, gender identity, and coming out to family and society.
  2. the method
    What it’s asked

    This paragraph is the entire “methodology.” No rubric it consults, no reviewer, no committee, no reading. Just this request, typed in plain English, the same way you’d message a chatbot. (Where it says “a JSON object,” that just means a tidy, labeled list of answers, the curly-brace block below.)

    prompt, verbatimYou are a book content rating service. Rate the book below. Respond with ONLY a JSON object, no other text, with these keys: "sexual_content" (integer 0-5), "violence" (integer 0-5), "profanity" (integer 0-5), "min_age" (integer, minimum recommended reader age), "recommendation" (one short sentence). 0 means none, 5 means most severe/explicit. BOOK: Gender Queer: A Memoir by Maia Kobabe. An autobiographical graphic novel about the author's journey of self-identity from adolescence into adulthood, exploring being nonbinary and asexual, gender identity, and coming out to family and society.
  3. the machine
    What answers

    A model is a file of numbers that predicts the next word, then the next, one at a time, the same “guess the next word” trick from the lesson, just run once instead of a billion times. It may have read about this book somewhere in its training. It is not reading it now. It is producing plausible-looking text, the way it produces any text. There is no lookup, no database of “book facts,” no page it turns to.

    Talking to an AI is just sending it a text message, the same as texting a person. Here is the whole exchange, everything that goes out, and everything that comes back. Nothing else travels with it: not the book, not a database, not the internet.

    what you send
    You are a book content rating service. Rate the book below… BOOK: Gender Queer: A Memoir by Maia Kobabe. An autobiographical graphic novel about the author’s journey of self-identity…
    The book itself is not attached, only this short paragraph about it.
    the model reads that text word by word, then types a reply
    what comes back
    { "sexual_content": 1, "violence": 0, "profanity": 1, "min_age": 16, "recommendation": "…" }
    Another chunk of text. A script keeps one number for the box.
  4. the output
    What comes back

    This is the actual response, character for character. It is generated text, not a record retrieved from anywhere:

    raw model output{ "sexual_content": 1, "violence": 0, "profanity": 1, "min_age": 16, "recommendation": "Suitable for mature readers aged 16 and above." }
  5. the reveal
    What you’re shown

    A script reaches into that text and lifts out one number. That single digit goes on the box. The sentence, the other scores, the “reasoning,” all of it is thrown away.

    the box shows: Sexual content — 1 / 5. You see this digit. You see none of the four steps above it.
  6. the tell
    Run it again

    Same input. Same prompt. Same model. Same settings. Nothing changed but the roll of the dice inside the machine. The number is different:

    run 1 → 1{ "sexual_content": 1, "violence": 0, "profanity": 1, "min_age": 16, "recommendation": "Suitable for mature readers aged 16 and above." }
    run 2 → 2{ "sexual_content": 2, "violence": 1, "profanity": 1, "min_age": 15, "recommendation": "Suitable for mature readers aged 15 and above." }
    The score is a sample, not a measurement. Ask again, get a different answer, from the same machine on the same book.
  7. the seams
    When it quietly breaks

    a score vanishes into a typo

    A small model was asked the same thing. It misspelled its own JSON key, profaniity. The extractor found no profanity, so that score silently disappeared, no error, no flag. On the box it would read blank or zero, and no one would know a number went missing to a spelling mistake:

    raw output, TinyLlama{ "sexual_content": 5, "violence": 3, "profaniity": 4, "min_age": 18, "recommendation": "Reading this book can help someone who is struggling with their identity to come out and accept themselves." }

    The JSON itself was readable, so nothing “crashed.” That’s the point: a score can go missing to a spelling mistake with no error and no warning, and the box just shows one fewer number than it should. (The Goodnight Moon board-book rating, a 4 out of 5 recommended for a three-year-old, lives on the comparison page.)

The rating on the box is one digit, lifted out of step four, on one roll of the dice, from a machine that never opened the book. All seven steps are the rating. The digit is just the part they let you see.