Connection
Base URL, credentials and a reachable server.
State the set and empty-pair conventions beside duplicate fixtures before using the similarity value in downstream comparisons.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def jaccard(left, right):
left, right = tuple(left), tuple(right)
if len(left) > 1000 or len(right) > 1000:
raise ValueError("collection.limit")
if any(type(v) is not int for v in left + right):
raise ValueError("member.integer")
left, right = set(left), set(right)
union = left | right
return len(left & right) / len(union) if union else 1.0