1. A method comprising: creating, by a processing device, a graphical user interface (GUI) to present a questionnaire comprising a set of questions and a user interface, wherein the user interface provides an input interface for a user to input one or more answers for the set of questions; displaying a first question in the set of questions via the GUI; receiving, by the processing device, a first response to the first question via the user interface; generating, by a rule engine of the processing device, a logic tree comprising nodes and branches, each of the nodes representing a question in the set of questions and each of the branches representing a response to a question in the set of questions; storing, by the rule engine, the logic tree in a working memory of the rule engine; identifying a node of the nodes in the logic tree correlating to the first response, the node comprising a follow-up question; removing a portion of the logic tree stored in the working memory corresponding to a second node in the logic tree connected to a branch of the branches representing a second response that is not received via the GUI, wherein the removing the portion of the logic tree from the working memory increases available memory space of the working memory; modifying, by the processing device, the GUI to present the follow-up question within the questionnaire; modifying, by the processing device, the user interface to receive an answer from the user in view of the follow-up question; and displaying the GUI and the user interface, as modified, via a display device.