Variable number of interfaces within the same pane (data dependent)


I'm enjoying using your product and it's speeding up our development.

I imagine this is outside of normal use cases due to marginal utility, but I thought I'd ask anyway in case the answer is not custom html (which I suspect it is).

Is it possible to vary the number of interfaces (like the number of view_id in blocks) dependent on the data retrieved by a query, for instance all the images are associated to the same news story and variable in number and the text extraction/description needs to be confirmed? Or is the answer just to use custom html to build a custom interface?

Best regards,


Hi and thanks! :smiley:

I haven't tried this yet but in theory, this should be possible in Prodigy v1.10 by overriding the "blocks" on a per-task basis using the "config" property of a task dict, like this:

{"text": "I am a task", "config": {"blocks": [...]}}

It's not something we'd recommend for most use cases, because it can make the data inconsistent and it makes it harder to keep track of what an annotator saw at any given point (and why). But in your case, I could see the point of having one block per image and then overriding the "image" value on the individual block (e.g. {"view_id": "image", "image": ""}). This would be especially useful if you have bounding boxes on your image or if you want to mix them with text input blocks.

If the interface you're looking for is story → image → text input → next image → next input → ..., an alternative approach would be to create one task per image that consists of story, image and text input. It means more questions overall, but you'd be collecting more data points, the annotator has to scroll less and you know that each collected answer will be identical in format.

1 Like

Thanks for the super quick and very helpful reply :grinning:

1 Like