I’m writing a Web service that needs to get lots of information from people as gently as possible, and that means asking questions that are simple, easy to answer, aren’t asked unless needed, and are asked in an intelligent order. For example, if many available questions are about one’s children, the system should ask whether one has children early, and the childless respondent should not get follow-up questions beginning ‘If you have children, …’
The program will need to be able to display questions, store answers, (RESTfully) select the next question depending on previous answers, and output information when appropriate. A more-or-less general solution is desirable since it will need to handle indefinite numbers of questions and questionnaire structures. To me, this implies some ‘just data’ encoding of the questions and questionnaires.
GOV.UK, whose interface work I generally admire, writes that we should start with one ‘thing’ per page. This gives me a fair idea of how to do the ‘front end’ of the solution, and to a lesser extent the way to structure the gathered data for storage in an RDBMS; but I have only vague ideas on how to implement the question selection/response routines. I’d like to make the inference system as intelligent as possible (e.g., if subject died before 1998 & was married: skip spouse gender question), which to me this suggests some kind of logic programming or rules engine, but that’s probably overkill for the task at hand.
I note that there are existing programs of this nature that are not garbage: I recently went through a very complex interaction through a Dutch mortgage broker’s Web service (for some reason skinned as a chat bot). Unfortunately, while I can find many third-party services that say they will do this job for me, I can’t find any open-source solutions whose mathematical underpinnings I can emulate.
So, the question is: please share the name of
Thanks in advance for any responses.