Inconsistent result when using custom analyzers

Mikael Hakansson 0 Reputation points
2026-11-26T16:13:29.7133333+00:00

We are using Content Understanding to parse PDF based invoices. We do this using projects with API version 2026-06-01 (Preview) with workflow set to Agentic Extraction. The project has a custom Invoice schema.

Testing the project schema always works, where all header- and line item information is correct. This also seam to be the case for analyzers built from within the Content Understanding studio.

However as we need both Confidence and Boundary regions with the result, we create the Analyzer from code using the ContentAnalyzerConfig object:

var config = new ContentAnalyzerConfig
{
    EnableFormula = true,
    EnableLayout = true,
    EnableOcr = true,
    EstimateFieldSourceAndConfidence = true,
    ShouldReturnDetails = true,
    TableFormat = TableFormat.Markdown,
};

var customAnalyzer = new ContentAnalyzer
{
    BaseAnalyzerId = "prebuilt-document",
    Description = prompt,
    Config = config,
    FieldSchema = fieldSchema
};

customAnalyzer.Models["completion"] = "gpt-5";
customAnalyzer.Models["embedding"] = "text-embedding-3-large";

var operation = await client.CreateAnalyzerAsync(
    WaitUntil.Completed,
    options.AnalyzerId,
    customAnalyzer);

When executing the analyzer we've built from code, the result is very unpredictable where line items are often missed and regional delimiters are sometimes not identified (comma vs period)

Azure Content Understanding in Foundry Tools
0 comments No comments

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.