Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Everything in this module collapses into one repeatable decision tree you can run in five minutes before any LLM project: is it knowledge or behavior, do you have data and an eval, have you exhausted prompting, and is a small fine-tuned model the cheapest path to your latency or cost goal. Encoding the whole module as a single function makes the decision fast, consistent, and shareable with your team. This is the artifact you'll actually reuse — the rest of the course assumes you've run it and landed on 'yes, fine-tune.'
The demo composes the whole module into one decision tree that returns a concrete recommendation, so you never start a fine-tune on instinct again.
def decide(problem):
if problem["needs_fresh_or_private_facts"]:
return "RAG (optionally + a small format fine-tune on top)"
if not problem["tried_prompting"]:
return "Prompt engineering first -- cheapest reversible lever"
if problem["num_examples"] < 100:
return "Few-shot prompting -- not enough data to fine-tune"
if not problem["can_build_eval"]:
return "Build an eval set first -- otherwise you can't prove anything"
if problem["latency_or_cost_critical"]:
return "Fine-tune a SMALL model (LoRA/QLoRA) and self-host -- this course"
if problem["needs_consistent_style_or_format"]:
return "Fine-tune with LoRA -- this course"
return "Prompting is probably enough; revisit if it plateaus"
example = {"needs_fresh_or_private_facts": False, "tried_prompting": True,
"num_examples": 800, "can_build_eval": True,
"latency_or_cost_critical": True, "needs_consistent_style_or_format": True}
print(decide(example))python3 main.py