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 intelligently retrieving and searching data . 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 is achieved through AI's ability to perform searches based on less rigid and more nuanced criteria, using features that mimic human thinking.
LLMs , or large-scale language models, are where knowledge is intelligently encoded. These models are not relational databases and never will be, as they represent static snapshots created ("trained") at specific points in time and are not updated until the next training session.
RAG , or retrieval augmented generation, is a term that's becoming increasingly popular. This technology allows LLMs to be dynamically updated using their 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 that data.
Large language models, or LLMs, underpin 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 in complex structures, enabling them to answer questions, translate languages, summarize texts, and much more. However, it's 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 quickly become outdated in a world where data and knowledge constantly evolve. The ability to update and maintain the relevance of these models is therefore a significant challenge.
Retrieval-Augmented Generation (RAG) is an emerging technology rapidly gaining popularity. This methodology allows LLMs to be dynamically updated using user-specific data. Essentially, 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 generated responses. With RAG, even small and 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 customized based on 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 each transaction is executed completely and reliably, maintaining data integrity even in the event of errors or system failures. Atomicity ensures that each transaction is an indivisible unit; consistency ensures that the database transitions 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 prevent data corruption and ensure that read and write operations are always consistent and secure. This becomes particularly important when integrating advanced features like vector management and AI into the database, as any compromise in data integrity could significantly impact business operations and the quality of the information generated by 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, MariaDB's vector search capabilities will be integrated directly into the server core. This means no additional extensions will be required to take advantage of these advanced features, greatly simplifying the implementation and maintenance process for users. Native server integration will also ensure greater efficiency and consistency in database operations, offering a smoother and more reliable user experience.
MariaDB Vector will keep large language models (LLMs) separate from server binaries, allowing users to freely choose from several commercially available LLMs, such as ChatGPT, Claude, and LLaMa2. This flexibility allows companies to select the model that best suits their specific needs, without being locked into a single solution. Furthermore, it allows users to update or change the models used without having to modify the database infrastructure, ensuring greater adaptability and future-proofing of 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 release available in the bb-11.4-vec-preview branch . The developer release will be stable by the end of May, ready for testing 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.
