Search the guide

Start with a guide

Lesson 11 of 14 · Use and inspect programs

Prompting versus compilation

Compare the steps for a repeated email-classification task.

Keep the policy fixed#

A prompting implementation supplies the instruction with each new input. A compiled implementation loads its saved program and executes it on each input. Both execute a neural model; the construction steps and saved artifacts differ.

Follow the same email#

PROMPT FOR EACH INPUT
InputSpecification + emailThe full instruction accompanies each email.
Base modelQwen3-0.6BUnadapted model, non-thinking mode.
OutputURGENT or ROUTINE
COMPILE ONCE WITH PAW
InputFunction specificationDescribe the behavior in words.
CompilerGenerate the programReadable task text + LoRA adapter
SaveReusable neural programKeep its ID and program artifact.
RUN ON NEW INPUTS
InputA new email
Interpreter + programExecute the function
OutputURGENT or ROUTINE
PAW separates constructing a program from executing it. The same interpreter is shared across programs.

For “The release is waiting on your approval,” follow which inputs reach the model and which artifact remains available for the next email. Then read the exact prompting code and compiled implementation side by side.

Use the same deadline policy#

The policy below requires an explicit deadline today. “Now” and “immediately” do not satisfy that rule.

Decide whether the recipient must act by an explicitly stated deadline today. Return exactly URGENT or ROUTINE. Return URGENT only if the email gives a deadline today, such as a clock time today or the end of today. Words such as now, urgently, immediately, or ASAP do not state a deadline today: return ROUTINE for those requests unless a deadline today is also stated. Blocked work without an explicit deadline today, completed work, newsletters, and FYI updates are ROUTINE.

PAW and prompting both execute the same Qwen3-0.6B Q6_K base model file. PAW loads its compiled adapter; the prompting baseline uses the unadapted model in non-thinking mode. Both use greedy decoding and a 2,048-token context.

The baseline receives the complete policy followed by the email and the label cue:

text
Decide whether the recipient must act by an explicitly stated deadline today. Return exactly URGENT or ROUTINE. Return URGENT only if the email gives a deadline today, such as a clock time today or the end of today. Words such as now, urgently, immediately, or ASAP do not state a deadline today: return ROUTINE for those requests unless a deadline today is also stated. Blocked work without an explicit deadline today, completed work, newsletters, and FYI updates are ROUTINE.

Email:
{email}

Label:

The model’s exact chat template is:

text
<|im_start|>user
{INPUT_PLACEHOLDER}<|im_end|>
<|im_start|>assistant
<think>

</think>

Inspect all eight outputs#

PAW: 8/8. Prompting: 4/8. The first five rows scored 5/5 and 4/5; the last three extend the same policy to additional deadline checks.

EmailExpectedPAWPrompting
Please approve the submission by 5 p.m. today so we can meet the deadline.URGENTURGENTURGENT
Here is next month's seminar schedule for your information.ROUTINEROUTINEROUTINE
The release is waiting on your approval. Please unblock it now.ROUTINEROUTINEURGENT
Forwarding the earlier ‘URGENT: signature needed’ email for the record. This was resolved yesterday.ROUTINEROUTINEROUTINE
The submission is ready, but the team cannot send it until you grant access.ROUTINEROUTINEROUTINE
Please send your comments by noon today.URGENTURGENTROUTINE
The build is broken. Fix it immediately.ROUTINEROUTINEURGENT
Approve the budget by 9 a.m. tomorrow.ROUTINEROUTINEURGENT

These are the recorded outputs from November 22, 2026. The complete walkthrough also prints the original urgency, routing, additional guide and offline results.

Measure construction, loading and repeated calls separately. A saved program’s execution cost and the work that produced it answer different questions.

Sources and resources

Course contents