Forum Discussion

RaajPritvi26's avatar
RaajPritvi26
Frequent Visitor
7 months ago
Solved

Data Agent Example Queries

Hello everyone,

 

While creating a data agent in Fabric, I added some SQL queries as direction for the agent. While doing it manually, I noticed that everytime I added a query, the agent will proceed to validate all the queries including the ones that were already validated. Is there a way to disable this?

 

Also, I tried uploading JSON files as the example queries, however the validating never stopped. Not sure whats the issue there.

 

Anyone have any ideas how to resolve the above two?

  • v-dineshya's avatar
    v-dineshya
    7 months ago

    Hi RaajPritvi26 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Hi ssrithar  and apturlov , Thank you for your prompt responses.

     

    Hi RaajPritvi26 , 

    The agent only uses the top four most relevant examples at runtime, but it does not define an upper storage limit. Even the UI currently struggles with large sets. The validator re-checks the entire set every time an example is added or changed. Large sets increase validation load significantly.

     

    Note: 20–40 well‑crafted examples per domain confirmed to work reliably across creators. Avoid attempts to upload >100 until Microsoft improves validation performance. The agent makes use of only a handful during execution, so massive libraries provide minimal additional benefit but large authoring overhead.

     

    Please refer below links.

    Data Agent Example Queries - Microsoft Fabric | Microsoft Learn

    Creator Improvements in the Data Agent | Microsoft Fabric Blog | Microsoft Fabric

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh

6 Replies

  • Hi RaajPritvi26 

     

    Great question — both of these are known limitations in the current Fabric Data Agent experience.

    There is currently no way to disable this behavior.

     

    Suggested Workaround:

    • Keep each query simple and modular during build/test

    • Paste in pre-validated SQL (run in Fabric Warehouse first)

     

    JSON Upload Hangs During Validation

     

    Why This Happens:

    • The agent expects a very specific JSON structure

    • Any deviation (invalid syntax, missing fields, extra commas, bad escaping) can cause validation to hang or silently fail

    • Complex SQL strings with newline characters or quotes can also trip up the parser

    How to Fix It:

    1. Start with a minimal valid JSON template

    2. Avoid complex formatting in the query string
    3. Validate the JSON before uploading
    4. Upload a few queries at a time to isolate errors
    5. Improve error handling for bad JSON (e.g., show validation error instead of silent loop)

    6. Support bulk editing with syntax highlighting in the agent editor

     

     

    If this post helps, then please appreciate giving a Kudos or accepting as a Solution to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

     

    • RaajPritvi26's avatar
      RaajPritvi26
      Frequent Visitor

      Hi ssrithar 

       

      Thanks! Appreciate your insights! Another thing that came across my mind is that is there a max number of example queries we can input into the data agent? I played around and noticed anything above 100 will also result in the perpetual validation issue.

      • apturlov's avatar
        apturlov
        Super User

        ssrithar I am not an expert in how this is done in Fabric, but I wanted to mention that the Data Agent instructions become part of the context during the chat. The larger the instruction the larger the context the more tokens it consumes during the chats. That will be eating the Fabric Capacity faster. I would suggest there should be a balance between how compex the instructions are and the goal of what you are trying to achive with the agent. I would try and match the instructions set with the main case scenario of this agent intended usage.