introduce the knowledge encoding factory