Example Free Text Order#
To learn about the basics of creating an order, please refer to the quickstart guide.
Let's assume you want to build a new LLM chatbot and you want to know what people might want to ask the bot. You can create a free-text order to gather the questions people might have.
The free-text order will take longer to complete than the others, as the response process is slightly more involved from the perspective of the annotator.
from rapidata import RapidataClient
if __name__ == "__main__":
rapi = RapidataClient()
order = rapi.order.create_free_text_order(
name="Example prompt generation",
instruction="What would you like to ask an AI? please spell out the question",
datapoints=["https://assets.rapidata.ai/ai_question.png"],
).run()
order.display_progress_bar()
results = order.get_results()
print(results)
To preview the order and see what the annotators see, you can run the following code:
To open the order in the browser, you can run the following code:
In the advanced example we will add some filters to the order to make sure only annotators that have their phone set to english are able to answer. Additionally we will set a minimum length of 5 characters for the questions.
from rapidata import (
RapidataClient,
FreeTextMinimumCharacters,
LanguageFilter,
)
if __name__ == "__main__":
rapi = RapidataClient()
order = rapi.order.create_free_text_order(
name="Example prompt generation",
instruction="What would you like to ask an AI? please spell out the question",
datapoints=["https://assets.rapidata.ai/ai_question.png"],
settings=[FreeTextMinimumCharacters(5)],
filters=[LanguageFilter(["en"])],
).run()
order.display_progress_bar()
results = order.get_results()
print(results)
To preview the order and see what the annotators see, you can run the following code:
To open the order in the browser, you can run the following code: