Preparing knowledge base