Week 2 gave you typed records from a single input. One gap: you can classify one ticket, but your inbox has 30. The function doesn't scale until you apply it to a list.
I kept wanting to loop over my lead list after building classify_urgency. It felt like the function was already finished — I just needed to call it 30 times.
[classify_urgency(t) for t in texts] — one list comprehension. No new patterns, no new APIs. The batch infrastructure is just your existing functions applied inside a loop. This week you build it: batch classify, batch measure, pipeline compose, pick the shortest response. Friday you'll have the full operational toolkit.
Is there a risk of making 30 model calls in a loop? Does that hit a rate limit?
For a list of 10-30 inputs, sequential calls are fine — total runtime is 10-30 seconds, well within limits. For thousands of inputs you'd add concurrency. For a founder's morning batch job, a loop is exactly right.
Week 2: classify_urgency(text) → one label.
Week 3: [classify_urgency(t) for t in texts] → a list of labels.
The functions are identical. The scale comes from the list comprehension.
Create a free account to get started. Paid plans unlock all tracks.
Week 2 gave you typed records from a single input. One gap: you can classify one ticket, but your inbox has 30. The function doesn't scale until you apply it to a list.
I kept wanting to loop over my lead list after building classify_urgency. It felt like the function was already finished — I just needed to call it 30 times.
[classify_urgency(t) for t in texts] — one list comprehension. No new patterns, no new APIs. The batch infrastructure is just your existing functions applied inside a loop. This week you build it: batch classify, batch measure, pipeline compose, pick the shortest response. Friday you'll have the full operational toolkit.
Is there a risk of making 30 model calls in a loop? Does that hit a rate limit?
For a list of 10-30 inputs, sequential calls are fine — total runtime is 10-30 seconds, well within limits. For thousands of inputs you'd add concurrency. For a founder's morning batch job, a loop is exactly right.
Week 2: classify_urgency(text) → one label.
Week 3: [classify_urgency(t) for t in texts] → a list of labels.
The functions are identical. The scale comes from the list comprehension.