fabric-ai-meta
Make any Power BI semantic model readable by AI, from your laptop.
Point it at a .pbip folder and you get a classified schema, an AI readiness score, and framework-native exports for LangChain, OpenAI, Semantic Kernel, and AutoGen. No Fabric tenant, no notebook, no sign-in.
Who it's for
| You are | You get |
|---|---|
| A BI developer exploring a model | A local, classified schema and readiness score, no Fabric tenant needed |
| An AI engineer building on top of it | Framework-native exports, plus MCP tools an agent can query safely |
| A governance team watching many models | Cross-model drift, naming inconsistency, and duplicate-DAX detection at scale |
| A Fabric architect cleaning up a model | Auto-generated descriptions and a dry-run-first writeback path |
Full command sequence for each in the user guide's workflow paths.
Try it
In Power BI Desktop: File > Save As > .pbip. Then:
pip install fabric-ai-meta
fabric-ai-meta analyze "Sales" --pbip ./Sales.SemanticModel
That reads the local TMDL, classifies every table and measure, scores the model, and writes ./output/sales/:
ai-ready-schema.json # tables, measures, relationships, all classified
readiness-score.json # {"score": 0.82} <- how AI-ready this model is
langchain-tool.json # drop straight into LangChain
openai-function.json # and into OpenAI function calling
semantic-kernel-plugin.json # and Semantic Kernel (export autogen adds the fourth)
measure-dependency-graph.json
extraction-raw.json
It parses your DAX, so a TOTALYTD(...) measure comes back understood, not guessed:
{ "name": "Sales YTD", "category": "time_intelligence", "requires_date_filter": true }
No model handy? fabric-ai-meta analyze "Adventure Works" --mock runs the same flow on bundled fixtures.
Your models never leave your machine
Table names, measure logic, and business rules describe how your company works. You never have to trust this tool with any of it.
- Local by default.
--pbipreads TMDL off your disk,--mockuses bundled fixtures. Neither touches a network or an account. - No telemetry. The only outbound calls in the codebase go to the Fabric REST API and to the LLM provider you configure. Both are opt-in.
- LLM enrichment is opt-in and capped. Nothing is sent anywhere without
--llm-enrich. You pick the provider (10+, including local Ollama), you supply the key, andmax_cost_per_runstops an overspending run. - Writeback is dry-run by default.
apply-descriptionsandapply-copilotshow the diff and change nothing until you pass--no-dry-run.
Reaching a live workspace, to read it or to write back, is the only thing that needs Fabric, because the Fabric SDKs only exist in the notebook runtime. Everything else, analysis, scoring, and every export, runs anywhere Python does.
| Mode | Where it runs | Extractor | Auth |
|---|---|---|---|
| Fabric | Fabric notebook | SemanticLinkExtractor (needs [fabric]) |
Ambient, automatic |
Local .pbip |
Any machine | PbipExtractor over local TMDL |
None |
| Local / CI mock | Any machine | MockExtractor over fixture JSON |
None |
Commands
Every command takes --pbip <folder>, --mock, or --workspace <name>. Worked examples for all of them are in the user guide.
| Command | What it does |
|---|---|
analyze |
Extract, classify, score, and export one model |
scan |
The same across a whole workspace or a Git Integration repo, plus workspace-summary.json |
score |
AI readiness score: description coverage, naming consistency, relationship completeness |
governance |
Cross-model naming inconsistencies, duplicate DAX under different names, readiness ranking |
export |
langchain, openai, semantic-kernel, autogen, prep-for-ai, copilot, capability-manifest, agent-readiness, or your own plugin |
auth |
login, status, logout for local Entra sign-in (requires [fabric]) |
apply-descriptions |
Push generated descriptions to a live model through XMLA / TOM |
apply-copilot |
Push an edited Copilot/ folder back through the Fabric REST API |
diff |
Compare two workspace scans: score changes, models added or removed, regressions |
serve |
MCP server exposing eight tools, so your IDE agent can answer questions about your models directly |
Add --llm-enrich to any extraction command to fill in missing descriptions and detect fact-table grain. It is off unless you ask, cost-capped, and works with 10+ providers including a local Ollama.
Before funding a knowledge-graph project: governance --graph-necessity scores whether your star schema already answers real questions without one, so you're not building infrastructure the model doesn't need. Verdict tiers and the scoring signals are in the user guide.
Built for an agent to query safely
An agent writing DAX against your model can't see the traps an analyst would catch on sight: a semi-additive measure summed across time, a ratio averaged instead of recomputed, a column that means something different than its name suggests. Three tools close that gap.
guide_query(MCP). Guidance to read before writing one query: the correct measure, a safe join path, and warnings for semi-additive, ratio, hardcoded-literal, or calculation-group traps.export capability-manifest. The same warnings for the whole model, read once instead of discovered query by query. Every measure comes backanswerable,answerable_with_caveats, orrefused.export agent-readiness. A ranked list of what's currently blocking clean answers, undescribed objects, ambiguous names, missing relationships, each paired with a fix.
fabric-ai-meta export agent-readiness "Contoso Sales" --mock --output ./output
{
"type": "ambiguous_name",
"table": "FactSales",
"column": "Customer_Key",
"message": "Column name 'Customer_Key' is inconsistent (underscore, all-caps abbreviation, or too short).",
"fix": "Rename 'Customer_Key' to a clear, consistent name."
}
Why this exists
Microsoft's AI features for semantic models (Prep for AI, Copilot descriptions, Data Agents, Fabric IQ Ontology) share three limits. Prep for AI is configured by hand, one model at a time, with no bulk API. Nothing exports outside Fabric, so a LangChain or function-calling pipeline starts blind. And nothing compares models, so Total Sales in one and Sum of Sales in another stay invisibly identical.
This is not a replacement for those tools. It is an automation layer on top of them and a bridge to the AI ecosystem outside Fabric.
Library API
from fabric_ai_meta import MockExtractor, score_model, generate_ai_ready_schema, to_openai_function
model = MockExtractor().extract("Adventure Works", "Production Analytics")
score, breakdown = score_model(model)
schema = generate_ai_ready_schema(model)
openai_fn = to_openai_function(model)
51 public exports; see fabric_ai_meta.__all__.
Custom exporters
Subclass BaseExporter, register it under the fabric_ai_meta.exporters entry point group, and it appears as fabric-ai-meta export <name> with the same flags as the built-ins. No fork needed. Worked dbt example: docs/plugin-development.md.
Docs
| User guide | Every capability from install to writeback, with persona-mapped paths |
notebooks/quickstart.ipynb |
The same tour inside a Fabric runtime |
| CI/CD guide | Enforce governance thresholds on every PR, with ready-to-paste workflows |
| Plugin development | Ship your own exporter |
schemas/ |
JSON Schema for every output file |
Contributing
Issues and pull requests welcome. Before opening one:
pip install -e ".[dev]"
pytest tests/ -q # 685 tests, no Fabric runtime or network needed
ruff check .
New exporters ship as plugins rather than PRs here. Sample models under src/fabric_ai_meta/fixtures/ and doc fixes are the easiest first contributions.
If this saved you time, star the repository. That is the signal I use to decide what to build next.
License
MIT. See LICENSE.
Built by Prasanth Sistla. Not affiliated with, endorsed by, or sponsored by Microsoft. "Microsoft Fabric", "Power BI", and "Copilot" are trademarks of Microsoft Corporation.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabric_ai_meta-2.0.0.tar.gz.
File metadata
- Download URL: fabric_ai_meta-2.0.0.tar.gz
- Upload date:
- Size: 339.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9da35c6e46babe5ca0352a1438a768062e48690ef9e5a984cabf7c8cae4d776b
|
|
| MD5 |
64f5ed83ab46596ada888a138dda5e20
|
|
| BLAKE2b-256 |
80fc32d2a9fa965ce05dce420b040b8d95370026d0d614a26c1ee3978b613bd9
|
Provenance
The following attestation bundles were made for fabric_ai_meta-2.0.0.tar.gz:
Publisher:
publish.yml on psistla/fabric-ai-meta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_ai_meta-2.0.0.tar.gz -
Subject digest:
9da35c6e46babe5ca0352a1438a768062e48690ef9e5a984cabf7c8cae4d776b - Sigstore transparency entry: 2620354325
- Sigstore integration time:
-
Permalink:
psistla/fabric-ai-meta@1f3cb8bb7cab84044b2711d89ef9cf36c531e5c9 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/psistla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f3cb8bb7cab84044b2711d89ef9cf36c531e5c9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fabric_ai_meta-2.0.0-py3-none-any.whl.
File metadata
- Download URL: fabric_ai_meta-2.0.0-py3-none-any.whl
- Upload date:
- Size: 121.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9c5cab993ecb018c8f4b40b106e14565e69ea4fa25c7ba571f1ffb6acde163d
|
|
| MD5 |
4c381e849b75929cb4df0a0e98b7930e
|
|
| BLAKE2b-256 |
eb9ba4b64f967bbaef62cf7f791a6da029da51dae7a51d6cdd155b282cd501e1
|
Provenance
The following attestation bundles were made for fabric_ai_meta-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on psistla/fabric-ai-meta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_ai_meta-2.0.0-py3-none-any.whl -
Subject digest:
d9c5cab993ecb018c8f4b40b106e14565e69ea4fa25c7ba571f1ffb6acde163d - Sigstore transparency entry: 2620354333
- Sigstore integration time:
-
Permalink:
psistla/fabric-ai-meta@1f3cb8bb7cab84044b2711d89ef9cf36c531e5c9 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/psistla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f3cb8bb7cab84044b2711d89ef9cf36c531e5c9 -
Trigger Event:
push
-
Statement type: