Home / Companies / Supabase / Blog / February 2024

February 2024 Summaries

4 posts from Supabase

Filter
Month: Year:
Post Summaries Back to Blog
PostgREST v12 has been released with the addition of aggregate functions, allowing users to summarize data by performing calculations across groups of rows directly through the PostgREST API. This feature supports common aggregate functions such as avg(), count(), max(), min(), and sum(), enabling users to easily retrieve aggregated values from their datasets. The new feature is deeply integrated with other PostgREST features, making it easy to use in conjunction with existing functionality. However, due to potential performance risks, the feature is disabled by default and must be enabled after reviewing safeguards and implementing strategies such as using pg_plan_filter_module to prevent denial-of-service attacks or excessive resource usage.
Feb 29, 2024 1,436 words in the original blog post.
Recommending relevant content to users is crucial for keeping them engaged in an app. With the emergence of vector databases and Open AI, performing semantic searches with a single query has become more efficient. This article demonstrates how to create a Flutter movie-viewing app that recommends another movie based on what the user is viewing, using Supabase as the vector database and Open AI API for embedding generation. The app populates its database with movie data and generates embeddings using Open AI, then stores them in Supabase for querying. A database function is created to perform a vector similarity search, allowing the app to recommend similar movies to the selected one. The Flutter interface displays the list of recommended movies, showcasing the functionality of the similarity recommendation system powered by Open AI.
Feb 26, 2024 1,793 words in the original blog post.
The author of the blog post describes the process of implementing performance testing for a Realtime service, which is a streaming service working over WebSocket protocol. The goal was to evaluate the system's compliance with its performance requirements and determine how it performs under various loads. The author used k6 as a load generation tool and implemented an observability stack using Prometheus, Grafana, and Telegraf. They also built a simple Go app prototype that could store and execute terraforms and k6 scenarios, giving access to launch history, securing secrets, and managing user management. The author highlights the importance of automation in performance testing and describes their approach to building a complete automated performance testing setup using Terraform.
Feb 21, 2024 1,704 words in the original blog post.
OpenAI has released their third generation of text embeddings models, `text-embedding-3-small` and `text-embedding-3-large`, which outperform their previous model on both MTEB and MIRACL benchmarks. These new models feature a significant update: the ability to "shorten" their dimensions, allowing for more flexible querying and indexing. This is made possible by Matryoshka Representation Learning (MRL), a training technique that embeds information at multiple granularity levels within a single high-dimensional vector. By shortening embeddings, users can speed up vector search with Adaptive Retrieval, which uses two passes: a first pass using a low-dimensional representation and a second pass using the full-size embedding. The optimal dimension size for the first pass is found to be 512 dimensions, resulting in fast query speeds while maintaining high accuracy. Additionally, the sub_vector function allows users to dynamically truncate embeddings to any size, and an index on the documents table can be created to speed up the first pass. While shorter vectors are faster, decreasing accuracy requires loading more records, which impacts speed more than increasing dimension size.
Feb 13, 2024 3,657 words in the original blog post.