AI / ML Engineer · entry diagnostic

AI / ML Engineer: entry diagnostic

Ten questions on the core lessons this path builds on. It is for your own planning: it doesn't unlock anything, and it doesn't replace the final examination. Each explanation links to the core module to revisit if you got it wrong.

10 questions · for your own planning · it does not unlock anything and does not replace the final examination ·

1. A list holds parcel weights [1.5, 0.5, 3.0]. A loop counts how many are over 1 kg, starting from count = 0. What's count at the

Why each option is right or wrong

  • “2 either way, because the loop resets the count on its first pass” (Incorrect): The loop adds to whatever the count starts at; it doesn't reset it.
  • “5.0, the total weight, and starting at 1 would give 6.0” (Incorrect): That would be a sum of weights, not a count of heavy parcels.
  • “2, and starting at 1 would stop the program with an error” (Incorrect): Starting from any number is allowed; the result is just wrong.
  • “2, and starting at 1 by mistake would give 3, one too many” is correct.

    Each weight over 1 kg adds one to the count, starting from its first value.

    • Habit: start counts at 0, and test with a small list whose answer you know.
    • Later: counting the late parcels in a month works the same way (ML1).

📖 Revise: Module 22: Loops and Algorithms

2. An API returns {"results": [{"id": "DD-1", "late": 0.81}, {"id": "DD-2", "late": 0.12}]}. How do you read the second parcel's value?

Why each option is right or wrong

  • “results.late[1], which is 0.12” (Incorrect): late belongs to each object in the list, so you pick the object first.
  • “results[2].late, because it's the second parcel in the list” (Incorrect): Lists count from 0, so the second element has index 1.
  • “results["DD-2"], since the id names each parcel in the list” (Incorrect): A list is read by position; an id is just a field inside each object.
  • “results[1].late, which is 0.12 for parcel DD-2” is correct.

    results is a list; index 1 is the second object, and late is one of its fields.

    • Later: the batch endpoint in ML8 returns a list like this.

📖 Revise: Module 25: APIs and JSON

3. A function that rounds a probability to two decimal places returns 0.3 instead of 0.30 in a test. What's the most useful first step?

Why each option is right or wrong

  • “Rewrite the whole function using another library” (Incorrect): You may repeat the problem without knowing what caused it.
  • “Delete the test, since 0.3 and 0.30 are the same number anyway” (Incorrect): The test may be checking how the value is shown, which matters to the caller.
  • “Add print statements in every function of the program” (Incorrect): Printing everywhere makes the output hard to read; start where the test fails.
  • “Read what the test expects, then reproduce it with one small input” is correct.

    The test might compare text, not numbers; one small case shows which.

    • Habit: understand a failing test before changing code.
    • Later: the kit's 28 tests are part of the brief (ML10).

📖 Revise: Module 26: Debugging and Testing

4. A table shipments has columns zone and late (0 or 1). Which query gives the share of late parcels in each zone?

Why each option is right or wrong

  • “SELECT zone, SUM(late) FROM shipments GROUP BY zone” (Incorrect): That's the number of late parcels, not their share.
  • “SELECT AVG(late) FROM shipments WHERE zone IS NOT NULL ORDER BY zone” (Incorrect): Without GROUP BY this returns one figure for all zones together.
  • “SELECT zone, COUNT(late) FROM shipments GROUP BY zone” (Incorrect): COUNT counts every row with a value, late or not.
  • “SELECT zone, AVG(late) FROM shipments GROUP BY zone” is correct.

    The average of a 0/1 column is the share of 1s, worked out per group.

    • Check: compare one zone with a count by hand.
    • Later: results by zone are a fairness check (ML7).

📖 Revise: Module 55: SQL Fundamentals

5. An API endpoint accepts a JSON body with weight_kg. A caller sends -4. What should a well-designed API do?

Why each option is right or wrong

  • “Accept it and pass it on, since checking inputs is the caller's job” (Incorrect): The API is the last place to stop bad values before they reach the model.
  • “Return 200 with an empty body, so the caller knows something went wrong” (Incorrect): A success code tells the caller everything was fine.
  • “Change it to 4 and continue, as negative weights are probably typing slips” (Incorrect): Guessing hides the real problem and gives answers based on made-up data.
  • “Reject it with a 4xx status and a clear message naming the bad field” is correct.

    A clear client error tells the caller what to fix.

    • In FastAPI: a schema with a range gives 422 automatically (ML8).
    • Also: record it in metrics, not just the log.

📖 Revise: Module 47: REST API Design

6. A team wants to train a model on customer support chats. Which step matters most for privacy?

Why each option is right or wrong

  • “Encrypting the model file after training” (Incorrect): That protects the file, but the training data and logs may still hold personal data.
  • “Asking the vendor whether the model is compliant with data protection law” (Incorrect): Compliance depends on how you collect and use the data, not on the model alone.
  • “Keeping the chats only on the laptop of the engineer doing the training” (Incorrect): A single laptop is easy to lose and hard to audit.
  • “Removing names and phone numbers before the data is used” is correct.

    Data that isn't collected or kept can't leak; minimising comes first.

    • Also: a purpose, a retention period and access control.
    • Later: the kit's log must hold no personal data (ML7, ML8).

📖 Revise: Module 79: Privacy and Data Protection

7. Which problem suits machine learning better than fixed rules?

Why each option is right or wrong

  • “Working out GST at a fixed rate on an invoice total” (Incorrect): A fixed rate is a clear rule; code can apply it exactly.
  • “Checking that a booking form has a 6-digit PIN code” (Incorrect): Format checks are simple rules.
  • “Sorting parcels into zones from a published table of PIN codes” (Incorrect): A lookup table already gives the answer.
  • “Estimating which parcels will be late from past deliveries” is correct.

    Many factors interact, and past outcomes are available to learn from.

    • Still: compare with a simple rule as a baseline (ML1).

📖 Revise: Module 81: Introduction to AI

8. Two sentences: "My refund hasn't arrived" and "I'm still waiting for my money back". What lets a search find one from the other?

Why each option is right or wrong

  • “Matching the exact words, since both are about refunds” (Incorrect): They share almost no words, so word matching struggles.
  • “Sorting all the help pages alphabetically by their title” (Incorrect): Alphabetical order says nothing about meaning.
  • “Making the sentences shorter before searching, so fewer words differ” (Incorrect): Shorter text doesn't make different words match.
  • “Embeddings, which place sentences with similar meaning close together” is correct.

    Similar meanings get similar vectors, even with different words.

    • Kit: uses word matching plus a small glossary to run offline (ML6).
    • Trade-off: embeddings need a model, which costs time or money.

📖 Revise: Module 85: Embeddings and Vector Search

9. A support assistant uses retrieval-augmented generation (RAG). What does the retrieval step add?

Why each option is right or wrong

  • “It retrains the language model on the company's pages every night” (Incorrect): RAG leaves the model unchanged; it looks things up at question time.
  • “It makes the model answer faster by skipping the language model” (Incorrect): The language model still writes the answer; retrieval gives it material.
  • “It stops every possible wrong answer, so no further checks are needed” (Incorrect): Retrieval can find the wrong section, and the model can still misread it.
  • “It finds relevant passages and passes them to the model with their sources” is correct.

    The model answers from those passages, so answers can be checked against them.

    • Also: refusing when nothing relevant is found (ML6).

📖 Revise: Module 86: RAG

10. An assistant scores 95% on the 40 questions its builder used while tuning it. What's the main worry?

Why each option is right or wrong

  • “40 questions is too many for an honest test” (Incorrect): More questions give a steadier figure, not a worse one.
  • “95% is too low to release any assistant at all” (Incorrect): Whether 95% is enough depends on the task and the cost of mistakes.
  • “The questions should have been written by the language model itself” (Incorrect): Questions written by the model being tested can share its blind spots.
  • “The figure is flattered, as the questions were used for tuning” is correct.

    Choices were made to pass those questions, so new questions are likely to do worse.

    • Fix: a held-out set used once at the end (ML6).

📖 Revise: Module 89: Evaluation and Safety

← PreviousPath guide
ProLearners Assist