Beyond Chatbots: Empowering LLMs to Learn and Interact with Data
In our recent showcases with Action Server, including CurlGPT and Database examples, we've uncovered a way to leverage LLMs beyond their everyday use as chat interfaces
February 6, 2024 – Mikko Korpela, Principal Engineer, Robocorp
Enhancing Data Interaction
LLMs have been popularized as advanced chatbots, interpreting and responding to user inputs in conversational formats. However, the real breakthrough comes when these models go beyond superficial conversations. They can understand and interact with data in ways that were previously complex and inaccessible to many. This advanced interaction is facilitated by the LLM's ability to learn from a data source's schema. In this context, a "schema" refers to any representation of the data's structure—be it a formal, detailed blueprint of a database or merely an example snippet of the actual data.
Domain-specific languages (DSLs), such as SQL for database queries or regex for pattern matching, have always been powerful tools for specific tasks. Our approach simplifies this by having LLMs learn the data schema directly and use DSL-driven actions to execute tasks while interacting through a user-friendly chat interface.
A Streamlined Process for Data Interaction
The process we've used unfolds in four straightforward steps:
- An LLM establishes a connection with a data source.
- It then receives a description of the data's schema.
- The LLM uses this schema to learn about the data in context.
- Finally, users interact with an LLM-based chatbot. This chatbot uses the learned schema and DSL to perform tasks, significantly simplifying the data interaction.
Users can leverage the LLM's understanding to carry out complex tasks through simple dialogues without needing to master DSLs or understand the data schemas.
Looking Toward a Future of Accessible Data Interaction
The implications of this development seem profound. It enhances accessibility, allowing anyone to interact with data systems without the prerequisite of programming knowledge or familiarity with data structure in question. It also introduces the concept of generic actions, accepting input in DSL form, that LLMs can employ to interface with any type of data source. This approach means we might no longer need custom APIs or functions for specific tasks. Instead, we can use more universal methods to work with data from many domains.
This LLM-driven data interaction opens up new possibilities for engaging with technology. Patterns like this that tap into the potential of LLM learning could democratize access to complex data systems and redefine our interaction with the digital world.