azure document intelligence custom text classification classify tiff files returns random result using python sdk

chris.c.zhao chris.c.zhao 25 Reputation points
2023-12-05T20:18:44.1766667+00:00

I have manually built a custom document classifier ‘6typesnew’ using document intelligence studio for six types of document of tiff files. I am trying to classify a document 1.tif. 

When I classify it manually in document intelligence studio, the result is  a col with confidence of 93%, which is correct.

But when I tried to use python sdk to classify this document programmatically, the result is random and is wrong. Can you please help to investigate? I run 3 times with 3 different results.

here is my code: User's image

I also tried this

User's image

why is this file classified correctly in studio, but not by python sdk?

can you please help me?

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
{count} votes

1 answer

Sort by: Most helpful
  1. chris.c.zhao chris.c.zhao 25 Reputation points
    2023-12-06T23:14:32.2333333+00:00

    I found the problem. I trained the model in studio using api 2023-10-31, but python sdk only use 2023-07-31 by default. There should be an error message, api version doesn't match instead of return random result. disappointed.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.