An AI tool in Foundry for analyzing documents and media to classify content, extract entities, and generate structured understanding
Inconsistent result when using custom analyzers
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)