Ch 3 · How the CodeArc AI Tutor Works · AI & LLM Literacy
Topic 3 of 7 in AI & LLMs — How They Actually Work — 2 lessons.
Your Question Becomes a Prompt
When you ask the CodeArc tutor for help, it doesn't think about you — it packs your stuff into one big block of text called a prompt and sends it to an LLM, which predicts a helpful reply. The prompt usually bundles three things:
No Memory & the Context Window
Two things surprise people most: an AI model has no memory between chats, and it can only read a limited amount of text at once, called its context window. The example simulates that limit with fit_to_window, which keeps only the last 40 characters of a 72-character prompt. Notice what gets trimmed: the lesson and the code at the start are gone, and anything outside the window is never seen, which is why a long conversation can make the tutor seem forgetful.