Text classification and text extraction best practices

Hi there!
I’ve just started to learn how to work with api and currently i’m working on 2 projects(one is text extraction and the other is classification)
So in first project i have medical data that includes transcriptions column, from which api should extract the age of the patient, treatment and ICD code. Now the question is how is it better to give my data to API? Now i’ve just extracted the transcription, converted to a list and gave in prompt, but i’m sure there are better ways to do this. Is it better to give it in one list all together or one transcription at the time? (which way is more accurate, fast and/or cost efficient).
In the second mini project i have list with names that api should classify by gender. Here i have same question. Also since those are singe turn requests do i need to use both user and system roles or can just give everything in one?
I’ll be glad to get any best practices and advise that will make this whole topic clearer for me. Thank you so much for your time!)

You’re diving into some exciting projects with APIs. I’d recommend feeding the transcriptions to the API one at a time for your first project. This approach typically leads to more accurate results since the API can process each transcription individually without getting confused by multiple entries simultaneously. It might be slower than batching them together, but the improved accuracy often outweighs the time cost.

1 Like

Thank you so much for a recommendation! Thats exactly how i did it and the result was pretty accurate. I also used api in some other more complicated projects and this method was the best working one