Embargoed until 10/29 @ 6 AM PT
[note to editors: all the lowercase references to pgwhatever are correct.]
With the rise of AI and large-scale language models (LLMs), developers asked to create AI applications may feel transported to alien territory. Open source PostgreSQL database vendor Timescale’s answer to this is a set of tools that help developers without an AI background build enterprise-grade apps.
A new addition to the pgai tool suite is pgai Vectorizer. It integrates the entire embedding process into Postgres, allowing developers to create, store, and manage vector embeddings alongside relational data without adding external tools or infrastructure.
All tools are built on pgvector, an open source extension that enables vector searching in Postgres.
While many Postgres vendors added pgvector in a rush to provide AI capabilities, Timescale argues that alone is not enough to help developers new to AI.
“If you think about who is actually building AI applications, it really comes down to the software developers, the application developers,” said Avthar Sewrathan, AI and developer product lead at Timescale. Let me explain. They have experience building production systems, but may not have a background in AI or ML, traditionally the domain of data scientists or research engineers, but they don’t need to be full-stack engineers or back-end engineers. .
“Vectorizer addresses the question, ‘Postgres has vector search capabilities, but how do I get started in the first place?'” “How can we do this, and what are the needs and demands associated with that?” he said.
Creating embeds with Autopilot
Summarizing the pgai Vectorizer, he explained: [It automates] It’s the process of creating an embedding from source data, allowing teams to essentially set it and forget it.
When new data is added to a table, embeddings are automatically created and everything is automatically synced in the background, avoiding all these issues with data syncing and scaling embeddings, and allowing your development team to It just removes the work you need to do yourself. Otherwise. “
He said his clients are increasingly asking about operational tasks related to AI, and their concerns are growing.
PGAI Vectorizer allows developers to:
- Manage all of your AI app’s data (vectors, metadata, event data) on the same PostgreSQL database platform that your AI app knows.
- Automatically synchronize data changes to vector embeddings in real time.
- Easily switch between embedded models for rapid testing and experimentation without changing code or creating custom data pipelines.
- Track model versions and ensure backward compatibility during rollouts for smooth transitions.
“PGAI Vectorizer is a game changer. It streamlines the entire AI workflow, from embed creation to real-time synchronization, allowing us to deliver AI applications faster and more efficiently,” said MarketReader’s Web Begole CTO. states. “By integrating everything directly into PostgreSQL, pgai Vectorizer eliminates the need for external tools or expertise, making it easier for our team to focus on innovation rather than infrastructure.”
“If you want to build a production-grade application, there are actually very difficult engineering challenges to overcome.”
— Avthar Sewrathan, Timescale AI Product Lead
Sewrathan pointed out four tasks that pgai Vectorizer can replace for developers.
- Building an ETL pipeline — Ingest a source document or image, coordinate a call to OpenAI or another model, and create the actual embedding.
- Chunking and formatting — “Before creating an embed, [the data] Convert it to the appropriate format and size to fit within the token limits of your embedding model. And that’s another task we get rid of. Set this up with one line of code and it will run automatically in the background. ” he said.
- Scaling and managing your embed creation pipeline — “Most developers can write an embedding creation script in Python in less than 30 minutes, but it’s hard to find something that actually scales to deal with OpenAI’s rate limits and queues when you have hundreds of thousands of embeddings to create.” It’s another thing to have something to deal with. Our system is an out-of-the-box feature that replaces these queuing systems for updates and synchronization.”
- synchronization — “When you build an AI application, you need code that checks “OK, these embeddings were created in the vector database.” [But] Does the relational database have the correct metadata? Or maybe, for example, there is a new document in the relational database and you need to check if a corresponding vector has been created. This kind of code is [what] I call syncing like a staleness check,” Sewrathan said. We guarantee that your embeds are up to date and will notify you if they are not.
“I think a lot of what we see in the industry today are alternatives to vector databases, databases with added vector search capabilities that are considered good enough to be an essential component in building AI applications. But what we know, and what we’ve talked to with hundreds of developers over the past year and a half as we’ve been building this project, is that vector search is just one part of building an AI system. ” said Seurasan.
“If you want to build a production-grade application, there are actually very difficult engineering challenges that need to be overcome. So our whole paper is about not only vector search, but also AI It’s about providing developers with a set of tools to solve the problems of system scaling, embedding creation, updating, data synchronization, and embedding staleness. [access] Model in database. ”
At first, only pgai
When introducing the first tool last June, the company said in a blog post: “Simply put, we built pgai to train more PostgreSQL developers and AI engineers.”
PGAI, short for Postgres Artificial Intelligence, was designed to simplify the process of building semantic search, search augmented generation (RAG), and other AI applications in PostgreSQL.
“Simply put, we built pgai to train more PostgreSQL developers and AI engineers.”
—Timescale blog post
“PGAI complements pgvector by storing embeddings in the pgvector data type and using Python and PL/Python to interact with the model API from within a PostgreSQL database,” it explains on its GitHub page. . This enables classification, summarization, and data enrichment tasks on existing relational data. Create the embedding directly in the database and skip the task of storing the embedding there.
Initially only supporting OpenAI, pgai and pgai Vectorizer now support Ollama, Anthropic, and Cohere. The company announced plans to support more models, including Claud and Hugging Face.
Improved scaling
pgvectorscale, also introduced in June, is aimed at handling large-scale, high-performance AI use cases.
“Pgvectorscale is an extension of PostgreSQL that brings specialized data structures and algorithms for large-scale vector retrieval and storage, providing performance comparable to, and even better than, specialized vector databases like Pinecone. ” says the company.
Adds a StreamingDiskANN vector search index inspired by Microsoft’s DiskANN algorithm, which addresses the limitations of in-memory indexes like HNSW (hierarchical navigable small world) by storing portions of the index on disk. I did. Solid-state disks are much cheaper than RAM, so storing your index on disk can provide significant cost savings.
We also developed Statistical Binary Quantization (SBQ), which employs compression of standard binary quantization techniques to save storage space while improving accuracy.
While pgvector is written in C, pgvectorscale is developed in Rust using the PGRX framework, adding access to another rapidly growing community.
All open source
Compression means lower infrastructure costs, but Sewrathan also pointed to other cost savings.
“We believe that by being able to reduce the amount of custom code that we actually run, we can save a lot of engineering time and actually be able to work with smaller teams. [Previously you might have needed] There are 10 developers. Now you can just do [with] With Vectorizer, you don’t need two or three because a lot of things are automated and you can do it right away,” he said.
In his article for The New Stack, Sewrathan also mentioned benchmark tests comparing the company’s version of pgvector with Pinecone, showing that the Postgres extension is not only significantly cheaper, but also faster than a standalone vector database. I conclude that there is.
Touting the well-established and popular PostgreSQL, Sewrathan writes:
“If you choose a standalone vector database, you lose the full range of data types, transactional semantics, and operational capabilities that exist in a general-purpose database and are required for deploying production apps.”
Although the pgai tool is open source, Timescale also offers it as part of its fully managed database service.
YouTube.COM/THENEWSTACK
Technology moves fast, so don’t miss an episode. Subscribe to our YouTube channel to stream all our podcasts, interviews, demos, and more.
Subscribe