Semantic Blindness: 500,000 Sensors Confused an LLM - Raahul Singh & Vanč Levstik, Phaidra
AI Engineer · 16 min · 155 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:00Welcome everyone.
- 00:01My name is Rahul Singh.
- 00:02I'm a staff AI research engineer at Fedra.
- 00:05And I'm Vance Kulistik.
- 00:06I'm a senior engineering manager, also at Fedra.
- 00:09And today we want to talk about the time when we gave an LM 500,000 sensor names and it got confused.
- 00:15We call this problem semantic blindness.
- 00:18At Fedra we build AI agents for AI factories.
- 00:21This includes agents which allow our customers to talk about their data centers and explain to themselves and understand how the data centers are working and what problems they are facing on a day-to-day basis.
- 00:34User queries can be anything from what chiller is running hot to analyze the distribution of temperatures across my data halls to is any of my GPUs facing any problems?
- 00:47Now from this variety of queries you can see that these include talking what specific equipments is chiller six all right to talking about a groups of equipments GPUs in data hall one.
- 01:00The industry has not really figured out a common naming pattern yet and every single customer can have their own things from simple names like racks with GPUs with data halls which give you an exact idea of where different things are to something that is more difficult to comprehend like
- 01:18CH3 something something six.
- 01:21We've seen all kind of names in the industry going forward.
- 01:24Now when you're building a demo system this works because you're working at a small scale.
- 01:30A a simple LM can look at all the names of your equipment and figure out what user is talking about.
- 01:36But this problem really becomes intractable as you go to for scale.
- 01:41For example at 1 gigawatt scale factories you will see 400,000 plus GPUs and to support those GPUs you have power meters, you have chillers, you have other equipments.
- 01:53LM context windows are finite and you will very quickly saturate uh and it just becomes a problem.
- 01:59Like we say, a product is something that works for all scenarios and does not fail silently.
- 02:03A demo just has to work for one.
- 02:07In addition to having the LLM figure out these names, uh we could also have uh embedded them in a rack database, a vector embedding approach.
- 02:16But, the problem is often times the names are so similar that semantic search just fails.
- 02:21Uh there's very little difference between a vector of Sorry, a string name of 20 characters long which just differs by, let's say, one character.
- 02:29Chiller 6 instead of Chiller 7. Or uh CDO something uh versus, well, something else.
- 02:35It's very small.
- 02:36So, you get a lot of uh problems with getting accurate uh recall.
- 02:41Also, LLMs suffer from what we call a frequency uh penalty.
- 02:46If you keep on outputting very similar names over and over again, or very similar tokens, uh more accurately, over and over again, there are internal penalties in the LLM which just shut off their output.
- 02:56So, if the user says, "Can list all the names of uh let's say GPUs in i7?"
- 03:02There are, let's say, 100.
- 03:04Just by listing through them, the LLM's guardrails would see uh think that well, it's spiraling, and it would just shut the system up.
- 03:13So, we can't really have these two approaches.
- 03:15RAG would not work.
- 03:16Just naive LLMs would not work.
- 03:19As we move into production systems, we need something that can scale as the system scales.
- 03:23Now, there are naive solutions which we shall discuss going forward.
- 03:27A naive approach to solve this problem would be just to well, divide and conquer.
- 03:32Take your different uh equipments, branch them in different shards, and pass them through LLMs.
- 03:38Uh parallel calls should work, right?
- 03:40Well, that's what we thought.
- 03:42The problem is you get horrible recall and hallucinations.
- 03:46You will see LLMs invent phantom equipment that do not exist, and also silently drop things that do exist.
- 03:53Now, this creates a problem for mission-critical systems where the users need to know exactly what is happening with their systems.
- 04:00Any problems there will quickly erode user trust.
- 04:02At the same time, you will miss on specific problems which can cascade into bigger, bigger problems going forward.
- 04:10Anyhow, something that we realized here is that as the size of these physical infrastructure grows, LLMs can not the LLM-based solutions can not grow with the size of individual components or instances or nodes.
- 04:25They We have to find something that grows sub-linearly with increasing equipment count.
- 04:30And this is what we figured out.
- 04:32So, we should not grow with instances, we should grow with tree depth.
- 04:36Now, what do we mean by tree depth is we realized that there's a hierarchical structure in which an AI factory is arranged.
- 04:42You will have data centers, then each data centers will have different data halls, you have each of them will have different aisles, and you will have different rows and then racks and then GPUs.
- 04:51Similarly, a chiller plant will have rooms where chillers are arranged, then you will have pumps.
- 04:56There will be a separate cooling tower unit.
- 04:58It's kind of like a tree.
- 05:00The depth of the tree grows very slowly, the width grows extremely fast.
- 05:05In other words, you will have a hierarchy that only adds new equipments very rarely, but it adds a lot of them when it does.
- 05:14You will have a lot of GPUs, but without GPUs, you won't have a lot of things.
- 05:18Now, we realized that this could be used to solve our problems.
- 05:23And there are four insights that really come into the picture for this.
- 05:27One is a linearizer.
- 05:29What I mean by the linearizer is the LLM has to figure out where each of these things are arranged and how to map from a vague user query to specific equipment or groups of equipments.
- 05:41Here a summarized representation of our system's graph can be really, really useful.
- 05:46For example, uh if you're uh a 1 gigawatt scale factory can have over a million nodes and each node represents a unique equipment.
- 05:57But, because you want to go from the root to the leaf, all you have to do is describe all the paths and that's a very small finite list.
- 06:06For example, here you can see that to get to a GPU, you can just you just need four different layers to get to it.
- 06:13To get to a chiller, similarly four layers to get to switches, similarly four layers.
- 06:19With this, 64 GPU layer sorry 64 GPU system and a 460,000 GPU system produce roughly the same size of summaries.
- 06:31This consolidated context gives your LLM all it needs to know to figure out how the distribute how a plant is arranged and how different equipment are distributed in that plant.
- 06:43The second insight that we had was LLMs are good for planning but not good for searching.
- 06:49This is what we realized when we saw very poor recall with our sharded solutions.
- 06:54So, instead of making the LLM sift through all the different fuzzy names that we can get from our users, we asked the LLM to give us exactly how to look for them.
- 07:06So, for example, here the query says, "Give me all the GPUs that are running hot in data hall 11."
- 07:11The LLM does not need to go through all these names of all our GPUs to figure out which one of those are in data hall 11 and then figure out how they are running hot.
- 07:20All it needs to do is structured outputs which tells us that well, we need to collect GPUs.
- 07:26The scope under which we need to collect is a subtree which is just data hall 11 and the filter that we need to apply to finally figure out what exactly we need is GPUs that are running hot.
- 07:37Now, this can be different things depending on the context and you can implement different filters.
- 07:41All we need to know is how do we create the set that we want to know get to.
- 07:48The third thing that we realized is that once you have a structured output to figure out what exactly you need, uh building the back end for it is relatively simple and straightforward.
- 07:59Now, all we need to do is create different uh subsets of uh our equipment or pre-index trees as we like to call them based on their location and based on how they interact with other uh equipment around to get an idea of what you need to look at.
- 08:14So, for example, from the previous uh slide we saw that we wanted to look at GPUs in data hall 11.
- 08:19We could just get all the GPUs in data hall 11 in one pre-index subtree or other data halls, for example, or other racks, for example.
- 08:27And then to get to the final result, all we need to do is uh run a query to find all GPUs that are running hot and take their intersection.
- 08:35Set operations ensure that we have perfect recall and accuracy irrespective of uh how we want to filter uh the queries and what uh you know, fuzziness the user may have in their query.
- 08:48Next slide, please.
- 08:50Yes.
- 08:50And finally, uh what if you have something that is very, very vague?
- 08:55In which case, uh you have to get the LLMs to get to searching, but instead of searching directly over names, we figured out that getting the LLMs to uh give us patterns to look for.
- 09:07This could be uh patterns in the data but in the names can be much more useful to figure out uh what the user is talking about instead of just passing the entire
- 09:17name list uh to the LLM.
- 09:19The LLM never has to see uh very large number of tokens.
- 09:23All it needs to do is uh see some patterns in the naming convention, figure out what exactly the user is talking about, create a pattern, and then we can execute it uh on the back end on our side.
- 09:35This makes sure that the LLMs has a constant or relatively constant uh cost of operation.
- 09:42Whereas if we had to read through everything, we would have been scaling linearly with increasing equipment count, which itself grows exponentially as the size of the system increases.
- 09:54Finally, to process a user query end-to-end, we go from the user's query, which could be anything from one equipment or a group of equipment, to a planner LLM, which figures out user's intent and gives us a search pattern.
- 10:10Based on that search plan, we have a deterministic resolver, which indexes, does set operations, figures out exactly what we need to do, and creates the final set that maps to the user's query, and this is what we call the result set.
- 10:25All of this is a two or three-step process instead of a multi-step agentic loop, which can keep on running over and over again.
- 10:33And this keeps our total cost also relatively flat and constant.
- 10:40Cool.
- 10:40Yeah, if Rahul's job is to design the architecture, my job is production readiness.
- 10:46So, we need to make sure that whatever we designed, the elegant solutions we came up, actually hold up under real load, real customer data, and all the messy edge cases you only ever see production.
- 10:59So, before any of this went near a customer, we put it through some extensive tests and evals.
- 11:04We measured the new system head-to-head against the old ones with same LLM model, same data, and we did three runs per case just to make sure.
- 11:13Our goal was simple, prove that Rahul's solutions are ready for production.
- 11:18And they definitely are.
- 11:19If you look at some stats here, the old approach degraded pretty fast at scale.
- 11:24So, we got 80% correctness at 64 GPUs, and that dropped to about 30% when the GPU grew to 400 460,000.
- 11:33On the other hand, the our new approach has maintained correctness with 100% accuracy across all of those um tests that we give it.
- 11:42And this is not just synthetic test.
- 11:44Uh this is also a real data.
- 11:46So, we we had 66 cases on six real production systems and they product they produce zero failures as well.
- 11:56And not just correctness, it's also dramatically lighter.
- 11:59So, when we talk about 1 GW scale uh data center, the old approach burned 116 million tokens for just a single validation pass while still having a lot of errors.
- 12:11If you look at the new one, it's a 390,000 tokens, which comes to around 300 less tokens fewer tokens.
- 12:19But the part that matters the most, the cost is flat.
- 12:22As as Rahul was talking about before, the the system grows in size, but we the cost of the query was 9,000 tokens a query where the system was 64 GPUs
- 12:33or 460,000.
- 12:35So, instead of getting the cost grow exponentially w- when the customers grow their systems, it stays the same.
- 12:43That's the impact.
- 12:44Now, there's something about uh what we learned and the part I want you to take back to your own work.
- 12:50It starts with a lens from Karpathy.
- 12:53Most of you have probably seen his presentation or his framing talk about this before.
- 12:57He talks about different kinds of software.
- 12:59Software 1.0 is a deterministic code you write.
- 13:02It's predictable, exact, but a lot less flexible.
- 13:06On the other hand, we have software 3.0, which is basically a behavior you prompt out of an LLM.
- 13:12In our case, that might be show me the GPUs in data hall 11 that are running hot.
- 13:17The This is very flexible, smart, but it's a bit fuzzy.
- 13:22Now, his observation was that in legacy software, the 3.0 is steadily eating 1.0. More of what used to be deterministic code becomes a prompt.
- 13:32Just hold that picture because the lesson for new built AI native systems runs a little bit the other way.
- 13:41But the real skill is knowing which work is the LM not best for.
- 13:46And you always want to keep the thing the L LM should be used for the things that it does well.
- 13:52It's great at parsing ambiguous requests, judging where to look for data and what to look for, handling phrasing we've never seen from a new user that has a different query,
- 14:02and at the end also synthesizing and writing the final human-readable answer.
- 14:08But But everything you you can data model, you should move into code.
- 14:12This is the key one especially for large systems.
- 14:15If your data has structure, call it a hierarchy, graph, or a schema, a language model scanning it token by token is definitely the wrong tool.
- 14:24Both retrieval, exact set logic, counting, dedup across near identical names, which happens a lot in the data center land, anything that must be 100% reproducible, it should be a deterministic code.
- 14:37The simple heuristic that usually works, if you can write down the structure or the rules, it's a 1.0 job.
- 14:45And pure LM is weakest exactly when the system is large and well structured, which is precisely where we operate and our customers.
- 14:55So, in a sense, we ran Carpathia's trend backwards.
- 14:58We started almost pure 3.0. We threw everything in the context window because that is the fastest way to find out what's even worth building.
- 15:06And as we said, it worked pretty well on a simple demo to start.
- 15:10Then, as it had to really scale, we moved the parts that can be treated as known engineering problems into 1.0. And we still kept the hard judgment in the LM.
- 15:21So, that's the inversion.
- 15:22Legacy software drifts from 1.0 towards 3.0 and new AI native software starts at 3.0 and matures towards 1.0 for the use cases that earn it, of course.
- 15:34We are not here to replace model judgment.
- 15:36We want to feed it with the 1.1.0 tools, as we call it.
- 15:41So every 1.0 function you add is more reliable ground for the LLM to stand on.
- 15:48So to finish up, let the LLM keep the hard decisions.
- 15:52Everything it shouldn't be guessing on, add add it in as code and hand that structure back to the model to work with.
- 16:00So develop with software 3.0, productionize by adding in software 3.0 1.0. Thanks for watching everyone.
- 16:09Uh any follow-up questions at all, you can reach us by email Rahul Russell Google at fidra.ai, Lanza at least to get fidra.ai, or you can drop them in the video comments below.
- 16:20Thank you for watching.
- 16:22Thanks.