Back to AI & ML The Lab

Models and agents, live in your browser

Working demos, not screenshots. The sentiment model, the word predictor and the agent animation run on your device, and nothing you type into them leaves the browser. The voice assistant is the one exception: it runs on ElevenLabs, as its own notes explain.

Live Lab

Try a model in your browser

A small CNN trained on movie reviews, running entirely on your device, with no server and no upload. Type a sentence and the model classifies its sentiment in milliseconds. The model (about 10 MB) downloads only when you start typing or pick a sample.

Awaiting input. Try a sample or type your own.
Model
sentiment-CNN v1
Size
about 10 MB, loads on first use
Inference
not run yet
Runtime
TensorFlow.js · WebGL
Under the hood
  1. Tokenise: split your sentence on whitespace and look up each word in a 20k-word vocabulary.
  2. Encode: map words to integer indices, pad or truncate to length 100.
  3. Inference: feed the sequence through a small CNN (embedding → conv → global max pool → dense).
  4. Decode: the output is a single value from 0 to 1, and closer to 1 is more positive.

Model and vocabulary are fetched from the public TensorFlow.js model host on first use, then cached by your browser. No data leaves your device. The whole forward pass runs on your GPU via WebGL.

Video tours

  • A portfolio you can listen to and talk to

    Narration, a voice assistant and a voice picker on paulmartinmcneill.com 1:16

    Transcript

    Paul McNeill's portfolio is built to be heard as well as read. The main pages have a short recorded narration, with the full transcript one tap away.

    The narration uses an AI voice made with ElevenLabs, and every player says so. It is not Paul's voice.

    The site's text assistant can be used by voice too. Press the microphone and speak; the question appears as you talk, and the reply can be read aloud.

    Visitors can choose that voice, the same way they choose the colour and the font. The picker lists the voices on their own device, with a speed control and a preview, and the choice is remembered in their browser.

    On the Lab page there is also a live voice assistant. It answers questions about Paul's work from a fact sheet taken from the site, and says it is not Paul. Nothing from ElevenLabs loads until the visitor presses the button.

    All of it is plain HTML, CSS and JavaScript on a static site. Speech recognition and the voice picker use speech features built into the visitor's browser, and the site still works with no sound at all.

  • Four AI demos in one web page

    A sentiment model, a word predictor, a voice assistant and an agent animation 1:08

    Transcript

    The Lab on Paul McNeill's portfolio holds four working demos. Three of them run entirely on the visitor's device.

    First, a sentiment model. It is a small public example model from TensorFlow.js, trained on movie reviews. Type a sentence and it scores how positive it is, inside the visitor's browser, with nothing they type sent to a server.

    Second, the word board from Voice, Paul's AAC app. It runs the app's real prediction engine, so the suggestions and their reasons match the app.

    Third, a live voice assistant built with ElevenLabs. This is the one demo that uses a server: what the visitor says is sent to ElevenLabs, and the page explains that before anything loads.

    Fourth, an animation of how a research agent works through a task: input, planning, tool use, memory, synthesis and output. It is an illustration of the pattern, not a live agent.

Narrated with an AI voice made with ElevenLabs. It is not Paul’s voice. Captions are part of each video, and every one has a transcript.

Ask about Paul’s work, by voice

A live AI voice assistant that answers questions about Paul’s projects, research and the Voice app, from a fact sheet taken from this site. It is not Paul, and it says so. You can also type instead of speaking.

  • Runs on ElevenLabs. What you say is sent to ElevenLabs to be transcribed and answered; nothing loads from ElevenLabs until you press the button below.
  • Audio is not kept. The text transcript is kept for 30 days so Paul can check the answers, then deleted.
  • Conversations are limited to four minutes, and the assistant has a small daily allowance, so it may sometimes be unavailable.

Try the word prediction

This is Voice's core board and its word-prediction engine: the same code the app ships, running in this page with no server and no AI service. Tap words and watch the suggestions change. Each one says why it was offered.

To see it learn, switch on Learn from my messages, build a message such as I want + Grandma (type the name), press Speak two or three times, then clear and start again. Your words now appear among the suggestions, with a coloured border. Use × to stop a suggestion appearing after a word, and Forget to remove what it learned. Everything stays in this tab and is gone when you reload.

Switch on Natural voice to hear common phrases, such as I want to go home, in a recorded voice made with ElevenLabs. Other messages use your browser’s own voice.

The interactive board needs JavaScript. The full app demo below shows the same board.

How it works: a trigram model with absolute discounting, built from 666 sentences written for Voice (about 34 KB), merged with an optional personal layer whose counts halve every 45 days, then reordered by a small seven-feature ranker. Each set of suggestions takes well under a millisecond on a desktop computer. Read the prediction code.

Read the Voice case study, with the full app and caregiver dashboard demos.

In motion

See how an agent thinks

Hand-rolled animation of a research agent: input, planning, tool use, memory, synthesis, output. Auto-plays once when it scrolls into view.

  1. User input

    "Analyse this quarterly report and summarise the key findings."

  2. Planning

    Decompose into sub-tasks:

    • Extract text
    • Identify sections
    • Analyse financials
    • Detect trends
  3. Tool selection

    Choose tools for each sub-task:

    • document.parse
    • nlp.classify
    • chart.render
  4. Execution loop

    Call each tool, capture output:

    • document.parse(report.pdf) → 28 pages, 14 tables
    • nlp.classify(sections) → 4 categories
    • chart.render(trends) → 3 charts
  5. Memory

    Findings stored in working memory:

    Revenue +12% YoY Cost ratio improved EMEA outperformed
  6. Synthesis

    Combine findings into a coherent narrative; check against the original prompt.

  7. Output

    "Q3 revenue grew 12% YoY driven by EMEA. Margin improved 180bps as cost ratios fell. Forecast a softer Q4 on currency drag."