Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
sdinev
Frequent Visitor

Data Agent fails to query Ontology

Hello,
I’m experiencing an error when using the Data Agent in Microsoft Fabric to query my Ontology.
Even when I ask very simple questions, the Data Agent fails every time with the following error:

Failed to execute step (RAID: "GUID"). Error: Failed to generate NL2Ontology query with error "{"code":"InternalError","subCode":0,"message":"An internal error occurred.","timeStamp":"2026-04-20T13:00:42.7677176Z","httpStatusCode":500,"hresult":-2147467259,"details":[{"code":"RootActivityId","message":"GUID"},{"code":"Param1","message":"Failed to translate NL query to ontology query."}]}"

 

This was working correctly until last week, but for the past four days it has consistently failed with the error above, without any changes on my side.
The Data Agent works perfectly when querying:
a Lakehouse (NL2SQL), and
a Semantic Model (NL2DAX).
The issue occurs only when the Ontology is used as the data source.

Also I have "Support GROUP BY in GQL" inside the data agent's instructions.


Could someone please help me understand what might have changed recently or how to troubleshoot this issue?
Thank you in advance.

4 REPLIES 4
apturlov
Skilled Sharer
Skilled Sharer

@sdinev If you can create a Data agent in a workspace which requires an F-SKU commercial Fabric capacity, and can add an existing Ontology to this agent as a data source, then your Fabric tenant settings are correct.

I've been struggling with the same error for many weeks until I noticed that if an Ontology and a Data Agent are in the same workspace the error suddently disappears and all works.

The fact is that Ontology is in Preview and changes dramatically very often. I strongly recommend aginst any productionized usage of Ontology as the data source for the time being until it reaches GA. There are a lot of kinks in Ontology that have to be sorted out before it happens.

Considering that any Ontology is based on other Fabric data sources - Lakehouses and Eventhouses, I suggest to use the Ontology data sources directly in your Data agents instead and provide good instructions for both Agent logic and data sources themselves to compensate for not using an Ontology. You cannot directly replace Ontology relationships in Graph with anything else especially when it comes to cross-storage relationships like KQL table and Lakehouse table so you need to cover this with the instructions and sample queries. Using a Semantic model for your Data agent may help but only for Lakehouse data as you cannot integrate KQL tables into a Semantic model yet.

Hope this helps to prioritize your efforts in delivering a working Data agent experience instead of fighting internal issues of the Ontology workload. I am a big fan of Ontology but after experimenting for many weeks and being in direct contact with Microsoft team I decided that it's still too early to rely on Ontology as a data source for Data Agents.

sdinev
Frequent Visitor

Hello,

I followed the troubleshooting steps from Microsoft Learn.

I verified that the Data Agent instruction text is exactly: Support group by in GQL
(with no variations or extra characters).

I checked the ontology preview experience and the data bindings health: entity types load correctly, relationships are visible, and the Graph is not empty.

I recreated the Data Agent from scratch and pointed it to the same ontology, but the issue still persists. Recreating the agent is recommended in the tutorial when troubleshooting initialization or agent behavior.

 

However, I am blocked on step 4: I cannot find the tenant setting “Users can create and share Data agent item types (preview)” anywhere in the Fabric Admin portal tenant settings. According to the documentation, this setting is required in order to create or use a Fabric Data Agent with an ontology source, but it does not appear in our tenant UI.

Do you think these attached screenshots have anything related to the problem ?
Screenshot 2026-04-24 103606.pngScreenshot 2026-04-24 103813.png

 

On the first image there is no Ontology or Graph mentioned regarding the Data Agent GA.
On the second image Microsoft says that NL2GQL is planned.

AngelKostadinov
New Member

Same story here, starting from this week, our Data agent has stopped working, throwing the same error!

arabalca
Impactful Individual
Impactful Individual

Hi @sdinev ,

Does the error persist?

 

Based on the error you're describing, the issue seems to be in the NL2Ontology translation layer on the Fabric IQ backend, not in your ontology or your data. The fact that NL2SQL and NL2DAX work perfectly confirms this.

Try these steps in order and let us know if any of them resolves it:

  1. Verify that the agent instruction text is exactly Support group by in GQL
    in English, with no variations, quotes, or extra characters. Reference: https://learn.microsoft.com/en-us/fabric/iq/ontology/tutorial-4-create-data-agent#provide-agent-inst...
  2. Check the data bindings health in the ontology preview experience: entity types should load, relationships should be visible, and the Graph should not be empty. A broken binding can cause NL2Ontology to fail when trying to introspect the schema, even if the error message doesn't make that obvious. Reference: https://learn.microsoft.com/en-us/fabric/iq/ontology/resources-troubleshooting
  3. Recreate the Data Agent from scratch pointing to the same ontology. The agent can end up in a corrupted state after a silent service-side update.
  4. Confirm that all required tenant settings are still enabled, including Data agent item types . Fabric deployments can occasionally reset these. Reference: https://learn.microsoft.com/en-us/fabric/iq/ontology/overview-tenant-settings
  5. Open a support ticket at https://support.fabric.microsoft.com including the RootActivityId  GUID from the error. That identifier allows Microsoft to correlate with the internal NL2Ontology pipeline logs.

If my comment helped solve your question, it would be great if you could like the comment and mark it as the accepted solution. It helps others with the same issue and also motivates me to keep contributing.

 

Thanks a lot, I really appreciate it.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.

Top Solution Authors
Top Kudoed Authors