LLM Analog Clock Test
05/03/2025 10:18 AM MST
AI, LLMs
Hello everyone, I thought I'd make a post here regarding my number one test question for coding LLMs lately:
"Please generate an html file with css and javascript embedded which implements an analog clock display. It should display the current system time. Make sure to add hour labels around the clock. Also, there should be a digital read-out below the analog clock, and a light and dark mode toggle."
This prompt tests spacial understanding to solve, as well as basic trigonometry. So far I have yet to find a small model able to solve this on my machine locally in one shot. Qwen3-30b a3b comes closest (but required manual correction to work.) I decided to enhance the test for more powerful LLM models (in this case, ChatGPT) with further refinements to the prompt to achieve this result. The user's timezone and time are shown in the upper middle clock but it can be configured per clock to whatever the user wants.
Here's Gemini 2.5 Pro Experimental one shotting it:

Here's what DeepSeek r1 comes up with:

Grok 3 does pretty well with this as well.

Claude 3.7s result doesn't look too great
