AI Features in Software
Why Smarter. Courses on building with LLMs usually end where the hard part starts: a model answers a prompt in a notebook, and the answer is printed. Putting that model inside a product, where its answer decides what thousands of people see, raises questions a notebook never does. What may the model choose from? Who checks its answer, and what happens when it’s wrong? Where does its prompt live, who pays for it, and who can turn it off? Smarter’s web console answers all of them in one small, cheerful, fully open source feature: the Doodle, the illustration on the sign-in page, which two Smarter LLMClients choose and draw every day. How Two Smarter LLMClients Create the Sign-in Page’s Daily Doodle tells its story. The stakes are low enough to let the models make real decisions, and visible enough that each one has to be right:
The feature works without the AI. A calendar of reviewed artwork chooses each region’s doodle a week ahead, and the LLMs only improve on it: planner.py.
The AI parts are configuration. The editor, the artist and their judge are SAM resources in YAML, with their own models, prompts and Guardrails, which the platform’s code prompts through the chat api like any client: prompting.py.
A menu, not a blank page. The editor chooses from a JSON list of candidates, and code checks every choice again: editor.py.
A second model as judge. An
llm_judgeGuardrail checks the tone that word lists can’t, and fails closed: upbeat-occasion-input.yaml.Generated output is untrusted. The artist’s SVG is cleaned against an allowlist before anyone sees it: sanitize.py.
A person has the last word. New drawings wait for a superuser’s approval in the admin, every prompt is kept, each part has a switch, and the page says when an AI chose its doodle: admin.py.
What the course covers. Deciding which parts of a feature belong to a model and which to code; building the feature’s safe answer first; declaring the AI parts as LLMClients and Guardrails, and prompting them from code; designing the request and the answer as a contract, with a menu of choices and a reason for each; checking every answer in code; filtering what goes into a prompt; judging what code can’t check with a second model; treating generated markup as untrusted; human review, audit trails, switches and disclosure; scheduling, caching and cost; and testing a feature whose models are patched out.
Look at.
apps/doodle/, the whole feature.
llmclient-smarter-doodle-editor.yaml, the editor’s manifest, and its artist.
prompting.py, how the platform’s own code prompts an LLMClient.
smarter-doodle, the React app on the sign-in page.
Each course plan lists every file that it uses under Smarter in the Source Code.
Read. Doodle React Component, Smarter LLM Client, Smarter Guardrail, How Two Smarter LLMClients Create the Sign-in Page’s Daily Doodle, LLM Guardrails in YAML: How Smarter Declares, Orders and Audits Them, Django-React Integration.
Exercises.
Open the Smarter Doodle Editor in the workbench, click one of its example prompts, then edit the request to tempt it off the menu. Which of your attempts would
check_decision()have caught?Read the three Doodle commits in order, and list what the feature could do after each one without any LLM at all.
Feed
sanitize_svg()the saveddangerous.svgfrom the tests, and explain what each removed element or attribute could have done on the sign-in page.Write an
llm_judgeGuardrail for a feature of your own, and find an input that it gets wrong. Should the feature fail open or closed?Turn the Doodle’s switches off one at a time on your own platform, and describe what visitors see each time.
Course plans. Three complete, ready-to-teach plans, each with a schedule, graded assignments and rubrics, two capstone projects, recommended texts, further study and technical prerequisites. See Course Formats and Grading for what the formats have in common. The Building AI Applications course builds LLMClients without code, and this one puts them into code. The AI Application Development Master Class goes further, into the platform that runs them.
See the Smarter Instructor Guide to install Smarter and set up a class.