How to get specific data samples to show up on the annotation UI

Sometimes during NER annotation, you want a specific example from your input JSON (or data from an external DB) to be shown on the UI so you can annotate it and save it (the data could be retrieved based on some value in the meta field like an ID for example)

Any tips on how I would be able to do this? I guess I just want a small text box on the UI and if i enter the ID number it shows that specific data on the UI

Hi! Prodigy generally expects you to define your input stream of examples upfront when you start the server. The stream can respond to outside state (e.g. examples that were already annotated, which is also how annotation with a model in the loop works) and you can also include filtering logic in a custom recipe that lets you define what examples to load in (e.g. all examples with a given tag).

However, there's not really an easy way to do that type of filtering retroactively in the UI. Of course, it always depends on the use case, but we generally discourage workflows that rely too much on the annotator choosing what to annotate, because it makes it more difficult to create consistent data.

If it's during development and just you annotating, one option could be to have a custom recipe that takes the IDs of the examples as an argument and queues them up for annotation. You could then run that as a separate process whenever you need it. You can have multiple instances of Prodigy that save to the same dataset under the hood, so you could even do this without having to stop your current annotation session and just use a different port.

1 Like