How do you link a Custom Classification model to Custom Extraction Model

Kris Robbins 55 Reputation points
2024-10-11T03:01:41.3133333+00:00

We are currently using 2023-07-31 (3.1 General Availability).

I can create Custom Classification Models and Custom Extraction Models. I don't understand how the two are linked. I can see you can compose Extraction models together.

Ideally we need to call Classification first as this allows split of documents. How would I then call Extraction for each result (page). Or Make this into a single call?

It looks like version 4 allows you to compose Extraction Models and Classification Models together.

When will version 4 be available for preview in Australia?

Azure Document Intelligence in Foundry Tools
{count} votes

Answer accepted by question author
  1. Rohit Mungi 49,116 Reputation points Microsoft Employee Moderator
    2024-10-11T06:58:27.59+00:00

    @Kris Robbins With v4.0 an explicit classification model is required for compose model if you are using multiple extraction models in the compose model. As per documentation:

    The 2024-07-31-preview implementation of the model compose operation replaces the implicit classification from the earlier versions with an explicit classification step and adds conditional routing.

    So, with the current GA version that you are using, the composed model determines implicitly without the need of a custom classification model to generate a response that best matches one of the models in the composed model.

    So, as per the composed model compatibility list your region can support composing v3.0 and v3.1 models in a composed model id without the need of training a custom classification model.

    User's image

    If you use a custom classification model with v3.0 you can still classify the document types and train a model. Based on the output of your classification model i.e the document type that is returned you will have to make another call to your custom extraction model id to analyze the document.

    If you use v4.0 API in a different region you will have to follow the approach of creating a custom classification model with different document types and train the custom classification model and then train individual custom extraction models of the types used in custom classification and link them up in a compose operation i.e use the custom model classification model id, custom extraction model id's for all the types used in the custom classification model.

    I am also not sure about ETA of launching v4.0 in Australia region. Please check the What's new page regularly for updates on future rollouts.

    I hope this helps!!

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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