CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-azure-ai-documentintelligence

tessl install tessl/pypi-azure-ai-documentintelligence@1.0.0

Azure AI Document Intelligence client library for Python - a cloud service that uses machine learning to analyze text and structured data from documents

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

64%

task.mdevals/scenario-9/

Document Classifier Lifecycle Challenge

Build a small module that manages custom document classifiers end to end: create them from blob training sources, inspect and list what exists, copy classifiers between resources, and clean them up when no longer needed.

Capabilities

Build classifiers from blob samples

  • Given a doc type to blob container mapping (blob container URLs per doc type) and classifier id, initiates classifier training and waits until ready, returning metadata including the classifier id and doc type keys. @test

Inspect classifiers

  • Fetches classifier details by id and returns its description plus doc type names; listing classifiers returns an iterable containing the id when it exists. @test

Copy classifiers across resources

  • Generates copy authorization on the target resource and uses it to copy a source classifier to a target id, returning metadata showing the target id matches the request. @test

Cleanup classifiers

  • Deletes a classifier id and confirms it no longer appears in listings; repeated deletion calls do not raise errors. @test

Implementation

@generates

API

from typing import Any, Dict, Iterable

def build_classifier(admin_client: Any, classifier_id: str, doc_type_sources: Dict[str, str], description: str = "") -> Any:
    """Start and wait for classifier creation using blob container URLs mapped by doc type; return completed classifier metadata."""

def get_classifier_summary(admin_client: Any, classifier_id: str) -> Dict[str, Any]:
    """Fetch classifier details and return summary with the classifier id, description, and doc type keys."""

def list_classifier_ids(admin_client: Any) -> Iterable[str]:
    """Return iterable of classifier identifiers available on the resource."""

def copy_classifier_between_resources(source_admin_client: Any, target_admin_client: Any, source_classifier_id: str, target_classifier_id: str, description: str = "") -> Any:
    """Authorize on the target resource for the given target id and execute copy from the source classifier; return copied classifier metadata."""

def delete_classifier_if_exists(admin_client: Any, classifier_id: str) -> None:
    """Delete classifier if present without raising when already removed."""

Dependencies { .dependencies }

azure-ai-documentintelligence { .dependency }

Provides document intelligence administration client for building, inspecting, copying, and deleting classifiers.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-ai-documentintelligence@1.0.x
tile.json