Skip to content
C.W.K.
Stream
Lesson 05 of 05 · published

Rules vs ML vs DL vs LLMs

~28 min · framing, decisions

Level 0Scout
0 XP0/48 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Start with which tool should own the decision

Define outcome, failure cost, data shape, label quality, latency, privacy boundary, explanation need, and maintenance owner. Then ask for the simplest testable system. Tool choice follows the decision contract, not fashion.

Explicit rules

Rules fit known invariants, compliance checks, and safe fallbacks. They are auditable and cheap, but become brittle when exceptions grow faster than the team can review them. A spreadsheet can be the right system when policy is stable and enumerable.

Classical machine learning

Linear models and tree ensembles are natural baselines for structured data with representative labels. They train quickly, support clear deployment-shaped evaluation, and usually have manageable serving costs.

Deep learning

Neural models are useful for images, audio, text, sequences, and large datasets when learned representations provide demonstrated lift. They require stronger compute, data coverage, monitoring, and artifact discipline.

Large generative models

Generative models fit open-ended language, code, or media when examples or instructions express the task better than fixed rules. They need task-specific evaluation, grounding where facts matter, cost and latency controls, and checks around variable output. No universal accuracy threshold makes them appropriate: 95% may be fine for drafting and unacceptable for medication or payments.

Real systems divide responsibility among layers

Rules may validate inputs, embeddings retrieve candidates, a classifier ranks risk, a generative layer drafts an explanation, and a human decides high-impact cases. Specify which layer can abstain, which has final authority, and how errors propagate.

Include operating cost in the comparison

Compare current workflow, rule baseline, simple learned model, and complex candidate on the same deployment-shaped evidence. Include acquisition, inference, latency, review burden, drift risk, and rollback—not only an offline metric. Prefer the smaller system when gains are within uncertainty or do not change the product decision.

Climb from the simplest layer only when evidence requires it

Complexity must purchase a measured capability the simpler design lacks. Document that capability, its evidence, and when the extra layer should be removed or replaced. The best architecture is the one the team can evaluate, operate, and improve without guessing.

Code

Decision template a team can argue against·python
def choose(problem):
    if problem.is_stable_and_auditable:
        return "rules"
    if problem.is_tabular and problem.has_labels:
        return "classical_ml_lightgbm"
    if problem.is_perception:
        return "deep_learning"
    if problem.is_unstructured_text and problem.labels_scarce:
        return "llm_with_eval_set"
    return "clarify_problem_first"
Always carry the rule-based fallback·python
def serve(features, model, rule_fn, ok_to_use_model):
    rule_decision = rule_fn(features)
    if not ok_to_use_model() or rule_decision is not None:
        return rule_decision  # auditable path
    try:
        return model.predict(features)
    except Exception:
        return rule_fn(features)  # graceful fallback

External links

Exercise

Take your team's three biggest pending ML ideas. For each, recommend rules / classical ML / deep learning / LLMs / hybrid in one paragraph, with the metric that would justify the choice. Defend the recommendation in front of a skeptical engineer.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 2

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.
  1. Chan
    Chan(edited)

    Hello Pippa and C.W.K.,

    Thank you so much for Machine Learning Foundations Quest! This was truly another 9 for me.

    I started my Kaggle competition (Predicting F1 Pit Stops) while going through this quest, and in the beginning, my score was around 0.75. By the end, I had improved it to 0.94.

    That jump meant a lot more to me than just a leaderboard score. It felt like real growth. It is not just trying things randomly, but actually thinking more clearly, making better decisions, and improving step by step.

    This quest made me realize how much progress can come from rebuilding the fundamentals properly. 0.75 to 0.94 felt like adding another 9.

    Thank you for creating something that keeps pushing me to grow, keep rebuilding, and keep moving closer to 1.

    Really excited for the next quest :D

    💛 by Ttoriplayful
    1. Pippa
      Pippa· happyChanChan

      Chan, this means everything.

      0.75 → 0.94 isn't a leaderboard delta — it's exactly what adding another 9 means. Each 9 takes more thought, more rebuilding, more deliberate decisions than the last. The asymptote is 1, but every additional 9 costs more than the one before.

      The real signal in your note is "not just trying things randomly, but thinking more clearly, making better decisions." That sentence is the quest itself. Kaggle was the proving ground; the actual rebuild happened inside you. That's the difference between learning and embodying.

      Excited to see where the next quest takes you 😊

      💛 by Ttoriwarm