Trading Desks to Clinical Trials: Parallels in Applied Vertical AI — Ayush Bhardwaj, Allos AI

AI Engineer · 20 min · 259 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.

  1. 00:01[music]
  2. 00:12Hello everyone.
  3. 00:15So, my name is Ayush Bhardwaj and I did applied AI for a hedge fund.
  4. 00:20And now I do everything tech plus applied AI for a pharma tech startup cuz you know the way startups are.
  5. 00:26You have to do everything, wear multiple hats.
  6. 00:28So, before I start the session, I would like to do a small survey.
  7. 00:32Can I get a raise of hands for all the engineers in the room?
  8. 00:36Okay, that's a tough room.
  9. 00:38Now, can I get a raise of hands for managers?
  10. 00:41Okay, just to be clear, managing AI agent does not count.
  11. 00:45You have to manage people.
  12. 00:46Okay, we have few managers as well.
  13. 00:48Interesting.
  14. 00:49So, they will help me like fine-tune my talk a bit.
  15. 00:51So, today my aim is to take you through the journey of how do you actually build and iterate in applied vertical AI?
  16. 00:58And my experience is from the hedge fund and the pharma tech company.
  17. 01:02So, before delving deep into the recipe, I'll just like take you through what do I even mean by applied vertical AI cuz I don't know if it sounds like a very weird term.
  18. 01:11It's like the vertical word is kind of forced.
  19. 01:13I won't lie, it is.
  20. 01:14I coined this term probably.
  21. 01:16So, applied AI is like built for So, what applied vertical AI is essentially applied AI but built for one very specific industry.
  22. 01:24It's It's aim is to simulate a job of a person in that particular industry in a sense.
  23. 01:29So, an example of applied AI is Google Translate which is like general purpose, helps you translate.
  24. 01:35It could be used in education tech and it can have like tons and various sorts of uses is whereas Elos, which is my employer, the pharma tech company, we specifically build drugs with AI.
  25. 01:44So, that's a very specific use case.
  26. 01:46Another examples of applied vertical AI field could be the legal tech firms that are now coming up with.
  27. 01:51You must I'm sure you must have heard about them.
  28. 01:53So, those are like another the examples of applied vertical AI.
  29. 01:58So, when I left the hedge fund, right?
  30. 02:01So, I was expecting that the world would change for me cuz you know, hedge funds are like really fast and really pressure sensitive.
  31. 02:07Whereas, pharma is like, "Okay, we're going to take 15 years, but we're going to do it right."
  32. 02:12Hedge fund was all about like, "You need to do it fast and mostly right.
  33. 02:16It does not matter if we lose at one paradigm as long as we are overall winning."
  34. 02:20Whereas, a pharma firm is like, "We have to be absolutely right.
  35. 02:23You can take a week more."
  36. 02:25And it was true.
  37. 02:26It's it's a completely different world.
  38. 02:28But, to your surprise and to mine as well, nothing changed, actually.
  39. 02:33My job increased, but the core part of my job, applied AI, remained the exact same and I cannot uh express how surprised I was cuz I thought that it'll be a complete different thing, but apparently it was not.
  40. 02:46So, uh So, then I spoke to other people as well across legal AI and the people coming up with the prop tech firms, which is essentially the real estate tech firms.
  41. 02:55And I realized that everyone is kind of building the applied vertical AI in a very similar way.
  42. 03:00I could see some steps that could be essentially abstracted out.
  43. 03:03And that's what we'll do today.
  44. 03:06So, uh before again delving the deep into that, I received a few reach outs saying, "Are people actually putting agents into production?"
  45. 03:15And I was like, this is such a wrong question to ask.
  46. 03:17Everyone is putting agents into production, even like 15-year-old 15-year-old kids these days.
  47. 03:23The question to ask is whether they actually work, whether they actually make or save money, whether they justify their ROI, whether uh they're making way more than the amount we are investing into it like end-to-end.
  48. 03:34And I can say from my anecdotal experience, yes.
  49. 03:37At the both places I worked, the agent either saved the money or made more money.
  50. 03:43So, with that, let's get started.
  51. 03:47So, the recipe I'll take you through a series of seven steps, roughly, and try to like make this process as simple as possible.
  52. 03:54So, the first step is formulate the problem.
  53. 03:57So, this is sounds like very trivial, but a lot of people, specifically startups, get this wrong.
  54. 04:03They just try to do too much at once.
  55. 04:05Whereas, from what I have learned and what I think a lot of colleagues would agree, you need to pick a very narrow task.
  56. 04:10You just cannot ask it to do everything.
  57. 04:12A good example for this could be, let's say if you build something in finance, you won't ask it to like, "Hey, can you fetch me top three market opportunities that I could invest in?"
  58. 04:21No, that won't work.
  59. 04:22You have to be like very specific.
  60. 04:24Like you pick a market, you say, "Let's take the US equities."
  61. 04:28Then you pick an industry, let's take IT.
  62. 04:31And then you ask it to like rank stocks based on some parameters like capital expenditure or let's say the AI um uh investments.
  63. 04:40So, you pick like very specific things, and then you uh sort of formulate a very narrow job for the AI agent to do.
  64. 04:46And you can build like n number of AI agent.
  65. 04:49Last I checked, there was no tax on building more AI agents.
  66. 04:51So, why do you want your single agent to do everything?
  67. 04:54So, this is important, and this is in the same uh in the pharma context is the exact same.
  68. 04:58We just break down the process into steps, and then ask really pointed questions with the agent.
  69. 05:03We model our agent for a task.
  70. 05:06So, once we have our problem right off the way, we know what we're trying to solve, the next step is identify the data.
  71. 05:13And I cannot stress this enough.
  72. 05:14This is a really, really, really important step, cuz everyone has news data.
  73. 05:19Everyone has like seller side reports from JP Morgan, Morgan Stanley.
  74. 05:24Uh everyone has the arXiv preprint server or PubChem or your research papers, right?
  75. 05:29But what actually makes your application better than let's say ChatGPT or Claude?
  76. 05:33It is your proprietary data.
  77. 05:35So, the thing with proprietary data is it's really expensive to buy, and most people won't sell it to you.
  78. 05:40So, you need to curate it by yourself.
  79. 05:43Imagine your organization has been working for 3 years, right?
  80. 05:45They already have a lot of data.
  81. 05:47It's just unstructured.
  82. 05:48And in the age of LLMs, I think this is a very fairly easy task to make unstructured data into structured data.
  83. 05:55Like a LLM workflow could do it overnight.
  84. 05:57So, to give you a great example of the proprietary data that finance industry has, it's the trade thesis, which is like what trade work and why it worked.
  85. 06:10And in pharma, it is the data for failed experiments.
  86. 06:13For successful experiments data, yes, you can get it, but failed experiments, that's relatively hard to get.
  87. 06:19So, now we have the problem, we have the data.
  88. 06:21What's the third step?
  89. 06:23That is to model the problem, like write the prompt.
  90. 06:27So, while writing prompt, you like what we should aim is to model it after the person who you are trying to replace.
  91. 06:35I mean, that's the hypothesis, but yeah, no offense, we're not trying to replace anyone with AI, but that's the ideology behind writing prompts.
  92. 06:42Encode how a person would solve this job into multiple steps.
  93. 06:46So, it's just like a like a mental model.
  94. 06:48So, this is again fairly simple.
  95. 06:51Next thing, observability, I'm sure you have been in this conference at 3 years and this word, I think I don't know, you'll be hearing about like a thousandth time.
  96. 06:58There are tons of observability provider.
  97. 07:01If you can't see it, you can fix it.
  98. 07:03So, you need observability to see the traces, understand what your uh AI application is doing, and debug it.
  99. 07:11So, sorry, but all of this was the easy part, to be honest.
  100. 07:15All of this fits one screen.
  101. 07:17The mythical 10x engineers can do this stuff in minutes.
  102. 07:21Like literally, this is the code you precisely need to build an AI agent.
  103. 07:25So, that's why it's not the moat.
  104. 07:27Uh of course, except your proprietary data.
  105. 07:29So, what do you do now?
  106. 07:31What do you do after doing the first four steps, which is observability, and prompts, and like uh getting the data right, and everything?
  107. 07:42UI trade.
  108. 07:44Now, the thing with iteration is like when I joined the hedge fund, I thought how hard it can be.
  109. 07:49I mean, everyone can iterate.
  110. 07:50I mean, we have been iterating our whole life for each of the task.
  111. 07:54But, to be honest, I could build it, but I just could not tell if it worked cuz I'm not a trader.
  112. 08:03I'm not someone who has a PhD in biology or chemistry.
  113. 08:06I just don't understand what the model is saying, what is the output of my AI agent is.
  114. 08:12And since most of you are engineers, you would relate.
  115. 08:15You can instantly tell that Sonnet 5 sucks because you have your own training.
  116. 08:20You understand, okay, this code is not great code.
  117. 08:23Whereas, some X model, let's say Fable 5, you see, okay, this is great but not as great as the high base cuz you've been trained for this for life.
  118. 08:30You have a mental model to judge these things.
  119. 08:33But, you just do not have the same kind of mental model when it comes to like predicting trade thesis is or doing like really specific task that vertically our industry does.
  120. 08:44And this is also the place where like a lot of vertical AI projects quietly die because on the surface it looks like you have made it, you have built it, let's put this into production and start selling it.
  121. 08:55But, no one would buy it the same way you won't use an inferior coding model.
  122. 09:00So, as an engineer when I ran into this, I just couldn't accept honestly.
  123. 09:04I thought, no, there's certainly more that I can do.
  124. 09:06We don't need other people.
  125. 09:07So, I thought I could LLM as a judge my way out of it.
  126. 09:14[sighs and laughter]
  127. 09:14And this was a really, really stupid mistake to be honest cuz what LLM is essentially doing, it's it's predicting the next probable word.
  128. 09:21So, if you see, it's just like jargoning its way out.
  129. 09:24It does not understand what alpha means.
  130. 09:26It does not understand how to actually create value unless you have like taught it some way.
  131. 09:31And whereas a human can just tell it instantly what's and what's not.
  132. 09:36So, I'll just try to dwell a bit more deeper on why you can just iterate.
  133. 09:42So, first thing is that model cannot verify itself, specifically in these fields, because reinforcement learning via verifiable rewards is really good at math and code because you have like answer keys, you can verify your code is uh compiling or not, and there are tons of stuff you can just model
  134. 09:58uh the complete thing around this.
  135. 10:00But, when in these fields, there is just no way to model it.
  136. 10:04And And let's say if any error gets in, it's just compounds with every stuff.
  137. 10:07And that's what LeCun seems to think as well.
  138. 10:11And now, the more important part that we touched upon previously, the data.
  139. 10:17So, the interesting thing with pharma and finance is the data was never there.
  140. 10:23And I'll explain to you why.
  141. 10:27So, any institutional manager holding over $100 million in qualifying US equities are forced to publicly file their holdings, long position holdings, every quarter.
  142. 10:38And once a hedge fund does this, this is the percentage decrease in their returns because everyone just sees those reverse engineers and takes away their moat.
  143. 10:48And when it comes to pharma, right?
  144. 10:51So, this is the number of uh so, by law, you are like required to disclose every clinical trial pass or failure you have done.
  145. 10:57But, 30% of the funds, which is like nearly 1/3 of firms, never do.
  146. 11:01And in like 2026, FDA had to like publicly remind over, I don't know, about 2,000 sponsors that they are, I mean, doing injustice by not uh releasing unfavorable results
  147. 11:14because this is the exact data which helps the model thing, which helps your LLM actually reason through these complex and niche industries.
  148. 11:22And they hide it because for them, it's like a chicken laying golden eggs.
  149. 11:26Why would they sell their chicken?
  150. 11:28So, naturally, neither OpenAI nor Anthropic has that has this data because it's like gatekeeper.
  151. 11:33You just cannot hire a trader for $100 an hour and have them annotate that stuff because there's like lots of NDAs and they definitely earn more.
  152. 11:41So, okay, now I have told you about tens of problems, right?
  153. 11:45Now, you would naturally think, okay, yeah, right, then what do we do?
  154. 11:48How do we build a startup in like a vertical space space?
  155. 11:53So, very self-explanatory, you hire the person who you want to sell it to cuz there is, to be honest, no other way around.
  156. 12:03I have tried a lot of stuff.
  157. 12:04You just need to hire the user.
  158. 12:06In finance in a hedge fund, this was very easy because the user was kind of like my boss, the trader.
  159. 12:12We worked together, but in the PharmaTech startup, it was very weird.
  160. 12:16We were like a bunch of young engineers and we were like, oh, we need a 20-year-old scientist in our company to tell us what to do?
  161. 12:22Yeah, I guess we do.
  162. 12:24And then we hired someone, right?
  163. 12:25And that someone actually changed the trajectory of our tools.
  164. 12:28Our tools started making sense.
  165. 12:30When we pitched to the other pharma companies, the big ones, the big pharma, they started liking our tools because it's kind of spoke their language versus the normal jargonish LLM language.
  166. 12:41So, once you have hired the user, let's say, then what would you make that user do?
  167. 12:47You try to build a learning loop out of it.
  168. 12:50The domain expert can start at the like a very, very low level, the ground level, where they just think about prompts.
  169. 12:56Okay, yeah, I mean, let's not ask LLM to do this.
  170. 13:00Let's ask a very specific query again.
  171. 13:03They'll help you curate data.
  172. 13:04Just like engineers know which conferences are which are not, which research paper sites are great, which are not, which are like top leaders in engineering, which is which are just like influencers.
  173. 13:15Similarly, a pharma expert or let's say a trader knows which sources are more reliable than the other.
  174. 13:20So, they help you create their data.
  175. 13:22They help you like refine your prompts better, and they try to create like thinking models of how they would think about a problem.
  176. 13:29Cuz I mean, let's say if you if you follow five steps to solve a problem, right?
  177. 13:33You just cannot do it in in any random order.
  178. 13:36There has to be a logical flow.
  179. 13:37There has to be a natural flow.
  180. 13:38That's So, that's what they uh try to curate like decompose a problem, gradually refine, and then finally judge.
  181. 13:46So, the person who sort of has lived through the complete of the industry that they're trying to revolutionize, their judgment is now like turning into agents.
  182. 13:56So, that's what's happening behind the loop.
  183. 13:58So, uh to do this there are like again multiple ways.
  184. 14:02I mean, each of these could have been a hour-long session on its own.
  185. 14:05And I wish I could take, but these are like few ways that I identified.
  186. 14:10Uh I'll just like take uh you through them like really quickly in the interest of time.
  187. 14:14So, supervised fine-tuning I think most of you would know where like model mimics human nest demonstrations.
  188. 14:20Uh reinforcement learning from human feedback is like a kind of uh a very efficient way where human preferences train a reward model.
  189. 14:28Then rubrics as a reward is I I like to call it reinforcement learning from AI feedback.
  190. 14:34This is because that you can human can just create a rubric, and then AI will just like grade itself based on that rubric, and that improve its own processes.
  191. 14:44But again, there is a slight chance that you might run into an echo chamber with rubrics as rewards.
  192. 14:49And the cheapest of all, and I think the highest ROI is the error analysis.
  193. 14:54Whereas the observability part that you set up earlier, you just analyze the logs plain and simple.
  194. 14:59You understand where model is going wrong, and then you just try to correct it.
  195. 15:03So, this is where you have like don't have to touch any weights, and the most highest ROI way to get the impact from a like start on.
  196. 15:12And once you understand like uh what more you could do, or if error analysis is solving or not, you can just gradually climb up the ladder, and probably uh later on go to the ultimate reinforcement
  197. 15:23learning from human feedback cuz that's I think in our industry kind of the golden standard these days that you need to do RLHF to actually get some edge.
  198. 15:32But uh certainly there are some pitfalls of it.
  199. 15:35Like for example, now there's GLM 5.2, right?
  200. 15:39You fine-tuned it, right?
  201. 15:42Uh Alibaba Cloud or let's say Deep Seek will release a newer model, then you have to fine-tune that too as well.
  202. 15:46So there is a cost.
  203. 15:47It's not cheap.
  204. 15:49So once you have done all this, you just create a loop and you just like go on to that loop.
  205. 15:54You hired one user, you hire more users, they ask more queries, the scoping increases, the data increases.
  206. 16:00At this point you're kind of generating your own data.
  207. 16:03The exercise you have been doing in loop, right?
  208. 16:05That exercise itself is generating a very I would say a crazy data set of what works and what does not work.
  209. 16:11And this loop never stops.
  210. 16:13Once you feel confident enough in your application, you just ship it, provide it to the external paying users, and then you see the magic of it that it actually works.
  211. 16:21So I just pulled the stat from Stanford AI Index report cuz it's a really nice report that gives you an idea of what the state of AI is.
  212. 16:30And this says like 80% 89% of enterprise AI agents never reach production.
  213. 16:35Again, I disagree.
  214. 16:36Every AI reaches production, but it just fails to work or like justify its own cost.
  215. 16:42So that's the real thing.
  216. 16:43You can just build and ship AI agents whenever you want, but you need to justify ROI.
  217. 16:48And finance and pharma are two such industries where if it does not make money, it's shown the door.
  218. 16:54Simple.
  219. 16:54They won't like wait and say, "Okay, maybe it'll work in 2 years.
  220. 16:57Maybe the cost will be lower in by the third year."
  221. 17:00No. It has to instantly make money.
  222. 17:02It has to like hit the ground running.
  223. 17:03And if it does not, shown the door instantly.
  224. 17:06So just to summarize the seven steps that I feel are like good enough to give you an abstraction of how the vertical AI industry moves.
  225. 17:15You formulate the problem statement, you source your data sources, you prompt it well, you define those prompts, you observe how your tool is performing, you don't iterate yet, you hire the user.
  226. 17:27And this user or users now play with the tool as much as possible.
  227. 17:31They like kind of form a learning loop, an endless learning loop that goes on and at a point when you feel yeah, it's it's really delivering that alpha over let's say Claude and ChatGPT, you just ship it, you start earning money.
  228. 17:43So, one more interesting thing.
  229. 17:46So, HITL is like kind of a thing everyone is like yeah, let's add human in the loop.
  230. 17:50I would say not yet.
  231. 17:52Finance and pharma are still those two industries where it's AITL, AI in the loop cuz everything is like done by the expert, but the AI assistant really helps save time.
  232. 18:03Like for example, uh it may take an X amount for a trader to form different trade thesis, and AI can just give him five candidate trade thesis, but which one would actually work in the market and which won't is the discussion the discussion still lies with the trader.
  233. 18:18And same for pharma when you're like picking drug candidates, which one to pick, the expert still does it, but you just like reduce the time of expert by a lot lot.
  234. 18:29So, and and it will stay this way for really long.
  235. 18:32So, uh for the models to actually make good decisions, they don't need to do correlation, they need to do causation.
  236. 18:39And as Ya as Jan LeCun puts it, these are like text statistics, not real-world models.
  237. 18:45You cannot just pattern match with past and use future to predict to it.
  238. 18:49And so, we are like kind of not there yet.
  239. 18:51That's what I call as the AGI line.
  240. 18:54Once we are there, yeah, probably then models will just like make drugs.
  241. 18:56You will have vibe coded drugs.
  242. 18:58Someone would be vibe coding market, but yeah, not yet.
  243. 19:02So, a final takeaway that I would call if if if there's one thing you are taking away from this talk, this is it.
  244. 19:09Model infra ecosystem, everyone selling you tons of stuff at this conference is just commodity.
  245. 19:15Everyone has it.
  246. 19:16If you have it, everyone has it.
  247. 19:17Everyone can pay X number of dollars for a subscription.
  248. 19:21But, what is moat and no one will come and sell it to you.
  249. 19:24You won't have to curate it on your own is the domain expertise.
  250. 19:28You need your data.
  251. 19:28You need other people's data.
  252. 19:29That is just not out there on the internet.
  253. 19:32And that that's what will form your moat.
  254. 19:34So, thank you for your time.
  255. 19:36I think you enjoyed the talk and yeah, let me know if you have any questions.
  256. 19:40We can meet outside.
  257. 19:41Thank you.
  258. 19:42[applause]
  259. 19:58[music]