PC_Workman / blog
Wednesday Code Autopsy · #10

Six Memory Depths, One Dictionary

“Is my CPU hot?” checks the last 5 minutes. “Getting hotter this week?” checks 7 days. One line decides.

By Marcin Firmuga·2026-05-27·2 min read·Wednesday Code Autopsy #10

"Is my CPU hot?" — my AI checks the last 5 minutes. "Is it getting hotter this week?" — same AI checks the last 7 days. One line decides.

Last week I showed how hck_GPT picks a different temperature for every question type — surgeon for facts, friend for small talk. This week: the other hidden dictionary nobody expected.

When you ask your PC something, the answer depends on how far back the AI looks. "Is it hot right now?" needs 5 minutes of data. "Has my fan been loud lately?" needs 24 hours. "Am I running hotter this week?" needs 7 full days. Most assistants either dump everything into the prompt or remember nothing. Mine picks a window.

_CONTEXT_WINDOWS = {
    "hw_cpu_temp":       5,      # minutes
    "health_check":      30,     # minutes
    "temp_trend":        1440,   # 24 hours
    "weekly_comparison": 10080,  # 7 days
}
window = _CONTEXT_WINDOWS.get(intent, 30)
pc_ctx = system_context.build_llm_context_windowed(lang, window)

5 minutes vs 10,080 minutes — in the same dict, the same engine. If someone asks "are you cold right now?" you check how you feel this second. If they ask "have you been cold lately?" you think back over days. Different question, different memory depth. Your brain does it automatically; my code does it with a dict lookup.

Last week: 20 temperatures. This week: 6 memory depths. Same pattern, one dict, one lookup, completely different AI behaviour. And it matters right now — 28 community questions are becoming features this week, and this is one reason those answers will actually make sense: the AI knows exactly how far back to look.

What's the weirdest "simple solution" you've ever built?

BuildInPublicPythonAI
This is the project behind the post. PC Workman is a free, open-source Windows system monitor with an offline AI assistant - everything described here is real, shipped code. Download it or read the source.
← #920 Temperatures in One Line#11 →The Bug That Worked Perfectly for 4 Months
MF

Marcin Firmuga

Solo developer · HCK_Labs · building PC Workman in public

Every edition is written from that week's real commits. Newest posts premiere on LinkedIn - the archive lives here. More about me: my story.