Large language models, such as ChatGPT, have gained great popularity in the technology community and the general public due to their ability to interact with users using natural language commands and questions. However, these exchanges can be ineffective and lead to unexpected or unsatisfactory responses.
Faced with this problem, ETH Zurich researchers have developed a new open source platform and programming language called LMQL (Language Model Query Language) that allows more controlled and secure interaction with large language models such as ChatGPT.
A new programming language
LMQL is the first language to combine the power of natural language and programming language to interact with large language models. For simple queries, it is enough to guide ChatGPT with natural language. However, for more complex and specific tasks, such as creating a database or analyzing data, it is essential to instruct the language model with formal programming constructs to ensure that the desired result is achieved.
The professor of Computer Science and one of the creators of LMQL, Martin Vechev, points out that this platform offers a more concise and cheaper way of interacting with language models. By reducing the necessary exchanges with the language model, the cost of the interaction is also reduced, which can be quite high. In addition, LMQL increases the chances of getting the desired result, and in some cases even allows you to get a result that would not have been achieved otherwise.
The importance of security and transparency
Large language models are based on huge data sets that users cannot control or understand internally. This can cause unexpected or controversial results. LMQL allows users to set security constraints to guide the language model and avoid unwanted results. It is true that the prevention of bad behavior cannot be completely guaranteed, but LMQL is a step in that direction.
Many companies develop their own closed-form language models, which makes it difficult to be transparent and understand the reasoning behind the results obtained. LMQL is an open source tool that offers transparency, accessibility and adaptability to users.
Accessible to all types of users
LMQL is a declarative language similar to SQL from a syntactic point of view. Therefore, it is very accessible and does not require extensive knowledge to achieve the desired results. Furthermore, this platform can work as an innovative tool for researchers from different disciplines, who can interact with large language models in a precise and easy way.
Luca Beurer-Kellner, one of the researchers, says that LMQL makes interacting with language models much more accessible, even for less-experienced users or those who don’t have time to code, since it’s not a core part of their job. Furthermore, LMQL can be used by more advanced users as a basis for building their own programs and applications to interact with language models.
LMQL represents a significant advance in interacting with large language models. The combination of natural language and programming allows for more efficient and precise communication between users and language models, which translates into faster and more accurate results. On the other hand, and no less important, the transparency and security offered by LMQL are fundamental to guarantee that the language models are used responsibly and to avoid unwanted results.
The development of LMQL also shows the importance of collaboration between academia and industry to create more accessible and transparent tools for users. LMQL is an example of how open source tools can help ensure that large language models are used ethically and responsibly.