
Artificial intelligence (AI) is evolving at an unprecedented pace, and generative AI (genAI) is at the forefront. GenAI capabilities are vast, ranging from text generation to music and art creation. But what makes genAI truly unique is its ability to deeply understand context, producing outputs that closely resemble that of humans.
One of the primary challenges with genAI is the lack of access to private or proprietary data. AI foundation models, of which large language models (LLMs) are a subset, are typically trained on publicly available data, but they don’t have access to confidential or proprietary information. Even if the data were in the public domain, it might be outdated and irrelevant. LLMs also have limitations in recognizing very recent events or knowledge. Furthermore, without proper guidance, LLMs may produce inaccurate information.
Databases play a crucial role in addressing these challenges. Instead of sending prompts directly to LLMs, applications can use databases to retrieve relevant data and include it in the prompt as context. For example, a banking application could query the user’s transaction data from a database, add it to the prompt, and then send this engineered prompt to the LLM. This process is called retrieval-augmented generation (RAG). This approach ensures that the LLM generates accurate and up-to-date responses, eliminating the issues of missing data, stale data, and inaccuracies.
Top 4 database considerations for genAI applications
It won’t be easy for businesses to achieve real competitive advantage leveraging gen AI when everyone has access to the same tools and knowledge base. Rather, the key to differentiation will come from layering your own unique proprietary data on top of gen AI powered by foundation models and LLMs. There are four key considerations organizations should focus on when choosing a database to leverage the full potential of genAI-powered applications:
- Flexible data model: GenAI applications often require different types and formats of data, referred to as multi-modal data. To accommodate these changing data sets, databases should have a flexible data model that allows for easy onboarding of new data without major schema changes. Multi-modal data can be challenging for relational databases that are designed for structured data, where information is organized into rigid tables, rows, and columns with strict schema rules.
- Queryability: The database needs to support rich, expressive queries and secondary indexes to enable real-time, context-aware user experiences. This ensures data can be retrieved in milliseconds, regardless of the complexity of the query or the amount of data in the database.
- Integrated vector search: GenAI applications may need to perform semantic or similarity queries on different types of data, such as free-form text, audio, or images. Vector embeddings capture the semantic meaning of data, making them suitable for various tasks like text classification, machine translation, and sentiment analysis. Databases should provide integrated vector search indexing to eliminate the complexity of keeping two separate systems synchronized.
- Scalability: As genAI applications grow in terms of user base and data size, databases must be able to scale out dynamically to support increasing data volumes and request rates. Native support for scale-out sharding ensures that database limitations aren’t blockers to business growth.
A platform approach to vector search
MongoDB has been extolling the benefits of the document model since its inception. The same flexible schema design principles that make document databases a favorite among developers extend to gen AI use cases, which are inherently multi-modal. Through sharding, databases can scale out to support large increases in the volume of data and requests that come with genAI-powered applications.
MongoDB Atlas — a leading multi-cloud developer data platform — supports vector embeddings natively through Atlas Vector Search so there’s no need to maintain two different systems. Atlas keeps Vector Search indexes up to date with the source data constantly. Developers can use a single endpoint and query language to construct queries that combine regular database query filters and vector search filters. This removes friction and provides an environment for developers to prototype and deliver gen AI solutions rapidly.
Conclusion
GenAI is poised to reshape industries and provide innovative solutions across sectors. By leveraging a database solution that’s built to handle the requirements of AI use cases, businesses can build genAI applications that deliver accurate, context-aware, and dynamic user experiences for today’s fast-paced digital landscape.
Summary
To learn more about how to create and store vector embeddings tailored to your application requirements using machine learning models like OpenAI and Hugging Face, download our white paper: Embedding Generative AI and Advanced Search into your Apps with MongoDB.






