From ef08be3e013e812d43e48524cde41eeb4d3783de Mon Sep 17 00:00:00 2001 From: robotictapir Date: Thu, 10 Oct 2024 16:10:58 +0200 Subject: [PATCH] Update rag-eval-template.json Finalized template for DB Connect Launch and Accelerator Notebook --- rag-evaluation/rag-eval-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag-evaluation/rag-eval-template.json b/rag-evaluation/rag-eval-template.json index 7055cb2..d8ccd33 100644 --- a/rag-evaluation/rag-eval-template.json +++ b/rag-evaluation/rag-eval-template.json @@ -1 +1 @@ -{"components":[{"id":"setup_header","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"RAG Evaluation"},{"id":"group_1","type":"group","permissions":[],"title":"","index":0,"isTemplate":false,"deletable":false,"collapsable":false,"selectable":false,"children":[{"id":"section_title","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"Title of the section:\n{{section_title}}"},{"id":"r_a3b4uw","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":""},{"id":"grid_1","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_eyqhzx","span":12,"sticky":false,"children":[{"id":"grid_2","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_qqub46","span":12,"sticky":false,"children":[{"id":"question","type":"markdown","permissions":[],"hasTooltip":false,"label":"Question / Prompt","isRequired":false,"value":"{{question}}","exclude":false},{"id":"context","type":"markdown","permissions":[],"hasTooltip":false,"label":"Contexts concatenated","isRequired":false,"value":"{{context}}","exclude":false},{"id":"answer","type":"markdown","permissions":[],"hasTooltip":false,"label":"Generated Answer","isRequired":false,"value":"{{answer}}","exclude":false},{"id":"answer_eval_explanation","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"Evaluation of Generated Answer","value":"Below, please rate the Generated Answer regarding Relevancy, Factual Correctness and Context Alignment."},{"id":"r_wvw7kj","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_wo2gt3","span":12,"sticky":false,"children":[{"id":"answer_eval_rel","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Is the Generated Answer complete; is it wrong; or is the Generated Answer missing any crucial information ?","label":"Answer Relevancy: How well does the Generated Answer cover / answer the Question ?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Perfect coverage","checked":false},{"value":"Incomplete answer (missing crucial parts from contexts)","checked":false},{"value":"Wrong answer (but factually correct from contexts)","checked":false}],"layout":"column"},{"id":"answer_eval_align","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Does the answer contain irrelevant information and context noise; does it contain redundant information (from similar contexts like k, k+1 and k-1 reranked Contexts); or is it too much abstracted from the Contexts ?","label":"Answer Alignment: How well is the answer being generated from the presented Contexts ?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Answer contains irrelevant information (context noise)","checked":false},{"value":"Answer contains redundant information","checked":false},{"value":"Answer summarized too loosely from original Contexts","checked":false}],"layout":"column"}],"permissions":[]},{"id":"r_5lwbzd","span":12,"sticky":false,"children":[{"id":"answer_eval_factual","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Is the Generated Answer factually correct; does it contain unfaithful parts (hallucinations or unmentioned information from outside the Contexts); or is entirely factually incorrect ?","label":"Answer Correctness: How factually correct is the Generated Answer to the given Contexts?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Factually Correct / Faithful","checked":false},{"value":"Partially Unfaithful answer (factually incorrect)","checked":false},{"value":"Entirely Unfaithful answer (factually incorrect)","checked":false}],"layout":"column"},{"id":"answer_rating","type":"rating","permissions":[],"hasTooltip":false,"label":"Generated Answer Overall Rating","isRequired":false,"value":null,"exclude":false,"numberOfStars":5}],"permissions":[]}]},{"id":"instruction_corr_answer","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"If the Generated Answer is not sufficient, please provide the Corrected Answer below with any additional Contexts necessary (links, documents, page numbers, etc.)"},{"id":"corrected_answer","type":"markdown","permissions":[],"hasTooltip":false,"label":"Corrected Answer","isRequired":false,"value":"","exclude":false}],"permissions":[]}]}],"permissions":[]}]}]},{"id":"divider_RAG","type":"divider","permissions":[],"hasTooltip":false,"label":""},{"id":"group_2","type":"group","permissions":[],"title":"","index":0,"isTemplate":false,"deletable":false,"collapsable":false,"selectable":false,"children":[{"id":"answer_eval_header","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"Contexts Evaluation (reranked)"},{"id":"context_grid","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_hmxbu0","span":12,"sticky":false,"children":[{"id":"context_0","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 0","isRequired":false,"value":"{{context\\_0}}","exclude":false},{"id":"voting_context0","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_0","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 0 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_2","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 2","isRequired":false,"value":"{{context\\_2}}","exclude":false},{"id":"voting_context2","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_2","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 2 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_4","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 4","isRequired":false,"value":"{{context\\_4}}","exclude":false},{"id":"voting_context4","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_4","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 4 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_6","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 6","isRequired":false,"value":"{{context\\_6}}","exclude":false},{"id":"voting_context6","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_6","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 6 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_8","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 8","isRequired":false,"value":"{{context\\_8}}","exclude":false},{"id":"voting_context8","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_8","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 8 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"}],"permissions":[]},{"id":"r_toxkmw","span":12,"sticky":false,"children":[{"id":"context_1","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 1","isRequired":false,"value":"{{context\\_1}}","exclude":false},{"id":"voting_context1","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_1","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 1 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_3","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 3","isRequired":false,"value":"{{context\\_3}}","exclude":false},{"id":"voting_context3","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_3","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 3 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_5","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 5","isRequired":false,"value":"{{context\\_5}}","exclude":false},{"id":"voting_context5","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_5","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 5 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_7","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 7","isRequired":false,"value":"{{context\\_7}}","exclude":false},{"id":"voting_context7","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_7","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 7 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_9","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 9","isRequired":false,"value":"{{context\\_9}}","exclude":false},{"id":"voting_context9","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_9","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 9 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"}],"permissions":[]}]},{"id":"explanation_1","type":"textarea","permissions":[],"hasTooltip":false,"label":"Explanation / Comments","isRequired":false,"value":"","exclude":false,"placeholder":"Please explain your answer or leave any comment","min":0,"max":800}]}],"code":"from typing import List, Union\n# import requests.asyncs as requests\nimport requests\nimport sa\n\nparagraph_setup_header = ['setup_header']\ndivider_divider_RAG = ['divider_RAG']\ngroup_group_1 = ['group_1']\nparagraph_section_title = ['group_1', 0, 'section_title']\nparagraph_r_a3b4uw = ['group_1', 0, 'r_a3b4uw']\nmarkdown_question = ['group_1', 0, 'question']\nmarkdown_answer = ['group_1', 0, 'answer']\nrating_answer_rating = ['group_1', 0, 'answer_rating']\nparagraph_instruction_corr_answer = ['group_1', 0, 'instruction_corr_answer']\nmarkdown_corrected_answer = ['group_1', 0, 'corrected_answer']\nmarkdown_context = ['group_1', 0, 'context']\ngroup_group_2 = ['group_2']\nparagraph_answer_eval_header = ['group_2', 0, 'answer_eval_header']\nmarkdown_context_0 = ['group_2', 0, 'context_0']\nvoting_voting_context0 = ['group_2', 0, 'voting_context0']\nradio_context_eval_0 = ['group_2', 0, 'context_eval_0']\nmarkdown_context_2 = ['group_2', 0, 'context_2']\nvoting_voting_context2 = ['group_2', 0, 'voting_context2']\nradio_context_eval_2 = ['group_2', 0, 'context_eval_2']\nmarkdown_context_4 = ['group_2', 0, 'context_4']\nvoting_voting_context4 = ['group_2', 0, 'voting_context4']\nradio_context_eval_4 = ['group_2', 0, 'context_eval_4']\nmarkdown_context_6 = ['group_2', 0, 'context_6']\nvoting_voting_context6 = ['group_2', 0, 'voting_context6']\nradio_context_eval_6 = ['group_2', 0, 'context_eval_6']\nmarkdown_context_8 = ['group_2', 0, 'context_8']\nvoting_voting_context8 = ['group_2', 0, 'voting_context8']\nradio_context_eval_8 = ['group_2', 0, 'context_eval_8']\nmarkdown_context_1 = ['group_2', 0, 'context_1']\nvoting_voting_context1 = ['group_2', 0, 'voting_context1']\nradio_context_eval_1 = ['group_2', 0, 'context_eval_1']\nmarkdown_context_3 = ['group_2', 0, 'context_3']\nvoting_voting_context3 = ['group_2', 0, 'voting_context3']\nradio_context_eval_3 = ['group_2', 0, 'context_eval_3']\nmarkdown_context_5 = ['group_2', 0, 'context_5']\nvoting_voting_context5 = ['group_2', 0, 'voting_context5']\nradio_context_eval_5 = ['group_2', 0, 'context_eval_5']\nmarkdown_context_7 = ['group_2', 0, 'context_7']\nvoting_voting_context7 = ['group_2', 0, 'voting_context7']\nradio_context_eval_7 = ['group_2', 0, 'context_eval_7']\nmarkdown_context_9 = ['group_2', 0, 'context_9']\nvoting_voting_context9 = ['group_2', 0, 'voting_context9']\nradio_context_eval_9 = ['group_2', 0, 'context_eval_9']\ntextarea_explanation_1 = ['group_2', 0, 'explanation_1']\nradio_answer_eval_rel = ['group_1', 0, 'answer_eval_rel']\nradio_answer_eval_factual = ['group_1', 0, 'answer_eval_factual']\n\nradio_answer_eval_align = ['group_1', 0, 'answer_eval_align']\n\nparagraph_answer_eval_explanation = ['group_1', 0, 'answer_eval_explanation']\n\ndef before_save_hook(old_status: str, new_status: str) -> bool:\n # Your code goes here\n return\n\ndef on_saved_hook():\n # Your code goes here\n return\n\ndef before_status_change_hook(old_status: str, new_status: str) -> bool:\n # Your code goes here\n return\n\ndef on_status_changed_hook(old_status: str, new_status: str):\n # Your code goes here\n return\n\ndef post_hook():\n # Your code goes here\n return\n\ndef on_session_start():\n # Your code goes here\n return\n\ndef on_session_end():\n # Your code goes here\n return\n\ndef on_group_1_deleted(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_1_selected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_1_deselected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_question_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_rating_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_corrected_answer_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_group_2_deleted(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_2_selected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_2_deselected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_context_0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_4_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context4_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_4_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_6_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context6_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_6_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_8_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context8_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_8_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_5_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context5_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_5_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_7_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context7_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_7_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_9_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context9_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_9_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_explanation_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_rel_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_factual_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_align_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n","environments":[]} \ No newline at end of file +{"components":[{"id":"setup_header","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"RAG Evaluation"},{"id":"group_1","type":"group","permissions":[],"title":"","index":0,"isTemplate":false,"deletable":false,"collapsable":false,"selectable":false,"children":[{"id":"section_title","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"Title of the section:","value":"{{section_title}}"},{"id":"divider","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":true,"label":"","value":""},{"id":"grid_1","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_eyqhzx","span":12,"sticky":false,"children":[{"id":"grid_2","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_qqub46","span":12,"sticky":false,"children":[{"id":"question","type":"markdown","permissions":[],"hasTooltip":false,"label":"Question / Prompt","isRequired":false,"value":"{{question}}","exclude":false},{"id":"contexts","type":"markdown","permissions":[],"hasTooltip":false,"label":"Contexts concatenated","isRequired":false,"value":"{{contexts}}","exclude":false},{"id":"answer","type":"markdown","permissions":[],"hasTooltip":false,"label":"Generated Answer","isRequired":false,"value":"{{answer}}","exclude":false},{"id":"answer_eval_explanation","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"Evaluation of Generated Answer","value":"Below, please rate the Generated Answer regarding Relevancy, Factual Correctness and Context Alignment."},{"id":"r_wvw7kj","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_wo2gt3","span":12,"sticky":false,"children":[{"id":"answer_eval_rel","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Is the Generated Answer complete; is it wrong; or is the Generated Answer missing any crucial information ?","label":"Answer Relevancy: How well does the Generated Answer cover / answer the Question ?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Perfect coverage","checked":false},{"value":"Incomplete answer (missing crucial parts from contexts)","checked":false},{"value":"Wrong answer (but factually correct from contexts)","checked":false}],"layout":"column"},{"id":"answer_eval_align","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Does the answer contain irrelevant information and context noise; does it contain redundant information (from similar contexts like k, k+1 and k-1 reranked Contexts); or is it too much abstracted from the Contexts ?","label":"Answer Alignment: How well is the answer being generated from the presented Contexts ?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Perfect answer","checked":false},{"value":"Answer contains irrelevant information (context noise)","checked":false},{"value":"Answer contains redundant information","checked":false},{"value":"Answer summarized too loosely from original Contexts","checked":false}],"layout":"column"}],"permissions":[]},{"id":"r_5lwbzd","span":12,"sticky":false,"children":[{"id":"answer_eval_factual","type":"radio","permissions":[],"hasTooltip":true,"tooltip":"Is the Generated Answer factually correct; does it contain unfaithful parts (hallucinations or unmentioned information from outside the Contexts); or is entirely factually incorrect ?","label":"Answer Correctness: How factually correct is the Generated Answer to the given Contexts?","isRequired":false,"value":"","exclude":false,"options":[{"value":"Factually Correct / Faithful","checked":false},{"value":"Partially Unfaithful answer (factually incorrect)","checked":false},{"value":"Entirely Unfaithful answer (factually incorrect)","checked":false}],"layout":"column"},{"id":"answer_rating","type":"rating","permissions":[],"hasTooltip":false,"label":"Generated Answer Overall Rating","isRequired":false,"value":null,"exclude":false,"numberOfStars":5}],"permissions":[]}]},{"id":"instruction_corr_answer","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"If the Generated Answer is not sufficient, please provide the Corrected Answer below with any additional Contexts necessary (links, documents, page numbers, etc.)"},{"id":"corrected_answer","type":"markdown","permissions":[],"hasTooltip":false,"label":"Corrected Answer","isRequired":false,"value":"","exclude":false}],"permissions":[]}]}],"permissions":[]}]}]},{"id":"divider_RAG","type":"divider","permissions":[],"hasTooltip":false,"label":""},{"id":"group_2","type":"group","permissions":[],"title":"","index":0,"isTemplate":false,"deletable":false,"collapsable":false,"selectable":false,"children":[{"id":"answer_eval_header","type":"paragraph","permissions":[],"hasTooltip":false,"exclude":false,"label":"","value":"Contexts Evaluation (reranked)"},{"id":"context_grid","type":"grid","permissions":[],"align":"top","isResizable":false,"children":[{"id":"r_hmxbu0","span":12,"sticky":false,"children":[{"id":"context_0","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 0","isRequired":false,"value":"{{context\\_0}}","exclude":false},{"id":"voting_context0","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_0","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 0 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_2","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 2","isRequired":false,"value":"{{context\\_2}}","exclude":false},{"id":"voting_context2","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_2","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 2 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"}],"permissions":[]},{"id":"r_toxkmw","span":12,"sticky":false,"children":[{"id":"context_1","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 1","isRequired":false,"value":"{{context\\_1}}","exclude":false},{"id":"voting_context1","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_1","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 1 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"},{"id":"context_3","type":"markdown","permissions":[],"hasTooltip":false,"label":"Context 3","isRequired":false,"value":"{{context\\_3}}","exclude":false},{"id":"voting_context3","type":"voting","permissions":[],"hasTooltip":false,"label":"Useful","isRequired":false,"value":null,"exclude":false},{"id":"context_eval_3","type":"radio","permissions":[],"hasTooltip":false,"label":"Context 3 evaluation","isRequired":false,"value":"","exclude":false,"options":[{"value":"True Answer contained within this context","checked":false},{"value":"True Answer not contained within this context","checked":false},{"value":"True Answer partially contained within this context","checked":false},{"value":"Irrelevant context for True Answer","checked":false}],"layout":"column"}],"permissions":[]}]},{"id":"explanation_1","type":"textarea","permissions":[],"hasTooltip":false,"label":"Explanation / Comments","isRequired":false,"value":"","exclude":false,"placeholder":"Please explain your answer or leave any comment","min":0,"max":800}]}],"code":"from typing import List, Union\n# import requests.asyncs as requests\nimport requests\nimport sa\n\nparagraph_setup_header = ['setup_header']\ndivider_divider_RAG = ['divider_RAG']\ngroup_group_1 = ['group_1']\nparagraph_section_title = ['group_1', 0, 'section_title']\nmarkdown_question = ['group_1', 0, 'question']\nmarkdown_answer = ['group_1', 0, 'answer']\nrating_answer_rating = ['group_1', 0, 'answer_rating']\nparagraph_instruction_corr_answer = ['group_1', 0, 'instruction_corr_answer']\nmarkdown_corrected_answer = ['group_1', 0, 'corrected_answer']\ngroup_group_2 = ['group_2']\nparagraph_answer_eval_header = ['group_2', 0, 'answer_eval_header']\nmarkdown_context_0 = ['group_2', 0, 'context_0']\nvoting_voting_context0 = ['group_2', 0, 'voting_context0']\nradio_context_eval_0 = ['group_2', 0, 'context_eval_0']\nmarkdown_context_2 = ['group_2', 0, 'context_2']\nvoting_voting_context2 = ['group_2', 0, 'voting_context2']\nradio_context_eval_2 = ['group_2', 0, 'context_eval_2']\nmarkdown_context_1 = ['group_2', 0, 'context_1']\nvoting_voting_context1 = ['group_2', 0, 'voting_context1']\nradio_context_eval_1 = ['group_2', 0, 'context_eval_1']\nmarkdown_context_3 = ['group_2', 0, 'context_3']\nvoting_voting_context3 = ['group_2', 0, 'voting_context3']\nradio_context_eval_3 = ['group_2', 0, 'context_eval_3']\ntextarea_explanation_1 = ['group_2', 0, 'explanation_1']\nradio_answer_eval_rel = ['group_1', 0, 'answer_eval_rel']\nradio_answer_eval_factual = ['group_1', 0, 'answer_eval_factual']\n\nradio_answer_eval_align = ['group_1', 0, 'answer_eval_align']\n\nparagraph_answer_eval_explanation = ['group_1', 0, 'answer_eval_explanation']\n\nmarkdown_contexts = ['group_1', 0, 'contexts']\n\nparagraph_divider = ['group_1', 0, 'divider']\n\ndef before_save_hook(old_status: str, new_status: str) -> bool:\n # Your code goes here\n return\n\ndef on_saved_hook():\n # Your code goes here\n return\n\ndef before_status_change_hook(old_status: str, new_status: str) -> bool:\n # Your code goes here\n return\n\ndef on_status_changed_hook(old_status: str, new_status: str):\n # Your code goes here\n return\n\ndef post_hook():\n # Your code goes here\n return\n\ndef on_session_start():\n # Your code goes here\n return\n\ndef on_session_end():\n # Your code goes here\n return\n\ndef on_group_1_deleted(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_1_selected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_1_deselected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_question_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_rating_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_corrected_answer_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_group_2_deleted(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_2_selected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_group_2_deselected(path: List[Union[str, int]]):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n\n # Your code goes here\n return\n\ndef on_context_0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_0_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_2_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_voting_context3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_context_eval_3_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_explanation_1_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_rel_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_factual_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_answer_eval_align_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n\ndef on_contexts_change(path: List[Union[str, int]], value):\n # The path is a list of strings and integers, the length of which is always an odd number and not less than 1.\n # The last value is the identifier of the form element and the pairs preceding it are\n # the group identifiers and the subgroup index, respectively\n # value is current value of the form element\n\n # Your code goes here\n return\n","environments":[]}