Skip to content

Commit

Permalink
add 30 samples of record matching to validate
Browse files Browse the repository at this point in the history
  • Loading branch information
dayesouza committed Apr 17, 2024
1 parent aef8e2e commit 4273845
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/workflows/record_matching/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4273845

Please sign in to comment.