Skip to content

Example Free Text Order#

This example builds on what was introduced in the Quickstart.

Order description#

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.

'''
Free Text Order
'''

from rapidata import RapidataClient

def get_prompt_ideas(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()

    return order


if __name__ == "__main__":
    order = get_prompt_ideas(RapidataClient())
    order.display_progress_bar()
    results = order.get_results()
    print(results)

The resulting rapids for the users look like this:

Freetext Example