Table of contents of the article:
MariaDB is a powerful open-source relational database management system, known for its scalability, reliability, and standards compliance. Derived from MySQL, MariaDB offers a number of advanced features that make it a popular choice for developers and businesses around the world.
MariaDB Corporation is the company that develops and supports MariaDB. Founded by some of the original developers of MySQL, MariaDB Corporation is dedicated to providing high-quality database solutions that meet modern data management needs. With a strong commitment to open-source, MariaDB Corporation works closely with the community to constantly innovate and improve MariaDB software, ensuring high performance, security and reliability for its users.
In fact, with the advent of artificial intelligence it has been established that relational databases are the ideal place for AI data. Users need their vectors along with the rest of their data, in a standard database that offers performance, scalability and all the other traditional virtues, such as ACID compliance.
For this reason, MariaDB Corporation is developing MariaDB Vector, a first preview version of which is expected to be released by the end of the month.
Amazon's support for MariaDB Vector
It is not only MariaDB Corporation that supports this logic. Amazon itself, through Sirish Chandrasekharan, General Manager of Amazon Relational Database Services and board member of the MariaDB Foundation, supports this vision. During an interview with The New Stack at the Open Source Summit 2024 in Seattle, Chandrasekharan clearly and concisely explained the importance of integrating generative AI into relational databases.
Two key concepts of generative AI: LLM and RAG
Generative AI is a field of artificial intelligence that deals with the creation of new content using existing data. This technology is not limited to just one type of data, but encompasses a wide range of applications, including text, images, video, and even audio. For example, generative AI models can write articles, generate realistic images from textual descriptions, create animated videos, or even compose music.
The word “generative” suggests the ability to create new data, but in the context of vector databases, it's also about retrieving and searching data intelligently. In other words, while generative AI can indeed create new content, in vector databases it focuses on optimizing the search and retrieval of relevant information from existing data. This happens thanks to AI's ability to carry out searches based on less rigid and more nuanced criteria, using characteristics that simulate human thinking.
LLM, large language models, are where knowledge is intelligently encoded. These models are not relational databases and will never become one, as they represent static snapshots created (“trained”) at specific times and are not updated until the next training session.
RAG, recovery-augmented generation, is a term that is becoming increasingly popular. This technology allows you to dynamically update LLMs using your own data. LLMs are static and only a few entities are large enough to create (“train”) their own. With RAG, users of any size can create (“vectorize” or “embed”) representations of their data, using the intelligence of their chosen LLM to interpret this data.
Large language models, or LLMs, are the basis of most generative AI applications. These models are trained on vast amounts of textual data, allowing them to intelligently understand and generate human language. LLMs encode knowledge into complex structures, allowing them to answer questions, translate languages, summarize texts and much more. However, it is important to note that LLMs are not relational databases. They represent static snapshots created during specific training periods and are not continuously updated. Once trained, LLMs remain unchanged until the next training session, which can be time-consuming and resource-intensive. This limitation means that the information contained in LLMs can become obsolete quickly in a world where data and knowledge are constantly evolving. The ability to update and maintain the relevance of these models is therefore a significant challenge.
Retrieval-augmented generation, or RAG (Retrieval-Augmented Generation), is an emerging technology that is rapidly gaining popularity. This methodology allows LLMs to be dynamically updated using user-specific data. In practice, RAG combines the power of LLMs with the ability to search and retrieve data from other sources, creating a synergy that significantly improves the relevance and accuracy of the answers generated. With RAG, even small to medium-sized companies can leverage the power of LLMs without having to deal with the cost and complexity of training their own models. Using RAG, users can “vectorize” or “embed” their specific data, creating representations that can be easily interpreted by LLMs. This allows AI responses to be tailored to specific business data, thus improving the effectiveness of generative AI applications in commercial contexts.
The synergy between LLM and RAG is crucial to overcome the intrinsic limitations of static language models. While LLMs offer a solid foundation of general knowledge, RAG's ability to incorporate up-to-date, context-specific data allows for greater personalization and relevance of responses. This is particularly useful in environments where data changes rapidly or where user needs are very specific. For example, in the medical sector, an LLM can provide general information about diseases, but integration with RAG can allow the latest research or clinical data to be retrieved and presented, significantly improving the quality of information provided to medical professionals.
Vectors, vector databases and vector indices
ACID is still a virtue
ACID, which stands for Atomicity, Consistency, Isolation and Durability, represents the four fundamental virtues of transactions in relational databases. These principles ensure that every transaction is executed completely and reliably, maintaining data integrity even in the event of system errors or failures. Atomicity ensures that each transaction is an indivisible unit; consistency ensures that the database moves from one valid state to another; isolation prevents transactions from interfering with each other; and durability ensures that transaction results persist even after system crashes.
Even in the context of generative AI, these virtues remain essential to ensure data reliability and security. With generative AI requiring large amounts of data and complex operations, maintaining ACID properties is crucial to preventing data corruptions and ensuring that read and write operations are always consistent and secure. This becomes especially important when integrating advanced features such as vector management and AI into the database, as any compromise in data integrity could have significant impacts on business operations and the quality of the information generated by the AI.
Highlights from Sirish Chandrasekharan's interview
Chandrasekharan highlighted several key points during his interview:
- Customers base their business on relational databases, which are critical to businesses.
- Open source databases have reached a good level, allowing companies to rely on them.
- AWS is increasing its investment in Open Source.
- For generative AI to be effective, it must be based on existing and accumulated data, which is found in RDBMSs.
- RAG allows you to customize an LLM for your business needs.
- There is no need to create new vector databases; vectors should be integrated into existing databases.
- PostgreSQL already has a vector storage plugin supported by AWS, which is also supporting the MariaDB Foundation's vector work.
- Amazon is the third largest contributor to MariaDB Server, after MariaDB plc and MariaDB Foundation.
MariaDB Vector: a look into the future
MariaDB Corporation and MariaDB Foundation have been working for some time on MariaDB Vector, an innovative project that will bring advanced vector search capabilities to the MariaDB database. This development represents a significant step toward integrating AI capabilities directly into relational databases, dramatically improving the ability to manage and search complex data.
The first developer preview of MariaDB Vector will be available in May and will focus on the implementation of the Hierarchical Navigable Small World (HNSW) method, which is generally considered better than IVFFlat (Inverted File Flat) due to its superior scalability performance and accuracy in search queries. similarities. This technical choice will ensure that MariaDB Vector can effectively manage large volumes of vector data, offering fast response times and accurate results, making it ideal for critical applications requiring high performance.
Unlike other solutions like PG Vector, the vector search functions in MariaDB will be integrated directly into the server core. This means that no additional extensions will be needed to take advantage of these advanced features, significantly simplifying the implementation and maintenance process for users. Native integration into the server will also ensure greater efficiency and consistency in database operations, providing a smoother and more reliable user experience.
MariaDB Vector will keep large language models (LLMs) separate from server binaries, allowing users to freely choose between different LLMs available on the market, such as ChatGPT, Claude and LLaMa2. This flexibility allows companies to select the model that best suits their specific needs, without being tied to a single solution. Furthermore, it allows you to update or change the models used without having to modify the database infrastructure, ensuring greater adaptability and future-proofing of the implemented solutions.
The primary use case for MariaDB Vector will be Retrieval Augmented Generation (RAG), a technique that combines the power of LLMs with the ability to retrieve specific, relevant data from the database. This approach will allow AI responses to be personalized based on specific business data, significantly improving the relevance and usefulness of the information generated. However, concrete use cases for MariaDB Vector are still being defined and developed, with new applications and use scenarios emerging as the technology is adopted and field-tested.
Test MariaDB Vector
MariaDB Corporation invites users to test MariaDB Vector, with a nightly version available in the branch bb-11.4-vec-preview. The developer version will be stable by the end of May, ready to be tested on common use cases.
Generative AI isn't just hype, and combining it with open-source relational databases is the next crucial step. Around FOSDEM in March, the basic functionality of MariaDB Vector was already demonstrated. You will soon be able to get the first preview version of MariaDB Vector on the MariaDB download pages.