Building AI Systems on Postgres: An Inside Look at pgai Vectorizer
NOV 11, 202453 MIN
Building AI Systems on Postgres: An Inside Look at pgai Vectorizer
NOV 11, 202453 MIN
Description
Summary<br />With the growth of vector data as a core element of any AI application comes the need to keep those vectors up to date. When you go beyond prototypes and into production you will need a way to continue experimenting with new embedding models, chunking strategies, etc. You will also need a way to keep the embeddings up to date as your data changes. The team at Timescale created the pgai Vectorizer toolchain to let you manage that work in your Postgres database. In this episode Avthar Sewrathan explains how it works and how you can start using it today.<br /><br /><br />Announcements<br /><ul><li>Hello and welcome to the AI Engineering Podcast, your guide to the fast-moving world of building scalable and maintainable AI systems</li><li>Your host is Tobias Macey and today I'm interviewing Avthar Sewrathan about the pgai extension for Postgres and how to run your AI workflows in your database</li></ul>Interview<br /><ul><li>Introduction</li><li>How did you get involved in machine learning?</li><li>Can you describe what pgai Vectorizer is and the story behind it?</li><li>What are the benefits of using the database engine to execute AI workflows?<ul><li>What types of operations does pgai Vectorizer enable?</li><li>What are some common generative AI patterns that can't be done with pgai?</li></ul></li><li>AI applications require a large and complex set of dependencies. How does that work with pgai Vectorizer and the Python runtime in Postgres?<ul><li>What are some of the other challenges or system pressures that are introduced by running these AI workflows in the database context?</li></ul></li><li>Can you describe how the pgai extension is implemented?</li><li>With the rapid pace of change in the AI ecosystem, how has that informed the set of features that make sense in pgai Vectorizer and won't require rebuilding in 6 months?</li><li>Can you describe the workflow of using pgai Vectorizer to build and maintain a set of embeddings in their database?<ul><li>How can pgai Vectorizer help with the situation of migrating to a new embedding model and having to reindex all of the content?</li></ul></li><li>How do you think about the developer experience for people who are working with pgai Vectorizer, as compared to using e.g. LangChain, LlamaIndex, etc.?</li><li>What are the most interesting, innovative, or unexpected ways that you have seen pgai Vectorizer used?</li><li>What are the most interesting, unexpected, or challenging lessons that you have learned while working on pgai Vectorizer?</li><li>When is pgai Vectorizer the wrong choice?</li><li>What do you have planned for the future of pgai Vectorizer?</li></ul>Contact Info<br /><ul><li><a href="https://www.linkedin.com/in/avthars/" target="_blank">LinkedIn</a></li><li><a href="https://avthar.com/" target="_blank">Website</a></li></ul>Parting Question<br /><ul><li>From your perspective, what are the biggest gaps in tooling, technology, or training for AI systems today?</li></ul>Closing Announcements<br /><ul><li>Thank you for listening! Don't forget to check out our other shows. The <a href="https://www.dataengineeringpodcast.com" target="_blank">Data Engineering Podcast</a> covers the latest on modern data management. <a href="https://www.pythonpodcast.com" target="_blank">Podcast.__init__</a> covers the Python language, its community, and the innovative ways it is being used.</li><li>Visit the <a href="https://www.aiengineeringpodcast.com" target="_blank">site</a> to subscribe to the show, sign up for the mailing list, and read the show notes.</li><li>If you've learned something or tried out a project from the show then tell us about it! Email [email protected] with your story.</li><li>To help other people find the show please leave a review on <a href="https://podcasts.apple.com/us/podcast/the-machine-learning-podcast/id1626358243" target="_blank">iTunes</a> and tell your friends and co-workers.</li></ul>Links<br /><ul><li><a href="https://www.timescale.com/" target="_blank">Timescale</a></li><li><a href="https://github.com/timescale/pgai" target="_blank">pgai</a></li><li><a href="https://en.wikipedia.org/wiki/Transformer_(deep_learning_architecture" target="_blank">Transformer</a> architecture for deep learning</li><li><a href="https://en.wikipedia.org/wiki/Neural_network_(machine_learning" target="_blank">Neural Networks</a></li><li><a href="https://github.com/pgvector/pgvector" target="_blank">pgvector</a></li><li><a href="https://github.com/timescale/pgvectorscale" target="_blank">pgvectorscale</a></li><li><a href="https://modal.com/docs" target="_blank">Modal</a></li><li><a href="https://en.wikipedia.org/wiki/Retrieval-augmented_generation" target="_blank">RAG == Retrieval Augmented Generation</a></li><li><a href="https://en.wikipedia.org/wiki/Semantic_search" target="_blank">Semantic Search</a></li><li><a href="https://ollama.com/" target="_blank">Ollama</a></li><li><a href="https://neo4j.com/blog/graphrag-manifesto/" target="_blank">GraphRAG</a></li><li><a href="https://github.com/bitnine-oss/agensgraph" target="_blank">agensgraph</a></li><li><a href="https://www.langchain.com/" target="_blank">LangChain</a></li><li><a href="https://www.llamaindex.ai/" target="_blank">LlamaIndex</a></li><li><a href="https://haystack.deepset.ai/" target="_blank">Haystack</a></li><li><a href="https://skyzh.github.io/write-you-a-vector-db/cpp-05-ivfflat.html" target="_blank">IVFFlat</a></li><li><a href="https://skyzh.github.io/write-you-a-vector-db/cpp-06-02-hnsw.html" target="_blank">HNSW</a></li><li><a href="https://proceedings.neurips.cc/paper_files/paper/2019/file/09853c7fb1d3f8ee67a61b6bf4a7f8e6-Paper.pdf" target="_blank">DiskANN</a></li><li><a href="https://docs.replit.com/replitai/agent" target="_blank">Repl.it Agent</a></li><li><a href="https://en.wikipedia.org/wiki/Okapi_BM25" target="_blank">BM25</a></li><li><a href="https://www.postgresql.org/docs/current/datatype-textsearch.html#DATATYPE-TSVECTOR" target="_blank">TSVector</a></li><li><a href="https://www.paradedb.com/" target="_blank">ParadeDB</a></li></ul>The intro and outro music is from <a href="https://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/Tales_Of_A_Dead_Fish/Hitmans_Lovesong/" target="_blank">Hitman's Lovesong feat. Paola Graziano</a> by <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/" target="_blank">The Freak Fandango Orchestra</a>/<a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">CC BY-SA 3.0</a>