Forum Discussion

varietas's avatar
varietas
Regular Visitor
22 days ago

data agent can't get data from ontology data source

Hello!

 

I created an entity type in an ontology and successfully added a binding. The data is visible on the entity’s Instances page.

However, when I use “Build agent with AI” to ask very simple questions about this ontology, it consistently returns a response similar to the one shown in the attached screenshot, referring to a “table” or "schema"

 
 

 

As far as I understand, an ontology does not have the concept of tables. Is my understanding incorrect? Do I need to select or configure an ontology table somewhere before the agent can query the data?

 

In addition, when I use "Test data agent" to query the ontology data, the request hangs for several minutes and then returns an error.

 

2 Replies

  • SourinR's avatar
    SourinR
    Regular Visitor

    Your understanding is correct that an ontology doesn't have tables in the traditional sense, and the agent's response referencing "select tables in Schema Catalog" is misleading. As per Microsoft's own ontology + data agent tutorial, once you add the ontology as a source, the entity types should appear directly in the Explorer pane with no table-selection step required as the agent is meant to reason in terms of entity types and relationships, not tables.

    A few things worth checking:

    1. Confirm the ontology graph, and not just the entity, is added as the data source. In your screenshot, the Explorer shows both Ontology_2 (with interview_message as an entity) and a separate Ontology_2_graph_... node. Make sure the data agent's data source is pointing at the ontology item itself, and that the entity type binding is actually published/active, not just visible on the Instances page.
    2. Add the known-issue workaround instruction. Microsoft's docs flag a known issue affecting aggregation/query grounding on ontology sources, and the documented fix is to go to Agent instructions and add: "Support group by in GQL". This has resolved similar "can't query, no tables selected" responses for others, even outside pure aggregation questions, because it nudges the agent's query planner to actually use GQL against the ontology instead of falling back to SQL/table logic.
    3. On the "Test data agent" hang/timeout — this is a known preview limitation. Microsoft's guidance is: if you get a "no data" or timeout error on first queries, wait a few minutes for the agent to finish initializing against the ontology binding, then retry the same query. It's not usually a config problem if it eventually works.
    • varietas's avatar
      varietas
      Regular Visitor

      Thank you.

      I tried many approaches, including the ones you suggested, but none of them resolved the issue. I eventually found this document, which states that the current Data Agent does not support ontology or graph.