Toolformer Call Filter
~10 mincode completion
Implement toolformer_keep(loss_none, loss_empty, loss_with, tau) returning the indices of the kept calls in increasing order.
Where this shows up
~10 min
••••••••••••••••
8 employers weight this skill
4 frontier labs, 3 AI product companies, 1 enterprise vendor. Top match scores 81.
Python
import numpy as np
def toolformer_keep(loss_none, loss_empty, loss_with, tau):
"""
Indices of the tool calls that pass Toolformer's filter.
Args:
loss_none: losses with no call, shape (n,)
loss_empty: losses with the call but no result, shape (n,)
loss_with: losses with the call and its result, shape (n,)
tau: minimum loss reduction to keep a call
Returns:
array of kept indices, increasing
"""
# YOUR CODE HERE
pass