← All transcripts

Can Your AI Analyst Keep a Secret? - Aaron Linsky, Bridgewater & Nikhil Benesch, turbopuffer Transcript, AI Summary & Key Points

AI Engineer · 17 days ago · Science & Technology · 17:57 · EN

Watch on YouTube

Answer

The AI analyst keeps secrets by applying permission filters natively inside the vector index: clusters the user cannot access are discarded before searching, so filtered vector search returns correct, high-recall results in roughly 120ms at 100-million-document scale.

AI Summary

An AI analyst at Bridgewater needs private documents, but every email, memo and research note carries its own permissions. Bridgewater's Vault holds about 100 million permissioned documents from 135 external sources plus internal research, and the firm's first search setup fell over as documents grew. turbopuffer's fix combines filtering strategies: post-filtering loses recall, pre-filtering is too slow at scale, and "native filtering" over a clustered vector index delivers both — about 120ms P90 searches across 400–450 million vectors. turbopuffer is built entirely on object storage (S3/GCS/Azure Blob), keeping data cold and cheap until queries pull it into SSD or memory cache.

Key Points

  • Bridgewater's research process has five steps — perception, hypothesis, investigation, systematize/integrate, industrialize — historically run with humans at the center and now moving to machines at the center.
  • The Vault holds about 100 million documents sourced from 135 external research providers plus internal writing, meeting recordings and reports; both human investors and AI agents read from it, and their new content flows back in.
  • Bridgewater also built Delorean, a bi-temporal macro time series database built over decades.
  • Bridgewater's first permission-aware search implementation worked initially but fell over as the Vault grew, prompting a search for other providers.
  • Napkin math: at 1KB per document and ~20GB/s memory throughput, brute-force scanning 100 million docs takes about 5 seconds — far above the ~100ms users expect; from S3 it would take a minute or more.
  • Vector embeddings are typically 1,024 dimensions; nearby vectors represent similar concepts, so an index lets search zoom in instead of scanning everything.
  • Permissions break the plain vector index: the nearest documents to a query are not necessarily ones the user can access.
  • Post-filtering (fetch ~10,000 nearest vectors, then discard non-matching) gives poor recall — users may give up after finding only 40 of the top 100 matches.

AI in practice

Used for

Agents

  • AI analyst — Answer questions like 'Why have token prices come down so much in the last month?' by investigating and searching for grounding facts from the public web and private permissioned documents 2 held 00:25

Business ideas

Develop an AI analyst that can process and ground its research in massive private document repositories while strictly adhering to granular access permissions.

For
Organizations (e.g., financial institutions) that need AI agents to process 100 million permissioned private documents (internal and external research).
Solves
Standard vector search fails when applied to documents with complex permissions, either providing poor recall by discarding non-matching documents during post-filtering or suffering from excessive latency by scanning unauthorized documents during pre-filtering.
  • Bridgewater: Uses the system to power its AI analyst, allowing it to search 100 million documents while respecting complex internal and external document permissions (00:21, 03:43).
🔒  Build steps and tools for 1 idea. Unlock

Tools & resources

3 items

DNo. 6787
AIAINotes.us Tool

Delorean

In the AINotes directory

Delorean is a bi-temporal macroeconomic time-series database used by Bridgewater Associates to systemize and encode its understanding of how markets and economies function.

Mentioned in
1 video
Kind
Other
TNo. 6741
AIAINotes.us Tool

The Vault

In the AINotes directory

The Vault is Bridgewater Associates’ internal data platform for indexing, organizing, and serving more than 100 million unstructured documents from external sources, as well as the firm’s memos and meeting transcripts. The material is cleaned, permissioned, and tagged to Bridgewater’s internal ontology for use by human investors and software agents. Its search system is designed to support both investor queries and agent workflows, with fast filtering across the document collection. Bridgewater developed a hand-built benchmark to improve search precision at the top 10 results from about 60% to more than 90%. The platform also supports analyst research, forecasts, signals, and proactive agents that surface relevant information to investors.

Mentioned in
2 videos
Kind
Other
TNo. 6744
AIAINotes.us AI product

turbopuffer

turbopuffer.com

turbopuffer is a hosted vector and full-text search database built on object storage, used in document-ingestion systems to persist indexed data with memory or SSD caching. It supports approximate-nearest-neighbor vector search, full-text search, semantic, hybrid, permissioned, and metadata-filtered search through an API, with namespaces for organizing indexed data. Its native filtering searches only the nearest clusters containing potential matches, combining the speed of post-filtering with recall closer to pre-filtering. The service provides automatic scaling, low-latency search, and S3-compatible object storage for semantic search, recommendations, and other AI applications. Kepler uses turbopuffer for hybrid retrieval combining ANN and BM25, followed by reciprocal and cross-encoder re-ranking, and the service has been used for large multi-tenant corpora serving human and agent search.

Mentioned in
6 videos
Kind
AI

Links mentioned

🔒 Full analysis locked

Unlock more videos and the full analysis

A credit unlocks one video's full analysis for good — the build steps, the tools and how each was used, the methods behind every use case. Pro opens the whole library instead, and raises how many videos you can analyse a day.

Unlock full analysis — free

Transcript

Searchable transcript of Can Your AI Analyst Keep a Secret? - Aaron Linsky, Bridgewater & Nikhil Benesch, turbopuffer — AI Engineer (17:57). Search for a phrase, then click its timestamp to jump straight to that moment in the video.

Captions sourced from the original video on YouTube, published by AI Engineer. The video, its captions and all related intellectual property remain the property of their respective owners; AINotes claims no ownership. Provided for research, accessibility and search — see the Transcript Notice and Copyright Policy.

00:01 [music] >> All right. Hello, everyone. Thank you all for coming. I'm Nick Hill, CTO of Turbo Puffer. >> And I'm Aaron Linsky, the head of product engineering at Bridgewater Associates. >> And we're here to talk to you today about how you build an AI analyst that can keep a secret. And I'll explain a bit more about what that means. Here. Now, this is a very oversimplified view of how you would go about building an AI analyst, but it is meant to capture an important dimension around permissions.

00:41 So, in this diagram, you're user interacting with this AI agent, you start with a question, maybe something like, "Why have token prices come down so much in the last month?" And you feed that question into an LLM, which will begin thinking about that question, investigating, researching. And as it does that investigation, it's going to search for facts to ground its information, to lead its investigation.

01:05 Some of those facts might come from the public web, but other facts might come from private documents in your organization. Now, the public web is on one dimension much easier to search than the information that's private to your organization. By definition, the public web is public. Everyone in your organization can see exactly the same documents. So, there's no permission issue there.

01:24 Every public web document can be immediately fed into the AI analyst, no matter who's asking the question. But the information internal to your organization looks very different. Every email, every meeting note, every report might have a completely different set of permissions attached to it, belonging to different groups, maybe individual permissions assignments on those docs.

01:45 And you can see here, we've got different colors here reflecting the fact that every document in that private data set has a different set of permissions. And this is a classically hard problem in information retrieval, and it's something we explicitly designed Turbo Puffer to solve. But before I get into that, I'm going to hand it over to Aaron to talk about why this private information is so important to Bridgewater's AI analyst.

02:07 >> Great. Thank you. Oh. There we go. So, first I'm going to go talk a little bit about what who Bridgewater is, what we do, and then we get into how how we're using Turbo Puffer and and the needs there. So, for the past 50 years, we at Bridgewater have pursued the best understanding of how markets and economies work. We then encode that systematically with logic into a system that we can then stress test over time.

02:38 What you see here are on the on the left with the yellow legal pad, that is our bond system from 1980. It's a set of if-then statements that we used to trade bonds back then. Over the next few decades, we've evolved that process from a yellow legal pad to Excel to eventually Scala and now Python um to to a different learning process with humans at the center.

03:08 This five This research circle, as what we call it, has five steps. Perception, that's seeing what's going on the outside world. Hypothesis, which is coming up with ideas of why that might be true. Investigation, which is the research of seeing is that thing true. If it is true, we then systematize and integrate it with our system and industrialize and run that every day and trade on that.

03:30 That's been our learning process. I've been at Bridgewater for about 20 years. That's been what we've been doing doing for 20 years with humans at the center. We're now moving towards putting machines at the center and running that process. In order for even you know, for both humans and machines, in order for that to work well, we need access to high-quality data.

03:52 We need both time series data, which we spent decades uh decades creating a great bi-temporal time macro time series database, which we call Delorean. And more recently, we've been creating a unstructured database, which we call the Vault. And so, what is the Vault? Um today, it's about 100 million documents, which we index, organize, and secure that we think represents some of the best third-party and extra third-party external research, and also our internal research.

04:27 So, we've sourced with 135 different external sources, which is a huge deal for both legal and our data team to actually nego- negotiate and get them in. And all of all of those sources have um some sorts of permissions around it where it might not be open to everyone at Bridgewater. And then, of course, we also have our inter- internal sources of unstructured data.

04:49 That's our own writing, our meeting recordings, and and our internal reports, as well. And both that those all go into the Vault, and then both humans investors and our AI agents read out of the Vault. What I haven't shown here is actually it circles back. So, the investors and and the agents will create new new content that goes back into the Vault.

05:12 So, it's constantly improving. And so, here's a very high-level view of what permissions in the Vault look like. So, I have a user we'll just say their ID is user one. They're in groups B and C. This is incre- incredibly simplified, unfortunately. Um and there's a set of all of our documents where it could be either um uh permission to them via groups or directly.

05:42 And then, here we have the actual code of us going ahead and creating a query to try to look for some data with whatever that query vector was that matches the viewers and groups. And so, this is simple in one way. And actually, when we first implemented this without Turbo Buffer, we thought it worked fine. Um but then, pretty quickly, as we started to add more and more documents to the vault, it fell over um tremendously.

06:13 And so, what I did then was I looked for other possible providers. We found Turbo Buffer, tested them out, and they had a solution which Nikhil is going to go over right now. >> Awesome. Thank you, Aaron. Let me very quickly talk about what Turbo Buffer is. We are an extremely fast, extremely scalable, extremely cheap search engine built entirely on top of object storage.

06:38 And what that means is we write directly to S3 or GCS or Azure Blob storage, whatever your hyperscaler provides. And that gives us S3 economics. So, by default, your data is inert, cold on S3. Only when you start querying it do we pull it into more expensive storage mediums, like SSD or memory. And this is really powerful because once a query is hot, once the data query is accessing is in the cache, it's fast.

07:08 But if you're not accessing a particular namespace or a particular region of a namespace, that data can just hang out on object storage where you pay rock-bottom prices for it. So, this architecture allows Turbo Buffer to scale cheaply to terabytes of data, which would cost tens of millions of dollars in in other systems, and we can often do it at a tenth of the cost at performance that's comparable once you get the data hot uh to what you get with traditional disk-based search systems.

07:35 And we support all types of search. We support keyword search. We support regex search. And what Aaron was showing earlier, vector search. Um so we're really not uh opinionated about how you search your data in Turbo Puffer. We want to do search generically. But for the rest of this talk, I'm going to focus on vector search because uh it's it's good to zoom in and go deep on one particular type of search.

08:01 Let's do a little bit of napkin math. That's something we love to do at Turbo Puffer. It helps us anchor in the simplest possible solution. We never want to introduce complexity to Turbo Puffer that's not justified. One of the justifications for taking on complexity is if you need it for performance. The absolute simplest way to do search is to put everything in a list and every time somebody shows up saying, "I want queries that match this.

08:24 I want documents that match this query." You look at every single piece of data. Let's conservatively say that every document that you store in Turbo Puffer is 1 kilobyte. This is incredibly conservative. A vector embedding is often 1,024 dimensions. So if you're using just a byte per dimension, that's a kilobyte right there. Uh in practice, documents are often larger than this.

08:47 But for the sake of example, let's say it's a kilobyte per doc. Even if you had all of that data resident in memory and you were ripping through it as fast as you possibly could, which on modern hardware is about 20 gigabytes a second. Once you get up to 100 million docs, that's going to take 5 seconds. And for most search workloads, that's way too slow.

09:06 What we see in practice is most people want their search results to be about 100 milliseconds. [clears throat] So the naive solution here does not work. If you've only got 10K docs, great. That's going to take half a millisecond. Turbo Puffer can do literally anything and it will be fast enough. But as you get to scale, once you're at 10 million or 100 million, you really need to start thinking about how you represent your data so that you're not crunching through all of that.

09:28 And of course, I gave you the the numbers for memory here. That's only if the cache is hot. If that data's on S3, you're looking at a minute or more to pull that data off S3. So, this just isn't viable at the scale that Bridgewater operates. So, step one in Turbo Puffer is to build a vector index. And this is something that we handle under the hood for you.

09:49 When you store vectors in Turbo Puffer, we automatically build this index behind the scenes once you get enough data to to justify it. Vector embeddings, if you're not familiar, are the internal numeric representation of concepts in LLM space. And we like to use this example of red shoes and maroon sandals. You as a human know that these are very similar concepts and much more similar to one another than concrete block is.

10:13 And maybe you're thinking about shape and size and texture and and weight. The LLM can translate that into this numeric vector. Here, I've only got two dimensions shown so that we can think two-dimensionally, but in practice, there's often thousands of dimension. 1024 dimensions is a very common size. Thinking multi-dimensionally like that is very hard.

10:35 So, for the sake of example, we're just going to imagine that there are two dimensions here. Now, we don't actually know what those dimensions represent, but again, you can think of it as like size and color. And then you can plot that on a coordinate system. So, red shoes might be at the top left along with maroon sandals, and then concrete block is going to be down at the bottom right.

10:56 >> [snorts] >> And I'm going to simplify wildly here, but a very workable vector index in two dimensions is just to plot things on a graph. And then you can zoom in. If you're looking for red shoes, that's the Q on this diagram, you plot that on this two-dimensional graph, and you zoom in, and you look for the vectors around it. And because of the way these vectors are created by the LLM, vectors that are near each other represent similar concepts, represent good search results to return.

11:25 So, if we were just doing similarity search, great. We look in our two-dimensional coordinate grid, we find some nearby vectors, we return them, and life is good. And this saves us a lot of time. We don't have to search the whole vector space. We can zoom right in to the documents that are going to be relevant to the query. So, that napkin math from earlier, we can we can ignore.

11:44 We're maybe only looking at 10,000 vectors here, and we know we can do that in a millisecond or two. >> [snorts] >> The problem is when you add in these permissions, not all of the documents that are most relevant for a given query are going to match those permissions. And you can see in this diagram here, the minuses don't match the permissions, while the pluses do match the permissions.

12:08 So, our vector index is not immediately helpful to us. And we've invested a lot of time and energy at Turbo Puffer into solving this problem. Naively, you might try a post-filtering strategy. And the way that works is the query comes in, you get maybe the 10,000 closest vectors, and then you throw away all the ones that don't match. This does not work very well because it doesn't provide the results that you're looking for.

12:39 If I'm the user that only has access to that data in the bottom right, and I search for Q, I still want to see the documents that were closest to Q from my perspective, that include the results that I can see. But when you do post-filtering, you kind of spiral outwards, and then at some point you have to give up because it's been a couple seconds and you haven't found any docs that match, or you haven't found the top 100 docs that match.

13:03 Maybe you were only able to find 40. And this makes users unhappy because they might know that a doc exists with maroon sandals, and they were searching for red shoes, and you don't turn it up. So, you have very poor recall. So, instead of starting with the vector index, what if we start with the filters? Turbo Puffer builds an index of all of the documents that match the filters.

13:31 So, Aaron can show up and say, "Hey, show me all of the documents that I have access to." And then Turbopuffer can scan over all of those documents and see which of them are closest to the query vector. But what if Aaron has access to 50 million out of the 100 million documents in the vault? Now we're back to square one. We're back in that napkin math problem where it's going to take multiple seconds, if not minutes, to get through all of that data.

13:55 We're not actually using the vector index. If you look here, you can see we're just finding all the docs that match the filters and then scanning through them sequentially. So, this also doesn't work very well. And the trick to doing well on this problem is to do both. So, Turbopuffer's vector index automatically clusters similar vectors. So, you can see there's a group of documents here that are similar labeled five and another group labeled zero and another group labeled one.

14:25 And when we build these permissions indexes, we say, "Well, Aaron has access to documents in cluster five and maybe cluster two, but he doesn't have access to any documents in cluster three or any documents in cluster zero." So, we can just throw those clusters out. We don't have to consider them at all. So, first we find all of the clusters that Aaron has access to, uh i.e.

14:50 he has access to at least one doc in those clusters, and then we search the closest clusters, and then we just scan sequentially inside those clusters. And in Turbopuffer right now, the clusters have about 200 documents. This is something we're always tuning. Over time, we'll probably increase that number to to maximize throughput. But this basic strategy fundamentally makes search at scale with permissions possible.

15:15 And the trick is to combine pre- and post-filtering into what we we native filtering. And this is the result. Across 450 million vectors, those 100 million documents turn into 400 million vectors, TurboPuffer is able to get 120 millisecond searches. That's the P90 latency across all of those namespaces. By employing this sophisticated native filtering strategy.

15:47 So, with TurboPuffer, you show up with your permissions logic and your conceptual model, and you do what I think is a very simple translation of those permissions into TurboPuffer filter language. And hopefully, you can directly map this code sample here, viewers contains ones viewers contains one groups contains any BC. Hopefully, you can see how you would project that onto your organization's own permission structure.

16:14 And that turns into this very complicated systems engineering challenge under the hood, but TurboPuffer hides that all away from you. So that you don't have to think about it. You can just express the logical filters that represent your permissions in a fairly direct way. And we handle the complicated query planning under the hood to make that search come back in 1 to 200 milliseconds even at 100 million documents scale.

16:38 Now, we're engineers at TurboPuffer, so there are some limitations here. In particular, when you have nested groups, things get tricky. I'm not going to have time to go into that in too much detail, but if you have problems that look like that, please come talk to us. Uh we have a lot of experience working through these, and we're always looking for ways to improve the product so that stuff is handled more automatically.

17:00 So, permission filters are really just the tip of the iceberg in TurboPuffer. We're trying to build an isolation native search engine. That means whether you have fine-grained permissions within namespaces, whether you have security, regulatory compliance obligations that force you to regionally lock data, keep that data in your own VPC, encrypt that data potentially not just with an encryption key you control, but that your own customers control.

17:27 Turbo Buffer has solutions for all of those levels of isolation. So, permission filtering is just one piece of the puzzle in building isolation-aware search in Turbo Buffer. So, that's all we got. That's how Turbo Buffer and Bridgewater work together to do fast isolation-native search at 100 million scale. Thank you, everyone. >> [applause]