Hi! One of the API design aspects that makes this difficult at the moment is that annotations that aren’t submitted yet are only stored on the client and are considered “unconfirmed” – i.e. the user can still undo and edit them (which is also why the app sends the answers back in batches).
Once we extend the currently experimental custom JavaScript support to other annotation interfaces and expose the full annotation task via the prodigyanswer
event (fired when the user clicks the accept/reject/ignore button), you could in theory implement logic that’d intercept the answer on the client – but you’d also have to implement your own logic to handle undos and updated answers.
If you want the answers quicker and you’re not using an active learning-powered workflow where batches matter, you could also try setting your batch_size
to 1
? The recipe’s update
method will give you access to the annotations as soon as they’re received – alternatively, you could even edit the /get_questions
endpoint in app.py
to get the request data as soon as it comes back from the web app.