Best practices for AI/ML application design
This section covers best practices for the five concerns covered in this chapter—data modeling, data storage, data flow, data freshness and retention, and security and RBAC. These guidelines will help ensure that your application is efficient, scalable, and secure, providing a solid foundation for building reliable and high-performing AI apps. Here are the top two best practices for each aspect of your AI/ML application design.
- Data modeling: The following techniques ensure efficiency and performance for handling embeddings:
- Embeddings in separate collections: Store embeddings in a separate collection to avoid bloated documents, especially when multiple embeddings and nested indexing limitations are involved. Duplicate fields to ensure efficient filtering and maintain performant searches.
- Hybrid search: Combine semantic and lexical searches using reciprocal rank fusion. This hybrid approach boosts search functionality by leveraging...