On this page
Lesson notes · Block 1 · Week 1 · The first interface: building UI
Building UI: Design to Code
From Aarav's Friday status report to four lines of Gradio, by way of a vote that lost.
The one thing to keep
You do not choose an interface. You derive it from the output your user needs. Write the ideal input and ideal output first, replay what your user will do with that output, and the interface falls out of the replay. When this lesson was run live, the room voted 17 to 13 for a search box, and one follow-up question about a single word in the plan overturned the vote. Code is the last step, and in Gradio it is four lines that restate the whiteboard.
How to read these notes
This lesson is a design session that ends in code. Most of it goes on the part beginners skip: input, output, golden pairs, a verifier, and the reasoning behind one interface choice. The Gradio part is short on purpose. An FDE's first deliverable at a customer is usually a working interface in front of a real user, and this is how you work out which interface that should be.
Stands on
Your first observation, the verifier idea, the idea of an interface
Observation, hypothesis, one user. Two systems, a common language, a set of rules.
01Before You Start: One Observation, One Real User
The prerequisite for this lesson is one observation, one hypothesis and a conversation with at least one real user. A single interview counts.
Two framing points come before any design. First, you are not married to one observation. Until you commit to one, the more observations you try and the more people you speak to, the better you get at testing your assumptions against the world. Second, that is the skill that matters now. When building becomes a commodity, finding the right users and solving their problem is the part AI cannot yet do. It is also most of an FDE's job: sitting with a customer and finding the process worth building around.
02Start From One Person, Not a Persona
The worked example is Aarav, your first customer: the business analyst at a mid-sized IT company in Pune, sitting at his desk with three tabs open, AI-aware and overwhelmed. The observation behind him: ambitious early career professionals in urban India arrive AI-aware and motivated, but fail at selection, scoping and first proof. They see AI at the category level (sales automation, HR tools, a productivity agent) and cannot turn it into one grounded workflow. Notice what the observation does not contain: a solution. An observation reports what you saw, from lived experience, and stops.
The hypothesis then states the assumption and how to test it: they are stuck because they lack a method to go from broad AI possibility to one scoped workflow. The test: provide a structured workflow diagnosis system followed by a guided build sprint, and 60% of active students will identify one real user, map one repeated workflow, build a working AI-assisted version and present a credible demo within 90 days. At 10 people, that is 6 of 10.
Then the move that shapes everything after it: do not solve for a category (marketers, cafe owners, doctors). Solve for one named person. Once it works for that one person, talk to more people like them. That is how the test base grows.
03The Cheapest Test Is Three Boxes on a Whiteboard
The hypothesis names two solutions: the diagnosis system (part one) and the build sprint (part two). Take only part one and ask for the cheapest way to test it with Aarav. The answer is three boxes on a whiteboard.
Input
A text fieldAarav describes a workflow he repeats, in 3 to 4 linesProcess
A Done buttonWhatever turns the description into a planOutput
A plan comes backFor automating part of the workflowThe input came from a message to Aarav: what is the one thing you repeat every day or every week, in 3 to 4 lines? Say he replies that he opens Jira, checks status, and emails his manager an update. That reply, compressed, is the input. The output is a plan for automating part of it. And the success test is not whether Aarav likes the plan. It is whether following it saves him time, say 1 hour a week. If it saves nothing, the impact is zero and the plan failed.
No code was written and no system was designed. Designing meant understanding what the user needs and the minimum solution that tests it. It does not mean opening Figma.
04A Second Observation, and the Stranger Test
Here is a second learner's observation, written for the same exercise: organizational project knowledge exists, but access depends on personal memory and network, so under deadline pressure people reuse the precedent they remember rather than the best fit, and nobody sees what was not found.
Observation · too generic
Hand it to a stranger outside your industry: could they picture the problem? "Organization" does not say finance, healthcare or education, and an organization is not a person. Name the one person in the team who hits this most often, with their designation, and write the observation from their point of view.
Hypothesis · no number
"Noticeably faster" cannot be falsified. Add a measurement and a stop rule. Without one, you keep spending time with no signal for when to pivot.
Input and output · good
Senior experts with 10 years of experience retrieving a specific fact or project assumption, and getting back a concise, source-grounded answer they can check against the reference document. Specific and concise.
The format to write yours in: observation, North Star, hypothesis, user, input, output.
05Ten Golden Pairs Before One Line of Code
One input and one output is an example. It is not enough to build against. Write at least 10 to 20 pairs; for production it can be 100 to 200. Each pair is the exact text a real user would type and the output that would solve their problem, gathered by talking to real users. If you cannot talk to your users, do not move ahead. If you are the user, write them yourself and check them with people like you.
This is the golden dataset: ideal input and output pairs. The output you believe solves the user's problem, paired with its input, many times over. The same idea returns later in the roadmap, for evals and fine-tuning.
Recall the verifier game: how do you verify an app that adds two numbers? You write 1 + 2 = 3 and a few more, paste them in, and compare. Same output, it works. Different output, it does not. The golden dataset is what lets you decide whether your verifier will be deterministic, probabilistic or a human in the loop.
06The Verifier Is a Threshold, Worked in Minutes
Say the email step is Aarav's biggest time sink: 15 minutes a day by hand. Drag the slider to see when the plan passes the 1 hour a week bar.
Saved per day
10 min
Saved per 5-day week
50 min
With the plan it takes 5. That saves 10 minutes a day, and over a 5-day week, 50 minutes, close to the 1 hour threshold. The plan passes. Now say the plan cuts it only to 10 minutes. That saves 5 a day, 25 minutes a week, below the threshold. Same plan shape, same tool, and it fails.
The verifier rule
A good output is one that clears a number you wrote down before you built anything. The verifier is your codified definition of good, and it only exists if you know the user well enough to name the baseline and the threshold. Anyone can prompt a demo; without a threshold it is a demo, not impact.
The written verifier for Aarav's first golden pair asked for four things in the output: a metric with a baseline, the named bottleneck, a test on past input with known answers, and a list of what is out of scope.
07Test-Driven Development, Written in English
This is an old idea. Test-driven development (TDD) says write the test before the software; once the software passes your codified tests, you know it works. It is hard to keep up, which is why few people do. What changes now is only the language: most of the tests you write will be in English. The philosophy does not change.
Tie it back to the bigger picture: almost everyone uses AI, utilization sits under 20%, and the impact on real earnings is in single digits. Building without a verifier is how that gap stays wide.
The spec now reads: observation, North Star, hypothesis, user, golden dataset, verifiers. Mask anything proprietary (use percentages or X, Y, Z) but share it, because that is what makes feedback possible. The North Star sits slightly outside the spec and tells you if you are still pointed the right way.
08Two Systems, One Interface
Back to the core question. Two systems: Aarav, a human, and a workflow diagnosis plan generator that can run on a machine. What sits between them? A user interface. It needs a common language (English, text fields) and a set of rules (the web's HTTP). Aarav's prerequisites are a PC, a browser and an internet connection.
Golden pair 1 is concrete enough to design against:
Golden pair 1 · input
"I'm a business analyst at a mid-sized IT company in Pune. Every Friday, I make the weekly status report for our client. I open Jira, filter tickets closed this week, copy them into a Word template, then go through email and Slack to find blockers... Takes around 3 hours. My manager usually edits the risk section because I miss things."
From it: the input type is text and the output type is text. That has a useful side effect. If both ends are text, you can run a manual MVP before building anything: take Aarav's description on a call, write the plan yourself (with or without ChatGPT), send it as a document, and see if it saves him time.
09The Vote That Lost
Three candidate interfaces: a Google-style search box, a Google Form, and a chat. Before you read on, pick one yourself. When this lesson was run live, the room voted like this.
| Interface | What the replay showed |
|---|---|
| Search box text in, results out | No memory and no context. A follow-up means retyping the whole description, and an AI-generated plan may come back different each run. |
| Form many fields, uploads | Multiple fields Aarav does not need, and no way to ask about the plan once it arrives. |
| Chat winner | Holds context, supports follow-ups until Aarav is satisfied. |
Now replay the golden output: a day-by-day build plan with time saved as the metric. Aarav reads it and asks:
The follow-up
"What does backtesting mean?"
How do you ask Google a follow-up? The room named the cost: Aarav would have to remember the plan, retype everything, and search again. The missing property: no memory, no context. And it does not look like a conversation. The majority choice fell to one question, and the golden output is what surfaced it.
The interface does not come first
Pick the interface after you replay the user's conversation with your ideal output, never before. The winning vote was made on intuition; the correct answer came from a single realistic follow-up.
Rule of thumb for now: around 90% of first problems fit one of these three.
Search
One query, one answer back
Form
Many inputs
Chat
Follow-ups that need memory and context
Build the cheapest one first, and do not add anything until it is verified. That is the V0, or MVP.
10Vibe Code or First Principles: The Difference Is Control
Two routes to the same chat UI. Vibe code it: one prompt to Claude Code, Lovable, OpenAI or Gemini. Or write it from first principles in Python, with AI allowed, but understanding what every line does and why it is there. Both produce a working chat. The difference is control. Neither is declared the better one here. Your task is to do both and write a three-line review of what each gave you.
11Why Python, and Why Gradio
The web is HTML. Styling and scripting languages grew around it, and JavaScript came from that; Python was never part of web development. Until about 2021, this course taught UI in JavaScript, HTML and CSS, and the repeated feedback was that beginners had to learn three languages to ship one thing. In 2026, Python libraries bridge that gap, so one language covers this whole block.
| Library | Use it for |
|---|---|
| Gradio | Chat, forms, search-style inputs: any interface without heavy charts. The default here. Part of Hugging Face and the open-source AI ecosystem; AUTOMATIC1111, the Stable Diffusion UI with about 165,000 stars, runs on it. |
| Streamlit | Data-heavy front ends: dashboards and charts that update. Worth knowing about; not used in this lesson. |
This lesson's job is a chat that takes input and returns output, so Gradio.
12Four Lines That Are the Whiteboard
The Gradio Hello World takes a name and returns a greeting. Hover a line to see which box of the whiteboard it is.
Read it as the whiteboard. The function argument is the input. What follows return is the output. The function body is the process that turns one into the other, which here is almost nothing. gr.Interface is the interface from section 8: it declares the input type and the output type, the common language and the rules. fn just means function. This is the smiley exercise, solved: you cannot get someone to draw a smiley without a shared language and rules; Gradio gives you both for machines.
For chat, swap the interface. Gradio's own chat example just echoes you:
Same template: define the input, the output and the process, then hand the function to the interface. Later the process becomes a call to a model. For now, echo is enough.
One instruction repeated: learn Gradio from its documentation, not from an LLM. Asking Claude gets you an answer; reading the docs gets you the rabbit holes in the left rail (website widgets, Slack bots and more).
13Setting Up, and the Errors You Should Want
- Install Python from the official site. Two or three steps for your operating system.
- Install one IDE. Cursor or VS Code. An IDE is a notepad for code where you read and review before you push anything anywhere. VS Code is fully free; Cursor has a paid plan for its models.
- Make a folder (for example
100x teston the desktop), open it in the IDE, createapp.pyand paste the Hello World. - Run
pip install gradio, thenpython app.py, and open the local link it prints.
You will hit errors: Python not found, Gradio not installed. That is the point. Solving them yourself is the start of the debugging muscle. If def, return and functions are unfamiliar, finish the Python bigbinary prerequisite first; these lessons do not teach Python syntax. The build guide walks you through your errors, then deploys your app to a shareable link.
Step-by-step setup with tests for each tick: the build guide and the checklist.
14From the Q&A
Trackers in, exception table out: form or chat?
There is no answer without the spec. Interface design is contextual: who is the user, what is their goal, what do the ideal input and output look like. Walk your user's journey the way we walked Aarav's, then ask.
My project is building WhatsApp agents.
That is solution-first. Naming the solution in the first line leaves you choosing between options with nothing to decide by. Start from observation, input, output and process.
My hypothesis changes after every interview.
Then do not build yet. To learn the process, use Aarav's documents. Spend real build hours only on a problem you can test with real people.
First time coding, coming from marketing.
You have company: most people starting this kind of work are first-time coders. Confidence takes time and comes from projects. One route that works: build one app a day, end to end, deployed to a link, for 30 days. Try it with other first-timers; today's is Hello World.
Not sure my problem is big or monetizable.
It does not have to be. The process matters more than this outcome. One past learner who started as a non-coder built 100+ apps in 3 months and has since raised funding. Volume compounds only if the projects point the same way.
Should the North Star be a product?
No. It is a direction, not a product. Most reduce to a better job or upskilling (define the role) or building something of your own (define what and for whom).
15Vocabulary From This Lesson
16Action Block
Start from the output. The interface follows.Next: the practice set turns this into one real user, ten golden pairs and a chat on your machine.