From 42738454859c2d338330e31e9597e5ee797386ae Mon Sep 17 00:00:00 2001 From: Dayenne Souza Date: Wed, 17 Apr 2024 16:29:19 -0300 Subject: [PATCH] add 30 samples of record matching to validate --- app/workflows/record_matching/workflow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/workflows/record_matching/workflow.py b/app/workflows/record_matching/workflow.py index 6fc28388..8be90947 100644 --- a/app/workflows/record_matching/workflow.py +++ b/app/workflows/record_matching/workflow.py @@ -346,7 +346,12 @@ def att_ui(i): csv = pl.read_csv(io.StringIO(result)) sv.matching_evaluations.value = csv.drop_nulls() - validation, messages_to_llm = util.ui_components.validate_ai_report(messages, sv.matching_evaluations.value) + #get 30 random dows to evaluate + data_to_validate = sv.matching_evaluations.value + if len(sv.matching_evaluations.value) > 30: + data_to_validate = sv.matching_evaluations.value.sample(n=30) + + validation, messages_to_llm = util.ui_components.validate_ai_report(messages, data_to_validate) sv.matching_report_validation.value = json.loads(validation) sv.matching_report_validation_messages.value = messages_to_llm st.rerun()