Skip to main content
This recipe’s ExternalApplication helper requires scale-gp==0.1.0a59; see Quick Start. Complete the Flexible Evaluation recipe through the V2 application output generation step. Reuse its client, ACCOUNT_ID, math_app, mathbot_with_python_variant, mathbot_with_python, flexible_eval_dataset, question_ids, and evaluation_config variables. The V2 callback emits the create_python_script span with a python_script output, which this recipe displays for the reasoning question.
Reuse the V2 application and dataset from the prerequisite. If you have already generated its test case outputs, skip the output generation call below.
An annotation configuration is used to configure what the annotation UI will look like. The annotation UI is displayed as a two dimensional grid. There are configurations used to indicate the annotation experience.First we will define the “annotation_config_dict”. This is used to indicate the layout of the test case on the annotations page. This dictionary has three keys: “annotation_config_type”, “direction”, and “components”. For all flexible evaluations, set the “annotation_config_type” to “flexible”. The “direction” allows users to configure their UI in two ways. If the user selects “row” for this configuration, then the UI will allow for a max number of 2 items in each row and users can create as many rows as desired. If the user selects “col” for this configuration, then the UI will allow for a max number of 2 items in each column, and the users can choose to have as many columns as possible. Overflow for both will allow for either horizontal or vertical scrolling. The “components” section indicates which components in the application variant to show for annotations in the UI.
If desired, you can configure specific views per question. For each question that needs to be annotated, users can indicate which components of the test case are relevant to the question. For the reasoning question from the prerequisite, display the Python script generated by the V2 application.
You can now create an evaluation with your specifiec annotation configs. If you take a look at the annotation view, you will see it follow the row and column format you specified, along with showing any special information such as traces.If you click on the second question in the annotation view, you will see it change according to the question specific config defined in question_id_to_annotation_config_dict.