# Feature Request: Instructions for Labeling

**URL:** <https://support.prodi.gy/t/feature-request-instructions-for-labeling/226>\
**Category:** Uncategorized\
**Tags:** enhancement, done, front-end\
**Created:** [January 17, 2018, 1:14am UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226 "2018-01-17T01:14:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![plusepsilon](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/plusepsilon/32/49_2.png) [@plusepsilon](https://support.prodi.gy/u/plusepsilon)\
**Post date:** [January 17, 2018, 1:14am UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/1 "2018-01-17T01:14:51Z")

</div>

Hi, I think it would great if we can put some instructions for labeling (say in the sidebar) so it would be a constant reminder on how to label (some labeling tasks can get a little confusing).

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [January 17, 2018, 10:58am UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/2 "2018-01-17T10:58:45Z")

</div>

Sure, that’s a nice idea!

If the instructions are not too long, you could use the dataset’s description, which can be set via `--description` on the command line when creating a new set. The text you enter here will be displayed in the sidebar, underneath the dataset name etc. The only problem is that it’s not so easy to edit or change the description afterwards and once the set is created.

---

<div class="post-metadata">

**Author:** ![andy](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/andy/32/966_2.png) [@andy](https://support.prodi.gy/u/andy)\
**Post date:** [January 18, 2018, 3:03pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/3 "2018-01-18T15:03:10Z")

</div>

An NER-specific version of this that I’ve wished for is to display the definition for the named entity type that’s currently being asked about. This would be especially nice for LOC vs. GPE, which annotators mess up all the time, or the more obscure ones like EVENT. Not sure if other people would find that useful or worth the clutter, and it’s only really useful when people are starting out.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [January 19, 2018, 12:40am UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/4 "2018-01-19T00:40:01Z")

</div>

> [@andy](#):
>
> An NER-specific version of this that I’ve wished for is to display the definition for the named entity type that’s currently being asked about.

That's an interesting idea – maybe we do need some option to display a "help" modal or some other way of showing more information (like the annotation manual) without cluttering the UI.

In the meantime, a simple workaround could be to add the label that occurs in the task to its meta, so it's displayed underneath the card. But of course, this only really works in `ner.teach` when there's only one label per task:

```python
labels_desc = {'GPE': 'geopolitical entity - everything with a governing body!'}
for eg in stream: # assuming a stream with one span per example
    label = eg['spans'][0]['label']
    if label in labels_desc:
        eg['meta'][label] = labels_desc[label]

```

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [February 12, 2018, 7:23pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/5 "2018-02-12T19:23:26Z")

</div>

**Quick update:** Just implemented this feature and it will be available in the next release 🎉 You can then specify a config parameter `instructions` that takes a path to a text file (both plain text and HTML are supported, so it should be very flexible in terms of presentation). The instructions will then be displayed in a modal, accessible via the little help icon at the top, or by pressing h.

![prodigy_instructions_modal](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/1X/efed25027a6a176e1a090e6ea97533493668284d.gif)

Because it’s a regular config setting, you can either have global or project-based instructions, or add them within the recipe config.

```json
{
    "instructions": "/path/to/instructions.html"
}

```

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [March 11, 2018, 5:47pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/6 "2018-03-11T17:47:35Z")

</div>

Implemented in `v1.4.0` 🎉 See my comment above or [this section in the docs](https://prodi.gy/docs/web-app#instructions) for details.

---

<div class="post-metadata">

**Author:** ![andy](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/andy/32/966_2.png) [@andy](https://support.prodi.gy/u/andy)\
**Post date:** [May 10, 2018, 9:02pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/7 "2018-05-10T21:02:56Z")

</div>

I’ve really been liking the instructions feature. Thanks!

I’m running into a strange bug, though. When I run Prodigy on my local Mac machine, the instructions work just fine. When I run it on a server, clicking the instructions blanks out the entire page. The only differences seem to be that it’s on Linux vs. Mac and running on 0.0.0.0 instead of on localhost. Any idea what could be causing it? I can share the page where it’s running (privately) if you’d like to take a look.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 10, 2018, 9:40pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/8 "2018-05-10T21:40:47Z")

</div>

@andy Thanks, and hmm, that’s strange and shouldn’t be happening! The blank page happens because an error on the front-end isn’t caught correctly (sorry about that – likely forgot to add the boundaries around the modal correctly, since it’s happening outside of the regular annotation area).

Could you check the browser console for the error? (It’s a compiled app, so likely not as meaningful – but it’d still be good to verify.)

Also, can you double-check that the instructions markup that goes out is read in correctly? This happens in the `server` function in the `app.py` (which is included with Prodigy), so you can simply add `print(config['instructions'])` at the end. A possible explanation could be that your two machines produce different results here and the front-end can’t handle one of those and dies.

If none of this gets us any further, then yes, feel free to email me with more details!

---

<div class="post-metadata">

**Author:** ![andy](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/andy/32/966_2.png) [@andy](https://support.prodi.gy/u/andy)\
**Post date:** [May 11, 2018, 1:40am UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/9 "2018-05-11T01:40:44Z")

</div>

@ines Printing out in `app.py` gives the same instructions locally and on the server. Here’s the error on the server from the console, but it’s unfortunately not that meaningful to me:

```python
bundle.js:1 ReferenceError: translate is not defined
    at t.value (bundle.js:1)
    at u (bundle.js:1)
    at beginWork (bundle.js:1)
    at r (bundle.js:1)
    at i (bundle.js:1)
    at a (bundle.js:1)
    at S (bundle.js:1)
    at x (bundle.js:1)
    at batchedUpdates (bundle.js:1)
    at lt (bundle.js:1)
u @ bundle.js:1
a @ bundle.js:1
S @ bundle.js:1
x @ bundle.js:1
batchedUpdates @ bundle.js:1
lt @ bundle.js:1
$t @ bundle.js:1

```

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 11, 2018, 12:36pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/10 "2018-05-11T12:36:28Z")

</div>

Thanks – looks like there was possibly a bug in the front-end that caused this. Is it possible that your machines are running different versions of Prodigy? Already fixed the bug and it will be included in the next release. (If you’re blocking on this, let me know and I can send you an updated JS bundle that you can replace!)

---

<div class="post-metadata">

**Author:** ![andy](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/andy/32/966_2.png) [@andy](https://support.prodi.gy/u/andy)\
**Post date:** [May 11, 2018, 3:04pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/11 "2018-05-11T15:04:22Z")

</div>

Yes, it turns out they’re different versions. The version with the bug is 1.4.2. My local computer without the error is running 1.4.0. If you wouldn’t mind sending the JS, that would be great! We have a few annotators starting a new task today and it would be great to have the instructions up to remind them.

---

<div class="post-metadata">

**Author:** ![raffaele](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/raffaele/32/297_2.png) [@raffaele](https://support.prodi.gy/u/raffaele)\
**Post date:** [May 23, 2018, 1:03pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/12 "2018-05-23T13:03:49Z")

</div>

Hi all,  
I am in the same situation as Andy. I got the **translate is not defined** error with version 1.4.2 and I would like to give clear instructions to the annotators that are gonna start next week.  
It would be very helpful to have the temporary bundle.js to use or, if it is not feasible, an ETA on this fix.

Many thanks for your group amazing work.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [May 23, 2018, 1:34pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/13 "2018-05-23T13:34:34Z")

</div>

@raffaele Sorry about that bug – I managed to track down the issue and it will be included in the next release (should be coming this week and will include a few other improvements and features). In the meantime, feel free to email me at ines@explosion.ai and I’m happy to send you the patched version.

---

<div class="post-metadata">

**Author:** ![raffaele](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/raffaele/32/297_2.png) [@raffaele](https://support.prodi.gy/u/raffaele)\
**Post date:** [May 24, 2018, 1:56pm UTC](https://support.prodi.gy/t/feature-request-instructions-for-labeling/226/14 "2018-05-24T13:56:40Z")

</div>

Thank you for the quick answer @ines. This is really amazing. I look forward for the the next release.

Many thanks.
