1. A method of generating responses in a dialog system in response to user input in a current conversation session, comprising: collecting original user phrase data from one or more conversation sessions between the user and the dialog system or other offline sources; extracting one or more constraints, each comprising a constraint-value pair, from the user input; generalizing the extracted constraints into phrase patterns to produce general phrase patterns; constructing a response database consisting of the original phrase data and the general phrase patterns; transmitting a set of filled constraints to a response generator component from the user input; and selecting at least one phrase from the response database that optimally matches the set of filled constraints.