Local Language Model
A locally-hosted model for narration context and the Seismic Chat interface — no third-party AI provider.
Runtime: Ollama
Intensity Lab uses a locally-hosted open-source language model for two distinct purposes: generating geographic context sentences for animation audio narration (see Text-to-Speech Narration), and powering the Seismic Chat interface where visitors can ask questions about seismology. All inference runs on the Intensity Lab server — no data is sent to any third-party AI provider.
Ollama is an open-source tool for running large language models locally. It manages model downloads, quantization, and a local HTTP inference API compatible with the OpenAI chat completions format. If Ollama is unreachable, audio narration falls back to generic text and the chat endpoint returns HTTP 503.
Model
| Property | Value |
|---|---|
| Model | Meta Llama 3.2 |
| Tag | llama3.2:latest |
| Parameters | 3.2 billion |
| Quantization | Q4_K_M |
| Context length | 128k tokens |
| System prompt | Seismology expert assistant; responses scoped to earthquake science |
The version and quantization in use is recorded here deliberately: as newer local models become available, this page's baseline test (below) is the reference point for comparing response quality against a fixed, standardized question list before switching.
Uses
- Animation audio narration — city enrichment. When generating a narration track for a simulated animation, the model is asked to supply the county name, state classification (city/town), and a notable characteristic for the affected city. This geographic context is validated and normalised before being incorporated into the two-sentence narration script read aloud by the TTS engine. If the model returns an unusable response the narration falls back to generic regional text.
- Seismic Chat. The /chat/ page accepts free-text questions about seismology. Each question is submitted to the model with a system prompt that scopes responses to earthquake science. The chat interface is for general educational questions — all intensity estimates and earthquake data on this site are computed deterministically from USGS ShakeMap and the methods described elsewhere on this page, not generated by the language model.
Standardized Question List & Baseline Results
A fixed set of ten seismology questions is used to test any candidate model before it's deployed — the same questions are re-run against new model versions so results are comparable over time. The run below is the current baseline; the test suite checks only that each response is a non-empty string, so the responses themselves are for reading, not automated grading.
| Field | Value |
|---|---|
| Test date | 2026-06-28 |
| Website version | d53a31e |
| Test suite | tests/test_chat.py (10 questions) |
| Result | 10 / 10 passed |
| Total response time | 12.39 s |
Q1: What is the difference between seismic magnitude and seismic intensity?
Q2: What is the Richter scale?
Q3: What is a Vs30 site condition?
Q4: What different seismic intensity scales exist and which is used in the United States?
Q5: What are some typical observed conditions for seismic intensity level VI?
Q6: How large can earthquakes get?
Q7: What level of shaking is expected from a Magnitude 7 earthquake?
Q8: What is an earthquake focal mechanism?
Q9: What is a ground motion prediction equation?
Q10: Which ground motion prediction equations are commonly used in California and Alaska?
As new local models become available, they will be tested against this same question list and the results compared here.