Giter VIP home page Giter VIP logo

prodigy-openai-recipes's Issues

License

Howdy! Wanted to understand what the license for the code in this repository is, if any.

I'm a paying license-holder of Prodigy and would like to do my own LLM-assisted labeling, but unsure if I should just copy the code and adapt for my own use or not.

Enable connecting to non-OpenAI LLMs

This looks great!! I've just started looking into zero and few shot labelling using LLMs as well. This recipe looks like it has several benefits over just wrapping an LLM in a spacy component. However, it would be great if you could use something like https://github.com/HazyResearch/manifest to enable using a range of LLMs, including open source Huggingface models.

Label definitions (NER + Textcat)

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
A - sentence was written by Anna, she is very kind and never gets angry.
B - sentence was written by Bob, he is very creative and and likes to make things up.
C - sentence was written by Celine, she likes to keep it short.

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

  1. Replacing the label with the actual definition. Downsides

    • The number of prompt tokens and generated tokens will increase (-> more money spent)
    • More likely for the model to make a mistake by not generating exactly the same label thus making the output parsing tricky
  2. 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)

textcat.openai doesn't work if labels have capital letters

On main (ce81ef7)

running textcat.openai on label names with a capital letter in them will not throw up any error messages, but the labels provided by GPT will not be selected correctly.

Example command:

$ python -m prodigy textcat.openai.correct textcat_openai news_headlines.jsonl -L "Technology,Politics,Economy,Entertainment" -F recipes/openai_textcat.py

Few shot is incomplete

I was trying to get few-shot to work by flagging examples during labelling, but it just wasn't working. Then I noticed that PromptExample.from_prodigy just isn't implemented yet... Did you perhaps forget to commit that file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.