Rapid API Labeling Functions
In many use cases, 3rd party applications are great heuristics for quickly creating programmatic labels. For instance, in an urgency detection, a negative sentiment is a great indication for critical messages. By embedding into your labeling workflow, you can speed up the process significantly, leaving you more time to focus on building the best possible classifier.
What is RapidAPI?
RapidAPI is an API platform that you can use to easily discover and connect to thousands of APIs, such as for sentiment analysis, grammar checks, text similarity and many more.
Those APIs are programs that have been developed by institutions, companies or single developers. Some of them are available for free, some are pay-per-use. To integrate them into your workflow, you need an API token, so that RapidAPI can identify that it is you who is making a request to the specific API.
Enrich your data using 3rd party applications
The best practice is to not use the applications directly in your labeling functions (e.g. via a request), but to instead use them to enrich your data beforehand. If you use the sentiment analysis, enrich your record with its score and probability. This way, you can easily check for the metadata in your labeling functions:
This has two advantages:
- Enriching the data first makes the labeling functions much faster, as you want to be able to iterate over your heuristics. Are you sure that 0.6 is the best score for a sentiment to be positive? If you have a labeling function checking a pre-computed value, you can adapt within seconds.
- It saves you money, as you compute once, and can persist that metadata.
3rd party applications can help you save valuable time, as their outputs can describe an idea you have about your data but are currently not able to codify. Another approach to do so are Active Learning models, which are also available in onetask.
If you have any questions how to best set up your workflow to embed 3rd party applications (also ones that are not listed on RapidAPI), feel free to contact us. And if you are curious how other labeling functions can look like, take a look at our post on 6 Types of Labeling Functions that you can use to leverage your labeling.