eyurtsev / kor

LLM(😽)
https://eyurtsev.github.io/kor/
MIT License
1.61k stars 88 forks source link

Extracting confidence score or probability scores for extracted entities #266

Closed srivatsan314 closed 7 months ago

srivatsan314 commented 7 months ago

Thanks for this wonderful tool. Right now I am using llama2 and I am able to extract specific fields from my text by using the correct prompts. Is there a way to give a confidence score or a probability score for each extracted entity? Right now my output looks like:

{'data': {}, 'raw': '{\n"patient_name": "John Brown",\n"patient_dob": "09/10/1944",\n"patient_admission_number": "1112345",\n"adm_date": "11/12/1999"\n}', 'errors': [], 'validated_data': {}}

But here I know that the patient_admission_number is not correct (original number is 12345). Does anyone know how to get this?