Bitpath

Lesson 2 · Unit 03

Designing tools

Descriptions, schemas, errors and safe retries

13 exercisesabout 3 min

What you practise

  • The description is a prompt, few clear tools beat many vague ones, errors returned as readable messages, actions that are safe to retry, confirming before side effects

Try a question from this lesson

Pick one

An assistant has two tools: search ("Searches.") and lookup ("Looks things up."). For an order status it picks the wrong one half the time. What is the cheapest fix?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

The description is a prompt

The model picks a tool by reading its description, so write it like a prompt: what the tool does, when to use it and when not to, what each parameter means and its format, and what comes back.

Apply the new colleague test again: could a stranger choose correctly from these words alone?

Concept

Safe to retry

Networks time out, so calls get retried, by your code or by the model. An action is idempotent when doing it twice has the same effect as doing it once.

Reading is idempotent. Charging a card is not, unless each request carries a unique key and the server ignores a key it has already seen.

10 more exercises in the app

  • 4× multiple choice
  • 1× fill the blanks
  • 2× type the answer
  • 1× order the lines
  • 1× true or false
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy