Intro0:00
Okay. Hi. Um, so this is another Lightning Pod with Jo Kristian Bergum. Is that-- Did I get it right?
Yeah.
Uh, you're over in Norway?
I'm over in Norway. Trondheim, Norway, in the center of Norway, yes.
What should people know about Trondheim?
Uh, it's a small city. It's, uh, easy to get around. There's a great un- technical university here. The climate sucks a little bit, but it's easy to get things done in the winter. So, yeah-
Yeah. Yeah.
Even in parkas.
Uh, I've never been over. I've been to Ore Dev, I think-
Yeah
... uh, which is over near you guys. But yeah, what, what we're here to talk about, just generally your hot takes on RAG, search, vector databases, all that stuff. Uh, I think you- you've taken to publishing a lot more recently on, on X, and that's gone really well.
Vector DB0:45
So I'll just kind of go into that main thing that is, that everybody knows you for, which is the, uh, your piece on the vector databases, the rise and fall of vector databases.
Yeah.
So maybe j- could you give us the background of, like, why you felt compelled to write this?
Yeah. F- first of all, I think I have to go a little bit back, right? So I have a long background in search and working on infrastructure for search. Like, I've been in search, working on search systems for 20 years, at Yahoo!
company, also Fast Search and Transfer here in, in Trondheim on Norway, and also working on embeddings, neural search, all of those things, right? Leading up until ChatGPT, the ChatGPT moment, like November 2022. And then there was some kind of cookbook, I think, from OpenAI, where they said, "Okay, this is how you can do connect ChatGPT with your data, and here's embeddings."
And I think then a lot of developers, right? Got into this, this is how we can build search. This is how we can do RAG. And I think there was, like, this unnatural connection, meaning that between retrieval in RAG, that it had to be vector embeddings.
Uh, by, by the way, I have a small role in that. I, I actually was the one who wrote the, uh, Chroma example in, in the OpenAI cookbook.
You did? Okay.
Yeah. I was a, I was an angel investor in Chroma, uh, before they became a-
Nice
... vector database. And then, then, then, you know, I was just helping out.
I'm actually a, a huge fan of, uh, Jeff and, and Anton from Chroma. I mean, I think Anton left, but I think they've done a great job at promoting retrieval for AI and infrastructure, and they, they did, they did a lot of great things.
So I, I really enjoy talking to them on, on X. Anyway, and then we had the whole vector database. I think Pinecone was one of the pioneers framing it as a new infrastructure category. If you need to work on embeddings, you have to use a vector database.
And naturally then, if you wanna do anything in AI, then you need to have a vector database. And that was my primary motivation for, for writing that piece and looking a little bit back, you know, what happened and where we are now and how I see it.
And yeah, so that, that was the pure, pure motivation.
Okay. And the, the general thesis, I guess, if you wanted to sort of recap that, like, um... You know, I, I think it's a very fast rise and fall. Like, Pinecone was a dominant player, uh, that for a long, long time.
Um, and you know, I don't know my exact sources because there's a lot of rumors going back and forth. But apparently, they went up to, like, 100 million ARR very, very quickly. They raised a, a big round, and then suddenly a lot of people started leaving.
Like, suddenly it s- went, went from cool to uncool very quickly, and I don't understand why.
I don't understand that either. And I think also they repositioned a little bit, going back to their core messaging. If you go to their website now, it looks more developer-focused. It's not the memory for AI. It's not, like, enterprise-ish.
It's more towards developers now. So I try to think that they are trying to go back to their original roots. I think that's a good thing. But also, of course, there's been a lot of competition in this space, a lot of new companies.
One of the upcoming stars is TurboPuffer, kind of same SaaS model, a little bit different pricing, and they really talk to developers. And I'm not saying that the companies are dying, right? I'm just saying that the separate infrastructure category is dying, right?
Because you have vector search capabilities in almost any DB technology nowadays, right? And you have it also in more traditional search engines like Elasticsearch, Solr, Vespa. So I think there's, like, convergence on, on features on both parts. So and then you have things like pgvector in Postgres.
A lot of people, you know, get confused, "Okay, I have already a DB. It has vector search. Why do I need another DB, like a vector DB?" So the whole database concept. So I think those companies, I mean, there are lots of great technology here, don't get me wrong on that.
But I'm not saying that the companies are dying, but I'm saying that the category is dying. And so there, there's, there's this distinction, and I think a lot of people, like, oversaw that and, like, came at me and say that, you know, because they had some kind of hate around some of these companies, and they said, "Yeah, you know, go fuck Pinecone," or whatnot, right?
But I actually say that the category is dying, and I actually wanna call these new companies that they are like search engines. And I wanna go back to the natural-- I think that's a more natural abstraction for connecting AI with knowledge and all the arguments for doing RAG.
I think the natural concept there is search. And I think one of the insight I have from... I, I use Windsurf a lot. I love Windsurf. Their, like, cascade mode, and if you ask it, like, "What are the tools you have available?"
And it, like, lists like 17, 18 tools, like edit files. But there's also, like, things like search code base, search the web, grep, and these are, like, search abstractions, right? And I love the idea where you, like, just connect the reasoning model with-
With these tools that are essentially search tools, and that can help the agent or the LLM to actually formulate the query. You know, should I do a graph, or should I do a more of a semantic search, or should I do more a keyword search, or should I just search the web?
So I think that's more like the natural abstraction instead of jumping into, you know, vectors and how you represent. That is more of a like a detail like, uh, of how you implement search.
Yeah. Yeah. Um, it's interesting that we, uh, we fixated a lot on, on vector like, you know, dense embeddings and all that, and I think now we're, we're sort of broadening out. Uh, I, I will also mention that Chroma, I think from the start has always said they are kind of going after information retrieval and not so much, not so much, uh, you know, the, the narrow sense of RAG.
Yeah, I think like broadly this is the consensus that, you know, like, uh, y- the, the, the category was, was never really going to be lasting for that long. Uh, it was just, there was just a brief period of time from my...
One of my favorite early tweets in AI, uh, you know, this post-ChatGPT phase was, um, I, I, I summed up all of the fundraising that happened in vector databases for-
Wow. Yeah
... 2023, and it was something like 230 million in, uh, all, all put into all the vector databases and, uh, that was more than the entire lives- lifespan fundraising of MongoDB.
Right.
So like basically they cannot all win because they, they, they've already taken more money than supports a, a, you know, one of the de facto winner companies in NoSQL.
Yep.
Interesting.
Yeah. I, I think also on Mon- MongoDB, right, they, they brought a new category in NoSQL, right? And but nowadays all the other database players have also caught up, right? So now even MongoDB has relational SQL, right? So there's always like this convergence, but MongoDB kind of it sticks.
But I don't think that for Pinecone that was originally leading that movement, it won't like stick in the same way. It's too narrow. It's too narrow.
Yeah.
But I, I would like to say one more thing about embedding, so people are like, "Okay, Jo, but, you know, embeddings is really important." And, um, also think that embeddings is really important, right? Because you can represent more data than ever before, right?
Multi-modal whatnot. Run into a neural network, get an embedding representation, and then you can move this embedding representation around in vector space and adjust to your domain or whatever you're doing. So it's really important. But what happened was that it went mainstream, right?
It went from these big tech companies like Google, Yahoo, Facebook, all of them, you know, been working on embeddings for a long time for a lot of different tasks, right? But with post-ChatGPT, and we got the embedding APIs from OpenAI, it suddenly became mainstream, like every developer would start using embeddings, right?
And what to do with them, and similarity search and so forth. So, so I'm, I'm not against embeddings, right? Embeddings are here to stay. It's just that it's only... it's not only about similarity searches in this kind of embedding space.
But and then I think more people actually realize that, you know, you actually need something more to it than just em- embedding and a cosine similarity to do search well. Like things like freshness or authority and all of other signals, right, that, that really plays into role in, in web search.
And I, I remember one of the OpenAI guys wrote like, "You can embed the whole web, and then you can build the next generation web search." And I thought like, "Okay, just looking at semantic similarity, that's not gonna play out too well."
So yeah.
I mean, they're trying to sell you their, their model, right? So what they're gonna do is say those, uh, very hypey things. Yeah, I mean, uh, the, the way that I put it is always, you're always gonna wanna do a, a hybrid query.
You always wanna add metadata and like, you know, do all that stuff. I think my question to you is, um, maybe a very ageless question, which is should they all be the same system, right? Your search system, like Elasticsearch is typically like you duplicate your, whatever your, uh, main gen- uh, uh, storage or record is and then, and then you have that search index that is basically almost a complete duplicate, like you just copy over the documents.
Convergence10:01
Do you believe in that? Do you think there's a convergence here?
This is a fantastic question. I think for a lot of use cases, right? And if you're already using some database like Postgres, right, it has this great extension, pgvector, right? And I know that I tweeted things about pgvector that was true in the start around the limitations of pgvector, but there was a rally around pgvector, like adding new algorithm, going, i- introducing actually two algorithms, both EBF and, uh, HNSW, adding Half vec, adding binary vectors.
So actually what you can see pgvector was doing more in the capabilities of vector search than some of the r- real vector database players, right? So if you're only looking at like vector search capabilities and you already have your data in Postgres and you're operating at a reasonable scale, I think it's fair to use
Postgres.
Sorry?
I, I think it's fair to use Postgres or use one database if you're like operating at, you're not operating at a really large scale and you do, you know, some vector search related workloads, and you also use a database for other types of workload, then it might make sense to just keep the data there.
But if you're actually building something that really depends on search quality and your business depends on it, yeah, then definitely I think that you should consider, you know, m- actually using a real kind of retrieval or search engine, um, to represent the data there, right?
Yep. Yeah. And is the search system, how closely entwined is REXSh and search in your mind?
Yeah, and that's the thing with embeddings, right? Embeddings, I think with embeddings and embedding-based retrieval- Because embedding-based retrieval has been used for a long time in recommender systems, like large scale recommender systems like, you know, TikTok or, or Yahoo News or things like that.
Apparently TikTok, uh, published their REXes, uh, recently, uh, which is kind of interesting.
Yeah, it's like a cascade of... There's always in this system that operates at a really large scale, there's always a cascade of different stages where you first have to retrieve over the candidate pool, and that's typically using, uh, embedding-based retrieval.
And then you have layers of re-ranking layers that finally you end up with 100 candidates or something like that, that you actually present to the user.
So I think definitely there's convergence in that embedding-based retrieval is also now more common for such systems, so there's convergence there on how, how it actually is solved on the technology spectrum.
RAG Advice13:18
Yeah, yeah. Um, any other thoughts on like...
I guess the confusion for a lot of folks who are newer to this, right, uh, who are... They understand now that, uh, you cannot just have embeddings only and cosine similarity only. It's just the sequencing of like, what should I do first?
What should I do second? What should we do third? Everyone says like, you know, re-ranking is like super important, but that, you know, it, it adds like maybe like 3% to 4% to your results. And maybe that's why they're the, the lowest hanging fruit.
So I'm always trying to figure out like what should, what should I recommend to people, right, like, that they, that they should start with? Like maybe, you know, like a Postgres or MongoDB as their, their transactional and in the end vector store.
Um, then they can split it out to maybe use Elasticsearch or, uh, Vespa. I, I, I don't know if, um, uh, that was, that would be the recommendation there. Redis, I think is also trying to push themselves there very, very hard.
Um, and then you add the REXes. Is that, is that a good sequence?
I think it's, it's really hard to come up with general recommendations, like without knowing what you're doing. But if you're like l- looking to build a RAG application, like I think most people are interested in, in some- something related to RAG, right?
Uh, when you have some data and you have to transform your data, I think, I think first, I think is it Hamel that always talks about look at your data or, you know, everyone's talking about look at your data.
So first of all, you know, how to get your data in, in a, in a cleaned up way if it's like PDFs or whatnot to do that. There's, there's things there. I think actually that a very strong baseline is the classical BM25 like algorithm that's been around for 30 years, right?
It's keyword matching, but it offers a very useful baseline for a lot of different search use cases because it, it gives you that baseline, right? Then you can start looking at using an off-the-shelf embedding model to also embed a model and all of the engines more or less, m- most of the engines have some kind of hybrid search capabilities, start to play with that.
And then if you can afford it, both from a latency perspective and a cost perspective, you can look at adding like a re-ranking layer on top of that. How you stitch that together, uh, depends on, you know, your, your framework of choice, but I think most of...
You, you can, you can stitch this together, like with multiple different APIs, depending on, um, your budget, I guess.
Yeah. And, you know, I, I, I always tend to recommend people to do this offline as much as possible, like-
Yeah
... batch offline, whatever. Most people don't need fully online systems.
Yeah. That, and that, that's a friction point because I've been used to working on kind of constrained online systems like at, at pretty significant scale. And when there's always like everything is online, needs to be low latency. And then I have problems adjusting to, you know, when you wanna do things at a, at a much lower scale.
So I'll give you an example, like calling out to some kind of embedding API to get JSON floats, you know, it's not something you know, you want to do if you're running at thousands of QPS. You don't wanna add that dependency.
You wanna have something local, something that is faster. So I've always been like, "Okay, I'm gonna call out to this endpoint. It's gonna take 300 millisecond to get this large float." It's, it's something that I like, oh, shrug.
But now I, I'm shifting towards more, you know, it's easy, it's an API-based service. You don't have to think about it. It's just there. So it's much easier to build from, right, to have something that is API-based. So I'm trying to embrace that mind, mind-
I see, I see. Um, no, so when I say offline, I mean more like, um, not in the critical path-
Yeah
... like batch-
Yeah
... systems because, yeah. And, and it's interesting. I, I, I don't know if you've looked at Postgres ML for running the models alongside of the database. Are you, are you bullish on that kind of stuff?
No, I'm not. I'm sorry. I, I, I'm not. I, I think this is... Yeah, we also seen other players that tries to, you know, move a lot of the logic into the database, agentic embedding inference and whatnot, LLMs.
I think it's the right direction is to keep infrastructure a little bit separate from that because they're like different scaling properties. I, I think people can stitch those two things together instead of trying to do everything with one single platform.
So no, I'm, I'm not bullish on that because I don't believe in the developer experience of writing like these huge SQL statements for transforming data from this and then embedding it and then writing it back and expressing this in the database.
It's like what does this do to my database? Is it like calling out? Is it, what's going on? I, I, I, I tend to want to have more control over cost and performance and what's going on than just writing some really large SQL, uh, to, to execute.
Yeah, it's interesting. I, I think there's this constant tension between what should live in the database versus what is an external system. Uh, I don't think it's a clear cut. Like, you know, uh, classic examples like, like the, the, the cron service which we have in, uh, in Supabase.
Criticisms18:22
Okay, so cool. Like, any other like hot takes or, you know, what are the biggest criticisms that you got after you published this? You know, like, you know, what do you agree with? What do you, what do you disagree with?
You know, just-
Yeah-
What-
... I think one of the things that people pointed out, if something goes semi-vir- viral, after a few days you discover that there's a lot of replies that you didn't see and you're like, "Okay." But I think one of the things that stood out was that people said that Jo is saying that RAG is dead because of vector database infrastructure is dead, right?
And I think that was a misunderstanding as well. And I think that comes from people making the connection between RAG and vector databases like it's so strong. So when I'm saying that the vector database infrastructure category is dead, it's like, okay, RAG is dead.
And I, I think that RAG is definitely not dead, right? Um, augmenting AI with retrieval or search is still gonna be relevant, and I think it's gonna be relevant for a very long time, right? So that was one of the things, um-
I mean the-
And I saw that, saw that, you know, now we have 10 million model longer context and you have the same cycle repeat-
Every time, every time. I'm just like, you know, for me, you know, I, I, I put out this like sort of cryptic tweet. I was like, um, you know, this is, Llama 4 is gonna reignite the ra- long context versus RAG debate, but it, it will actually resolve the debate, but not in the way that you want, which is like-
Yeah, hold on. This is too cryptic to me.
No, it's just like there's, there's, there are like five other guys like saying, "Oh, like, you know, long context kills RAG. Like RIP RAG." And I'm just like, "Guys, you, you are, you're, you're idiots," or like you're, you're engagement farming basically.
Like a lot, most, most likely you believe, like they know what they're doing and they're just saying-
Yeah
... nonsense just, just to-
Yeah
... just to have fun. And like they're-
Yeah, but I-
... they're like people who don't, don't take them seriously.
Yeah. No, but that, but it also it's a nuance to this, right? So I've seen people do RAG when there is no need to do RAG, meaning that, you know, if you have one PDF like with visual information and things and you wanna chat with that, definitely that case is probably like dead if you don't have like high QPS and things like that.
So I think there's nuances around this that there's definitely... I had a call with someone that had like 300 articles and I said, "You know, this will just fit into the context window of one of these Gemini models.
You don't have to have a vector database for this case." And they were so surprised when I s- that when I said this. "Oh, can you really do that?" Yeah. But it's also, look at it. It's like just we had like 4K context window, right?
And now 10 million, right? So and that's fast, right? And then people are still running their initial demos from early January 2023, right? So where you were dealing with 4K or 8K, right? So, so some parts of it it's still not, is, is not relevant now because we have longer context windows, but I think retrieval of course it's gonna be there for a long time.
One example I love to bring up is like one of these small toy datasets from track COVID is like 170,000 documents and it's already 36 million tokens and you're not gonna load all of, all of that, you know, for a single query.
Yeah. Awesome. Um, do you have a take on knowledge graphs and graph RAG?
Graph RAG22:01
I think that the graph RAG, well, I have a lot of takes around it. I think that one issue, I mean, graph databases is a s- database that kind of solves one particular problem and it does it well to traverse the edges in the graph and, you know, random access and, and jump across.
But the core issue, issue is actually to build the knowledge graph, right? The, the entities, the relationships. So if you say graph, graph, you know, databases or graph RAG is gonna kill vector RAG and all that discussion, I think the first issue is to actually build the knowledge graph the first place, right?
And if you use a search engine or a dedicated graph DB to actually speed up and accelerate the searches, okay, fine. But I think people are like, "Okay, if I'm gonna do graph RAG, then I need a graph database."
And I hate that connection between doing something and then connecting it to some specific technology. And I think a lot of people do that, right? You jump from some concept into some technology. You can also do graph exploration with a search engine, right?
You can... So you, you don't need a specific technology to do it. And can graph RAG be better than vector RAG? Yeah, for sure. In some cases it might make sense or hybrid or whatnot, but I think people get caught up in, uh, some specific technology all the time.
Yeah, but like I, I think that's okay. Uh, but I'm still trying to validate the presence of knowledge graphs in LLM applications because obviously with LLMs it is much easier, better to create these entity triplets and all that.
So theoretically it should be better.
Yeah, yeah.
Except, I mean, in the past, knowledge graph has been a dirty word-
Yeah
... but now maybe it's not.
Maybe, maybe, maybe, yeah, maybe, I think with LLMs you can do a lot more things around data generation, you know, in general. So generating those triplets is a bottleneck, right? It's been a bottleneck.
Yeah. But now it's easy.
And now we have LLM, so I agree. You know, now it could be easier to actually build what matters, right? Which is those triplets.
Embedding Models24:07
Yeah. Okay. Awesome. Any other opportunities that you find? I, I, I know that you, you mentioned Jina. I think they're a prominent European, uh, startup in, in RAG. Um, and then I think over here Voyage just got acquired by NVIDIA.
You know, anything on the embedding side, like do we need a lot better embedding models? Do we, is what we have from the big labs good enough?
Oh, I, I hope to see-- I mean, Voyage was really leading the pack on doing domain-specific embedding models, like legal PDFs. And what I want to see is more embedding models in that direction, where you essentially, you know, represent this PDF as an embedding or multiple embeddings, you know, for legal domain or finance or health.
I, I hope to see that grow so that you can have a better starting point than just those text models. And I've been a huge believer in using visual language models as a backbone for embedding models, where you essentially take a screenshot of a page.
You don't have to go through OCR, so you, you, you then get a much richer representation. You don't have to go through these complex processing pipelines. So I hope to see more innovation. I'm not sure if it's gonna happen because I think it's a difficult business model to be in, right?
Because you have to have an API-based service, and you have to do batching, and you have to make up for the compute, and then, you know, are people willing to pay for it? And, and I think maybe that's why Voyage got acquired.
I think also GINA is doing a lot of great things in this space now, especially in European languages. But I think every company is trying to move up in the value ladder, right? They want to move into enterprise search or move into a different direction.
So yeah, but I, but I do hope that we will see more and better, uh, like general embedding models.
Outro26:01
Yeah. Yeah. Um, I mean, I'm, I'm sure-- I think the Voyage guys are very happy 'cause it seems like they got acquired for, for a lot.
Yeah. Okay.
So okay, cool. Um, anything else before we, uh, we wrap? Any, um, call to action, any, um, you know, parting rants on the topics of the day?
No, I would lo- I, I mean, if you wanna connect with meee, you know, for the audience, you can find me on X. I'm, uh, under the handle JoBergum there. So I love a shoulder shout-out on, on X, so I hang out there quite sometimes.
Yeah.
Yeah. I mean, it's, it's where the AI community is, you know? Although I've been-- I'm always trying to like grow on LinkedIn or YouTube. Like, I mean, there, you know, there's a lot more people there, you know? There's-- Twitter is so-- this, this like echo chamber.
Yeah, but it, it's, uh, it's not the same. I mean, X has-- I mean, we wouldn't have this meeting, me and you, without X there, right? So it's a great place for really high signal-to-noise, and I think the AI community there is, is really great, so.
Yeah. Awesome. Well, thank you.
Thank you so much for having me, Victor. This has been awesome.





