Syntax Validation for Azure Digital Twins Queries

Yash Deshpande 20 Reputation points
2025-02-19T15:47:25.17+00:00

I am developing a RAG-like system to extract data from Azure Digital Twins (ADT). The system generates a query based on user input with the LLM-provided being DTDL models as prompts beforehand.

It would be beneficial to validate the syntax of the query beforehand; if incorrect, the system should loop back to the LLM until it yields a syntactically correct query. However, I have not found any available syntax validator for ADT queries or an efficient method to do so other than just execute the query which would be costly and inefficient in terms of latency.

As someone relatively new to the Azure ecosystem aside from ADT, could anyone provide guidance or resources on this?

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
234 questions
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 35,091 Reputation points MVP
    2025-02-19T20:20:40.8333333+00:00

    Hello @Yash Deshpande ,

    welcome to this moderated Azure community forum.

    Azure Digital Twins comes with an elaborate query language to query twins, relationships, properties, etc.

    In the documentation, only this query reference this available. There is no syntax validation service or API available, other than actually executing the queries.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.