Learning to Incentivize: Eliciting Effort via Output Agreement