Tuning a Bayesian Knowledge Base