Timescale, the Postgres cloud database company, is debuting two new open source extensions—pgvectorscale and pgai—which extend the strengths of PostgreSQL to AI development use cases, such as building retrieval augmented generation (RAG), search, and AI agent applications. Enabling enterprises to benefit from the familiarity of PostgreSQL while still achieving the sort of performance that a specialized vector database provides, Timescale’s latest extensions aim to make PostgreSQL better for AI development.
To compete in today’s AI-obsessed world, many organizations have turned to dedicated vector databases—such as Pinecone—to build their AI apps. While the allure of these specialized databases has much to do with its performance advantages born from purpose-built architectures and algorithms, they come at a cost—both in resources and stack complexity, according to Timescale.
Challenging this standard, Timescale’s open source extensions aim to bring PostgreSQL to the world of AI, offering user familiarity and simplified data architectures as well as high performance, all backed by the power of the Postgres community. Timescale’s latest extensions innovate upon pgvector, the popular, open source extension for vector data in PostgreSQL.
“There's this movement where developers are looking for really simple solutions, trading [in] brittle, complex solutions [that force you] to duct tape all these different systems together,” said Avthar Sewrathan, lead technical product marketing manager at Timescale. “[We believe] that Postgres is going to be the bedrock for the future of data and data applications, and I think Postgres for AI is a huge part of that.”
Acknowledging pgvector’s popularity, Timescale built upon the extension, offering pgvectorscale—a new index type developed in the Rust programming language that delivers greater scale and efficiency in querying vectors at a better price than specialized vector databases. Key to pgvectorscale’s success is two innovations: a DiskANN index—based on research from Microsoft—and Statistical Binary Quantization—developed by Timescale researchers, enhancing standard Binary Quantization techniques, according to the company.
Compared to Pinecone, Timescale’s pgvectorscale extensions achieved the following benchmarks when querying a dataset of 50 million Cohere embeddings (768 dimension):
- PostgreSQL outperformed Pinecone’s storage optimized index (s1) with 28x lower p95 latency and 16x higher query throughput for approximate nearest neighbor queries at 99% recall
- PostgreSQL with pgvectorscale achieves 4x lower p95 latency and 1.5x higher query throughput compared to Pinecone’s performance optimized index (p2) at 90% recall on the same dataset.
- Self-hosting PostgreSQL with pgvector and pgvectorscale was 4-5x cheaper than using Pinecone
With pgai, developers benefit from more intuitive AI workflows added to PostgreSQL that make it easy to build search and RAG applications. As of the extension’s initial release, pgai supports creating OpenAI embeddings as well as using OpenAI chat completions—from models such as GPT-4o—directly within PostgreSQL. This innovation is particularly relevant as, with the explosive popularity of AI, developers struggle with the many hats they must wear to develop robust AI apps.
“There's a difference between the folks that are building applications and the folks that have traditionally done machine learning research,” explained Sewrathan. “On one hand, you have the researchers, and on the other hand, you have the application developers. In the quest to build AI applications, you have application developers trying to learn how to leverage these new tools, but the ecosystem around it was traditionally tailored for researchers, and so there's a mismatch there.”
“What motivated us with pgai is we said, ‘Okay, how can we bring things like creation of embeddings and accessing chat completions from models in a format, in a syntax, and in a workflow that these application developers already know and are already familiar with?’” Sewrathan continued.
A large emphasis for this announcement is placed on the open source licenses of Timescale’s latest extensions, decreasing the barrier to innovation for AI supported by the rich, vibrant Postgres community and ecosystem, according to the company.
“We made a deliberate decision to make these extensions open source under the Postgres license, which is an extremely permissive license; you can use it for any application,” Sewrathan stated. “I've noticed the tremendous potential in terms of AI transforming a whole bunch of applications and industries. The idea of the de facto database for AI being a closed source database…didn't really sit well with us.”
To learn more about Timescale’s latest extensions for Postgres, please visit https://www.timescale.com/.