The papers describes a technique for improving efficiency of generating templates for inductive logic programming via decomposition of examples and merging and refinement of hypothesis.