Lecture Notes: Rethinking Research Visualization in the AI Era
From passive reading to interactive, end-to-end reconstruction
Introduction: Cognitive Friction and the Bridge Between Us
In the previous chapter we looked at how AI drives scientific discovery as a “fourth paradigm”. The more practical bottleneck is this: how can our human brains read and understand what AI produces, efficiently?
We face a degree of cognitive friction we have not had before. It comes from the large gap between how humans and machines fundamentally process information.
Structured logic and linear streams
AI (especially a large language model) is a probabilistic prediction engine, and its output is forced into a linear stream of text. It is best at producing structured languages (JSON, Python, HTML, XML), and nested brackets or deep hierarchies do not bother it.
Visual perception and pattern recognition
Humans are visual animals. We process images, colour, spatial layout and interaction far faster than plain text.
- Reading long stretches of plain text takes a lot of effort, especially unformatted data or code.
- That effort slows research down and makes it easy to miss insights.
The core mismatch: AI produces “dense code and text”, while humans want “high-bandwidth visuals and interaction”.
The way out is to translate the structured code AI is good at, in real time, into a visual experience that people grasp more easily. That bridge is HTML + the browser.
The Internet’s Gift to Science
To see why HTML makes sense as the core medium for research visualization, it helps to look at where it came from: Web technology was created in the first place to serve scientific communication.
Physicist Tim Berners-Lee invented HTML to fix a real problem: papers came in incompatible formats and information could not be shared. Origin: built for scientific communication
John Gruber created Markdown to make writing HTML simpler. It has become the default format for AI output.
Google released the very fast V8 engine, and the browser grew into something close to an operating system.
D3.js (2011) made data move on web pages;
Vue.js (2014) let developers assemble complex applications from building blocks.
You no longer need to write V8-level JavaScript or Vue syntax by hand. A natural-language prompt is enough to draw on all of this history and generate research tools.
1.2 Markdown vs. HTML: What’s the Difference?
You have seen it before: asterisks in **key point** and hashes in # Heading are markup. It is the default format every AI model uses for text output.
What it is: a combination of structure, presentation and behavior. AI can generate HTML easily, and the browser turns it straight into interactive software.
The Spectrum of Visualization Tools: Finding the Middle Ground
Research visualization has a whole spectrum of tools. Knowing where each one stops is the first step to choosing the right one.
2.1 Base layer: Markdown (the scratch pad)
The format you see most often when chatting with ChatGPT, and the default output of today's AI.
# Introduction to immune checkpoint blockade
PD-1 inhibitors can reactivate
exhausted T cells.
- nivolumab
pembrolizumab
PD-1 inhibitors can reactivate exhausted T cells.
- nivolumab
- pembrolizumab
2.2 Rigor layer: Python / R (the printing press)
The plotting tools most often used for journal figures (Matplotlib, ggplot2).
import matplotlib.pyplot as pltgroups = [“CR”, “PR”, “SD”, “PD”] values = [12, 25, 18, 9]
plt.bar(groups, values, color=“#3b82f6”) plt.ylabel(“Patients”) plt.title(“Response to PD-1 Blockade”) plt.tight_layout() plt.show()
A static PNG / PDF embedded in the article.
2.3 Core layer: HTML + JS (the dashboard)
The focus of this course, and the often-overlooked "middle ground".
- Collapse: keep the main view clean.
- Filter: find the data you care about instantly.
- Respond: show values on hover, zoom by box-selecting.
Why it matters: it is a container for thinking, and gives the best experience for exploratory data analysis (EDA).
<div id="response-dashboard">
<select id="group-filter">
<option value="all">All patients</option>
<option value="responder">Responders (CR+PR)</option>
</select>
<div class="bar" data-type="CR">CR: 12</div>
<div class="bar" data-type="PR">PR: 25</div>
<div class="bar" data-type="SD">SD: 18</div>
<div class="bar" data-type="PD">PD: 9</div>
</div>
In Practice: Interactive Reconstruction Across the Whole Workflow
Theory has to serve practice. Below are 5 scenarios you can use right away, each with steps and a prompt you can copy directly.
Rather than accept the layout as given, take the paper apart and reassemble it: if there is a web version, right-click and choose View Page Source, hand that HTML to an AI, and ask it to rebuild the content as an HTML reader that suits the way you read.
The source already contains the image URLs, heading structure and so on, so one conversion gives you a reading page with larger type, more white space, and figures next to the text that discusses them.
Even without the web source, or if you simply prefer copying text from the PDF, you can ask the AI to re-lay it out as "key points as a list + wider line spacing + important sentences in bold". Lower information density and clearer emphasis make long papers much more comfortable and faster to read.
Steps
- 1 Open the paper's web (HTML) version, right-click on an empty area and choose View Page Source.
-
2
Press
Ctrl+Ato select all andCtrl+Cto copy. - 3 Open Gemini/ChatGPT and enter the prompt on the right.
- 4 When the AI replies "please paste the code", paste the source you copied.
AI Prompt (copy as is)
Immune checkpoint blockade (example)
Recent studies show that
PD-1
Programmed cell death protein 1
Tumour cells evade attack by the immune system by binding PD-1 on T cells.
inhibitors can reactivate exhausted T cells and markedly improve outcomes in metastatic melanoma. Click
for a schematic.
Schematic placeholder
Figure 1: Blocking PD-1 signalling restores T-cell function in the tumour microenvironment.
✨ Bonus: an academic explainer powered by Gemini
Not sure what a passage means? Paste it here and let Gemini write a plain-language explanation for you.
Which prompt for which task?
- · Basic layout (re-laying out one paper, a first try): use "1. Paper-to-web-page prompt (basic)".
- · Deeper rebuild (TOC, term tooltips, figures beside text): use "2. Paper rebuild, improved (main one)" or "13. Paper rebuild, revised".
- · Popular-science / WeChat article rewrite: use "23. Paper rebuild (WeChat article)" or "24. AI article rebuild".
- · Gemini-specific version: use "22. Paper rebuild (Gemini 3 version)".
Jump straight to the prompts in Notion
Each link opens the corresponding entry in a new tab, ready to copy and adapt (the prompts themselves are in Chinese):
Anatomy of a prompt: what paper-rebuild prompts share
- System role: e.g. "front-end engineer + medical expert", so the AI understands both layout and the domain.
- Input description: tell the AI whether it will receive HTML source, Markdown, or plain paragraphs.
- Output structure: state which modules you need, such as "single-file HTML", "TOC", "figures beside text", "term tooltips".
- Constraints and safety: stress that it must not invent data or change what the figures mean; it only re-lays out and adds explanations.
- Interaction and style: specify font, colours, white space and mobile support, so you end up with a reusable "visual template".
3.2 Rethinking presentations: from static PPT to interactive slides
HTML slides built on Reveal.js are simply a web page: a single
index.html plays in any modern browser without special software, and is easier to keep and share long-term through Git or cloud storage.In this mode you only give the AI an outline + the key content blocks in words (e.g. "code example", "interactive results chart"), and it writes a complete deck with transitions, code highlighting and Plotly chart placeholders.
For a journal club or lab meeting, this frees you from the cosmetic work of fixing slides. You can spend the time on the logic and on choosing the key figures, and still get a more modern presentation that works well for sharing online.
Steps
- 1 Prepare your talk outline (a simple Markdown list).
- 2 Send the prompt on the right to the AI.
-
3
Save the generated code as
presentation.html. - 4 Double-click to open it and press the space bar to advance.
AI Prompt (copy as is)
Exercise: have AI help you read code
These notes already include several small HTML + JS apps (the Reveal slides, the GCS calculator and so on). I suggest you work backwards from these examples: use a dedicated code-reading prompt and ask the AI to turn the code into a human-friendly tutorial.
- 1 Copy a piece of front-end code from these notes or your own project (a component or a small tool both work).
- 2 In your AI tool, send the code-reading prompt first and wait for it to reply "please paste the code".
- 3 Paste the code and ask the AI to explain it along three lines (module structure / data flow / interaction logic) and to suggest changes you can make directly.
Recommended code-related prompts
Tip: use a code-reading prompt first to understand an existing demo, then use the "front-end engineer / AI research engineer" prompt to have the AI build a small tool of your own from scratch (a new scoring scale, an experiment logger, and so on).
3.3 Rethinking concepts: from static diagrams to living models
Mermaid.js lets you "draw with text": you describe the nodes and arrows in something close to natural language (what points to what, where a branch happens), the AI writes standard Mermaid code, and the browser renders it as a vector diagram.
The benefit is that the diagram's source of truth is no longer the picture but the text logic behind it. When your protocol changes, you edit a few lines and the diagram updates itself, with no manual alignment or layout.
For complex concepts (multi-step signal transduction, clinical stratification pathways and so on), this "text as model" approach is especially good for quick iteration and discussion in lab meetings or class.
Steps
- 1 Work out the logic you want to show (a signalling pathway, a diagnostic workflow).
- 2 Send the prompt to the AI.
- 3 The AI returns a piece of HTML that contains Mermaid code.
- 4 Open the HTML and the diagram draws itself. To change the logic, edit the text; no redrawing.
AI Prompt (copy as is)
style Wet_Lab fill:#e0f2fe,stroke:#3b82f6 style Dry_Lab fill:#f3e8ff,stroke:#a855f7
3.4 Rethinking logic: from passive lookup to tools built for you
With a reactive framework such as Vue.js, we can have the AI turn these rules into small tools: change an input and the score and risk message update immediately; when the total crosses a threshold, the background turns red and a warning appears.
More importantly, each of these tools is a single HTML file. You can save it offline on a phone or tablet and open it on the ward, in clinic or at a meeting. When a rule changes, you edit the logic in one place and everyone gets the same version of the decision support.
Over time, this lets each clinician and researcher build up a small toolkit specific to their own project or field, rather than a pile of scattered screenshots and notes.
Steps
- 1 Pin down your calculation logic (e.g. A+B=C; if C>10, raise an alert).
- 2 Send the prompt to the AI.
- 3 The AI generates a single HTML file containing the calculation logic.
- 4 Save it to your phone or computer and use it offline whenever you need.
AI Prompt (copy as is)
3.5 Rethinking knowledge: from textbooks to a multi-step flashcard pipeline
Book images / PDF → Markdown text → structured knowledge extraction → ANKI / USMLE flashcards
Each step is handled by its own system prompt, which cuts out mechanical repetition while keeping as much of the original's rigour as possible.
Steps (suggested workflow)
- 1 Use 20. Book images to Markdown to turn scanned textbook pages or question-bank screenshots into clean Markdown.
- 2 Use a paper-rebuild prompt (e.g. "2. Paper rebuild, improved", "13. Paper rebuild, revised") to organise the structure: extract the section hierarchy and mark key points and frequently tested topics.
- 3 Pass the organised content to the USMLE / ANKI prompts (5 / 6 / 8 / 21 / 17-19) to generate layered, self-contained cards as JSON or as text you can import directly.
- 4 Use 10. USMLE tutor or another tutor-style prompt to quiz you on the cards regularly: weekly review plans and mock oral exam questions.
Recommended prompt set (click to open)
② Take into account local resistance surveillance data and local epidemiology;
③ Adjust the dose and choice of drug for the individual patient, e.g. renal function and allergy history.
Tip: with the ANKI/USMLE prompts above, you can turn a whole chapter into self-contained cards in this style in one batch.
Appendix: My Prompt Library (AI Studio)
The small window below embeds, live, the Prompts List table I keep in Notion. It collects the system prompts and task prompts used in this course (the prompts are written in Chinese).
- Tags such as html / code / knowledge / agent match the main threads of these notes: rebuilding papers, reading code, flashcards (USMLE / ANKI), and multi-step agents.
- While reading, you can filter the table by tag, copy the prompts that suit you into your AI tool, and refine them over time.
- When I add new cases to the notes, I only need to add rows in Notion and they show up here automatically, so the library keeps growing.
- Academic mentor (long-term companion): 9. AI professor guidance.
- Exam coach (USMLE / licensing): 10. USMLE tutor + 21. ANKI_USMLE essentials.
- Front-end engineer (visualization helper): 12. Front-end engineer, turns ideas into small HTML tools.
- Knowledge engineer (card factory): 11. ANKI engineer, generates structured cards from text in bulk.
Note: if the embedded window does not load because of browser or network settings, click "Open in Notion" on the right.
Closing: Be the Product Manager of Your Own Knowledge
Looking back over the history of science, each change in tools has brought a jump in how efficiently we understand things: from hand-copied manuscripts to printing, from static PDFs to today’s interactive HTML. In the AI era, natural language is a programming language.
Welcome to a new way of doing research visualization.