Edit

Share via


Use Azure OpenAI in Fabric with AI Functions (preview)

Use AI functions when you want the fastest way to apply Azure OpenAI to large tabular datasets in Fabric. AI functions are optimized for scale, with a default concurrency of 200 and configurable concurrency settings so you can process rows in parallel for higher throughput.

Another key advantage is prebuilt LLM-based transformations exposed as DataFrame methods, including sentiment analysis, classification, extraction, summarization, translation, embeddings, similarity scoring, and custom response generation. Extraction supports schema-driven output via ExtractLabel, where you can supply a JSON Schema to enforce structure (typed fields, enums, arrays, nullable fields, required properties, and disallowing additional properties) so LLM output conforms to a strict contract. You can also author schemas as Pydantic models and convert them to JSON Schema before use with ai.extract. You can use these functions in pandas and PySpark with minimal code while Fabric handles core tasks such as authentication and request orchestration.

Note

Import paths differ by engine: use synapse.ml.aifunc for pandas DataFrames and synapse.ml.spark.aifunc for PySpark. PySpark AI Functions distribute across the Fabric Spark cluster for parallel execution, while pandas execution runs on a single node. Choose PySpark when you need to process large-scale datasets.

For setup steps, supported functions, model and provider options, and end-to-end examples, see Transform and enrich data with AI functions, which is the main AI functions reference in Fabric. If you need low-level API control or custom orchestration beyond built-in AI functions, use Use Azure OpenAI with Python SDK or Use Azure OpenAI with SynapseML.

Fabric documentation