
The Talking Database
An AI assistant that helps you query your databases without complicated query languages like SQL.


The Problem
I have a couple of databases that I need to query fairly regularly. Typically, querying databases like CloudSQL, MongoDB, or Firestore requires specialised knowledge of the query language or SDK and the data schema you are working with. It also means opening up a command-line tool, BigQuery, or some unintuitive UI like MongoDB Compass or Cloud Firestore Console (depending on the type of data you require and how quickly you require it.). For each database, the process and tools are different and accessing data is a means to an end for me – not my day job.
The Solution
Hover to see more

RAG
Chat interface
The conversation happens in natural language.
Knowledge of the database structure
and query language.
The AI understands the user's intent and gives guidance where necessary.
Intent
Protected against common vulnerabilities such as SQL injection attacks.
Secure
Introducing the Talking Database
The Talking Database represents a solution to these challenges. This tool transforms how I interact with my databases by enabling me to query data through a conversational AI interface. I simply type my questions into a chat window in natural language, and the AI assistant intelligently translates these queries into the appropriate database language. It then executes the query, retrieves the results, and translates these back into natural, easy-to-understand language. This approach combines the reasoning power of an LLM with the precision and relevance of real-time data retrieval.
RAG
The Talking Database is an experiment in Retrieval-Augmented Generation (RAG). RAG is a technique used in conversational AI to improve the accuracy and relevance of responses. The Talking Database employs RAG by translating user questions into specific database queries, retrieving the relevant data, and seamlessly integrating the results into a natural language response. It does this with a complex interlinking of AI assistants and functions. It ensures that I receive accurate, context-aware answers drawn directly from the underlying database, enhancing the quality and relevance of the information provided.
Beyond Natural Language Query
The system's capabilities extend beyond simple query translation. It is designed to interpret the intent and required detail behind my question, adjusting the complexity and format of the data returned accordingly. Whether I need detailed paragraphs, bullet points, or numbered lists, the Talking Database tailors its responses to suit the query's context. Additionally, it includes features such as providing hints and suggestions when a query does not match available data, thereby guiding users towards more effective inquiries.
Security
The Talking Database incorporates robust built-in security measures to safeguard against common vulnerabilities like SQL injection attacks. These features not only enhance data protection but also allow me to confidently engage with the system without compromising sensitive information.
Future Development
Currently, I'm asking the AI when I want to switch databases. This is turning out to be annoying, so I'm planning to add a dropdown menu to be able to select different databases. This would further enhance The Talking Database's utility and save some typing time.
Additionally, adding text-to-speech and speech-to-text can be fun (think celebrity database narration.)! Imagine asking Dr House about public medical trial data, or getting Midge Campbell (Scarlett Johansson) to give you the latest movie releases by Wes Anderson.