This paper proposes a method for generating pairwise constraints from the sequence of user's grouping operations. Constrained clustering has been studied as one of promising approaches of interactive data mining. However, when it is applied to actual tasks, it is important to reduce user's cost of specifying constraints. As one of the solutions, this paper focuses on a method for automatically generating a set of pairwise constraints from user's grouping operations. Two types of constraint generation methods are proposed: one is based on the history of user's past grouping operations, and another is based on hierarchical cluster structure. As another contribution, this paper also proposes a design pattern for TETDM (Total Environment for Text Data Mining). TETDM has been proposed for developing various text mining systems, and it is also known as suitable platform for developing a prototype system. Although key concept of TETDM is that a user can dynamically combine various mining and visualization modules when analyzing text data, it is difficult to change combination of mining processing dynamically. The proposed design pattern aims to enable dynamic combination of mining modules by introducing the concept of control panel. An interactive document clustering system is developed on TETDM using the proposed design pattern. Effectiveness of the proposed constraint generation methods is evaluated using the system. Comparison of the effectiveness of several approaches for generating pairwise constraints is performed with simulation.