-
Notifications
You must be signed in to change notification settings - Fork 1
Survey configuration
The adaptive engine applied to a survey can be explained with the following pseudo-code:
# given a survey s
s := survey()
# and a user u
u := user()
while not s.stop():
q = s.next_question()
a = u.answer(q)
s.check(a)
What the tool models is the s := survey()
part of the code. The u := user()
is supposed to be a human or an algorithm that can generate answers to given question.
The survey need 3 functions:
- a
stop()
condition that will halt the survey when met; - a
check(a: answer)
function to register the answer received; and - a
next_question()
function that will find the optimal next question.
What we can configure in the Survey
object is practically everything that controls these three functions.
The configuration of the survey can be done in multiple ways:
- via database by pre-filling the remote database with everything needed;
- via code by using, in Java, the
Exchange
library with the Remote API Key; or - by putting a JSON for each survey in a folder called
/data
in the work directory of the backend.
While the first two ways are explained within the code Javadoc, here we will explain how to build a compatible JSON file.
As reference, consider the content of the data folder in the backend module. Remember that the structure of the JSON is exactly what you would achieve by dumping the structure of object build using the Exchange Library.
We have 4 mandatory field to fill and one optional:
-
"survey"
: this contains all the configuration, parameters, thresholds, and descriptions relative to the survey. -
"skills"
: this is a list of all the nodes in the models that the adaptive engine will optimize for. -
"questions"
: this is a list of all the questions available. -
"model"
: this field is a description of the CreMA model used by the adaptive engine. - (opt.)
"modelData"
: if the"model"
filed is set tonull
, this field will be used. This is a model written in UAI form. The string to put there can also be produced using the CreMA library.