We analyze how a monopoly chooses the quality of a selection technology designed to exclude non-compliant consumers, who may be more costly to serve. The firm may decide to exclude a consumer after observing a signal received on her compliance, the accuracy of which depends on the quality of the technology. The choice of the quality of the selection technology also impacts the consumers’ incentives to comply with the legal rules. We explain why the firm’s choice of the quality of the technology differs from the social optimum. Then, we analyze the role of several regulatory instruments to improve social welfare: the regulation of the selection technology, the ex ante regulation of the misclassification cost through sanctions, the ex post imposition of fines on non-compliant consumers. We identify several economic effects that are generally neglected when evaluating the performance of a classification algorithm.