-
Notifications
You must be signed in to change notification settings - Fork 27
Label definitions (NER + Textcat) #64
Comments
Have you seen the setting for the There's certainly some prompt engineering that you could do here though, which is stuff we're putting on our roadmap. If you've used a custom template with better results I'd be all ears. |
Thanks for the reply:) Yeh, providing a couple of examples and hoping the model gets it is probably the most straightforward solution. As I mentioned, my intuition would be to go for
In other words, one would let the user define a CSV table
and then introduced an option in the CLI e.g. Finally the jinja2 template would contain something like {% if labels %}
Below are definitions of all labels:
{% for label in labels %}
Text:
"""
label: {{ label.name }}
definition: {{ label.definition }}
"""
{% endfor %}
{% endif %}
{# Now one could have the examples section #} This would not be compatible with the current Anyway, I understand that this feature might not be that relevant. I just happen to be dealing with a dataset where the labels need to be defined. Closing the issue. Thanks for the help:) |
I'm re-opening this issue because it occurs to me as fair feedback and I'd like to have this ticket around as a reminder. |
The recipes in this repository have since moved to Prodigy and are being maintained there. They will soon even get an upgrade with the advent of spacy-llm support, which features better prompts and multiple LLM providers. That is why we've opted to archive this repo, which is also why I'm closing all the issues. You can learn more by checking out the large language models section on the docs. |
I really love this tool! Great job:)
If I am not mistaken, this project assumes that providing names of the labels is enough for the model to understand what that label represents. To use an example from your README
DISH
,INGREDIENT
,EQUIPMENT
recipe
,feedback
,question
However, what if my classification labels are not self-explanatory (even to humans) and require extra definition of what one means by them? See below a (rather artificial) example for textcat labels
A
,B
,C
Let's assume we don't have any or enough examples for the model to figure out that relationship.
I can think of 2 possible solutions
Replacing the label with the actual definition. Downsides
Having a prompt prefix where one simply copy pastes the definitions and then just continues with the standard prompt
I would be more than happy to hear from you and your ideas how to handle this!
Thank you in advance
(@koaning you might be the right person to answer this)
The text was updated successfully, but these errors were encountered: