VOOZH about

URL: https://thenewstack.io/making-adding-ai-apps-with-postgres-easier-for-developers/

⇱ Making Adding AI Apps with Postgres Easier for Developers - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-10-29 06:31:39
Making Adding AI Apps with Postgres Easier for Developers
profile,
AI Engineering / Databases

Making Adding AI Apps with Postgres Easier for Developers

With Timescale’s AI tool suite, you can create and manage vector embeddings alongside relational data without external tools or added infrastructure.
Oct 29th, 2024 6:31am by Susan Hall
👁 Featued image for: Making Adding AI Apps with Postgres Easier for Developers
Image from elenabsl on Shutterstock

With the rise of AI and large language models (LLMs), developers called on to create AI applications might feel they’ve been shuttled into alien terrain. Open source PostgreSQL database vendor Timescale’s answer to this is a set of tools to help developers who have no background in AI to build enterprise-grade apps.

The newest addition to its pgai tool suite is pgai Vectorizer, which integrates the entire embedding process into Postgres, allowing developers to create, store and manage vector embeddings alongside relational data without external tools or added infrastructure.

All the tools are built atop pgvector, the open source extension enabling vector search in Postgres.

While a number of Postgres vendors have added pgvector in the mad rush to offer AI capabilities, Timescale maintains that’s not enough to help developers new to AI get started.

“If you think about who is actually building AI applications, it actually falls on to the software developer, the application developer,” explained Avthar Sewrathan, AI and developer product lead for Timescale. While they have experience building production systems, they might not have AI and ML backgrounds, which traditionally have been the domain of data scientists or research engineers, but they are not necessarily full-stack engineers or backend engineers.

“Vectorizer really deals with, ‘OK, we have vector search capabilities in Postgres, but how do you get started in the first place? And then also, once you’ve created embeddings, how do you get to where you can actually have a production application, and what are the needs and demands along with that?’” he said.

Embedding Creation on Autopilot

To sum up pgai Vectorizer, he explained, “It’s putting embedding creation on autopilot with one SQL query, and it’s all within Postgres. [It automates] the process of creating embeddings from source data and allows teams to essentially set it and forget it.

As new data is added to their tables, embeddings will automatically be created, and they avoid all these problems around data sync and ensuring that embeddings scale, because everything is automatically synced in the background, just removing work that development teams would have to do themselves otherwise.”

He said clients are increasingly asking about the operational tasks involved with AI, making that a growing area of concern.

With pgai Vectorizer, developers can:

  • Manage all data for AI apps — vectors, metadata, event data — on the same PostgreSQL database platform they know.
  • Automatically synchronize data changes to vector embeddings in real time.
  • Easily switch between embedding models for rapid testing and experimentation without code changes or having to create custom data pipelines.
  • Track model versions and ensure backward compatibility during rollouts for smooth transitions.

“pgai Vectorizer is a game-changer. It promises to streamline our entire AI workflow, from embedding creation to real-time synchronization, allowing us to deliver AI applications faster and more efficiently,” said Web Begole CTO at MarketReader. “By integrating everything directly into PostgreSQL, pgai Vectorizer removes the need for external tools and expertise, making it easier for our team to focus on innovation rather than infrastructure.”

‘There’s actually really tough engineering challenges that need to be overcome if you want to build a production-grade application.’
Avthar Sewrathan, AI product lead for Timescale

Sewrathan pointed to four tasks pgai Vectorizer could replace for developers:

  • Building an ETL pipeline — Taking in source documents or images, orchestrating calls to OpenAI or another model and creating the actual embedding.
  • Chunking and formatting — “Before you can create an embedding, you need to get [the data] into the right format and get it into the right size that can fit within the token limits of the embedding model. And so that’s another task that we take away. You configure that in one line of code, and then that automatically runs in the background,” he said.
  • Scaling and managing your embedding creation pipeline — “Most developers can take half an hour and write an embedding creation script in Python, but to have something that actually scales and deals with OpenAI rate limits, that deals with queuing when you have hundreds of thousands of embeddings to create, that’s one thing that our system does out of the box. It replaces these queuing systems for updates and synchronization.”
  • Synchronization — “When you’re building AI applications, you have to have code that checks, ‘OK, in my vector database these embeddings are created.’ [But] do I have the right metadata in my relational database? Or, for example, maybe you have new documents in your relational database, and you need to check if the corresponding vectors are created. This kind of code does [what] I would call synchronization, like staleness checking,” Sewrathan said. You are guaranteed that you know your embeddings will be up to date, and if not, you will get a notification.

“I think a lot of what you see in the industry today is databases adding vector search capabilities that replace vector databases and thinking that that’s enough to make them an essential component of building an AI application. But what we recognize — and we’ve spoken to hundreds of developers over the past more than a year and a half that we’ve been building this project — we’ve seen that vector search is just one part of building an AI system,” Sewrathan said.

“There’s actually really tough engineering challenges that need to be overcome if you want to build a production-grade application. And so our whole thesis is around saying, in terms of pgai, can we give developers a suite of tools that solve, not just vector search, but scaling your AI system, solving embedding creation, solving updating, solving data sync, solving embedding staleness, solving the ability to [access] models inside the database.”

Initially Just pgai

In introducing the first tool last June, the company stated in a blog post: “Simply put, we built pgai to help make more PostgreSQL developers AI engineers.”

Short for Postgres artificial intelligence, pgai was designed to simplify the process of building semantic search, retrieval-augmented generation (RAG), and other AI applications with PostgreSQL.

“Simply put, we built pgai to help make more PostgreSQL developers 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 model APIs from within a PostgreSQL database, its GitHub page explains. It enables classification, summarization and data enrichment tasks on existing relational data. It creates embeddings directly in the database, skipping the task of having to save them there.

Initially supporting only OpenAI, pgai and pgai Vectorizer now support Ollama, Anthropic and Cohere. The company has announced plans to support more models including Claud and Hugging Face.

Improved Scaling

Also introduced in June, pgvectorscale takes aim at handling large-scale, high-performance AI use cases.

“Pgvectorscale brings specialized data structures and algorithms for large-scale vector search and storage to PostgreSQL as an extension, helping deliver comparable and often superior performance than specialized vector databases like Pinecone,” the company stated.

It added a StreamingDiskANN vector search index, inspired by Microsoft’s DiskANN algorithm, to deal with the limitations of in-memory indexes like HNSW (hierarchical navigable small world) by storing part of the index on disk. With solid-state disks much cheaper than RAM, storing the index on disk represents a vast cost savings.

It also developed statistical binary quantization (SBQ) to improve accuracy while employing the compression of standard binary quantization techniques to save storage space.

While pgvector is written in C, pgvectorscale is developed in Rust using the PGRX framework, adding access for another fast-growing community.

All Open Source

The compression means lower infrastructure costs, but Sewrathan also pointed to other cost savings as well.

“We think that you actually can have less custom code running and that saves a lot of engineering hours and actually allows smaller teams to do the job. [Previously you might have needed] 10 developers; now you can just do [with] two or three because a lot of things are automated and take place out of the box for you with the Vectorizer,” he said.

In an article for The New Stack, Sewrathan also referred to its benchmark test comparing its version of pgvector against Pinecone, concluding the Postgres extension is not only vastly less expensive, but faster than the standalone vector database.

Touting popular tried-and-true PostgreSQL, Sewrathan wrote:

“Choosing a standalone vector database would mean you lose out on the full spectrum of data types, transactional semantics and operational features that exist in a general-purpose database and are often necessary for deploying production apps.”

The pgai tools are open source, but Timescale also offers them as part of a fully managed database service.

TRENDING STORIES
Susan Hall is the Sponsor Editor for The New Stack. Her job is to help sponsors attain the widest readership possible for their contributed content. She has written for The New Stack since its early days, as well as sites...
Read more from Susan Hall
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: OpenAI, Anthropic, Simply.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.