Shreya Shankar (@sh_reya) profile picture

Incoming assistant professor @CSDatCMU @CMUDB. Putting LLMs in databases and BI tools. Created https://xitter.cf/t.co/PmuOqAXVgS and https://xitter.cf/t.co/8MQt4na2cj.

SF & Pittsburgh
Joined January 2014
Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)Photo by Shreya Shankar (@sh_reya)
Excited to share Quail, our new open source AI-SQL engine (a collab with Modal)! By planning queries and LLM inference together, it reaches 1B+ input tokens/min on one H100 for one query 😱🚀 AI-powered data operators create a new, interesting inference workload👇
84
164
40
1,657
387,434
Shreya Shankar retweeted
AI benchmarks are more realistic than ever. But they still have bugs (e.g., failing correct work) and mostly measure what's easy, not what matters. Here's my breakdown of 12 public evals: how they're built, where they break, and what to measure instead. eugeneyan.com/writing/public…
47
44
14
279
25,415
#phdadvice I'm a CS professor at a major US university. This is the top advice for students applying to a CS PhD program: "Do not use AI to write your email, period."
15
31
5
447
60,945
Shreya Shankar retweeted
Video from my Stanford HCI seminar talk is up (also gave this at MIT two weeks ago): youtube.com/watch?v=e1VYwgm9… I discuss how foundational theories (e.g., boundary objects, mutual awareness, sociotechnical gap) from CSCW are newly relevant for designing human-agent interaction.
2
16
6
136
10,922
Shreya Shankar retweeted
New lab blog post! How do you run complex semantic top-k queries on your unstructured text, accurately and at scale? E.g., "which sales calls most clearly show a customer committing to buy?" Common convention is to (1) use pairwise LLM comparisons for accuracy (e.g., "does call A show more commitment to buy than call B?"), since cosine similarity on off-the-shelf embeddings misses nuanced criteria, and (2) use small LLMs, so it's cheap at scale. Surprisingly, we find that just asking the small LLM to score each record and sorting (a "pointwise" approach) is just as accurate (if not more) on a few business-oriented top-k tasks, and up to 13x faster in our experiments.
32
20
2
167
8,404
New lab blog post! How do you run complex semantic top-k queries on your unstructured text, accurately and at scale? E.g., "which sales calls most clearly show a customer committing to buy?" Common convention is to (1) use pairwise LLM comparisons for accuracy (e.g., "does call A show more commitment to buy than call B?"), since cosine similarity on off-the-shelf embeddings misses nuanced criteria, and (2) use small LLMs, so it's cheap at scale. Surprisingly, we find that just asking the small LLM to score each record and sorting (a "pointwise" approach) is just as accurate (if not more) on a few business-oriented top-k tasks, and up to 13x faster in our experiments.
32
20
2
167
8,404
Why does pairwise do worse? Interestingly, if you swap the order of the two records in the prompt, many small LLMs pick a different record! Qwen3-0.6B basically never picks the same one; bigger models are more consistent, but even the best one we tried (Jev) still flips on a whopping 12% of pairs in one dataset!
9
1
11
1,297
Read more! fsdatalab.github.io/blog/ai-… Kudos to Jianhong for driving these experiments and writing this post --- he's a 3rd year undergrad. The project initially started out as "implement a pairwise comparison-based topk operator in Quail"... and it turned into this!
1
11
936
Shreya Shankar retweeted
There's never been a better time to learn something deeply There's also never been an easier time to take shortcuts and not learn anything
20
20
13
186
8,629
100% we can learn a lot from the history of database development to predict the future of context/semantic layers. query processing has always been I/O or memory bound (except the few years prior to vectorized + compiled engines like monetdb & hyper, and today’s expensive AI functions or string functions). in other words, the way to improve performance is to **transfer less data to the LLM** or **transfer data to the LLM faster**, which is exactly what an index or context layer does. However, new in the AI era is the need for a **high quality** context layer. Quality was easier in traditional DBs because using an index doesn’t impact correctness. Eg with a B-tree, you get the same rows as a full scan, just faster. A context layer is lossy by design, since the LLM only sees what we put in the context (and maybe progressive disclosure like instructions to read more of the data if it wants). So every decision about what to retrieve or summarize is also a decision about correctness, which we don’t know how to rigorously model. It all comes down to having good, company-specific evals, if I may
a context layer is actually not counter to the bitter lesson it’s just systems infra: a local read replica + derived indexes built by offline LLMs (no hardcoded ontologies, just recompute as models get better) people love to cite the bitter lesson as “skip the infra, let the model figure it out live,” but search is literally half of sutton’s point CPUs getting orders of magnitude faster didn’t kill b-trees or materialized views. those exist because compute outpaces I/O let's assume frontier-level-intelligence inference hits 0ms: live fan-out across scattered SaaS APIs still leaves you I/O-bound. and then in the SaaS endgame, proprietary state is the last moat they defend so those API straws only get narrower. narrow pipes still work with slow incremental sync of raw state, but not parallel search at runtime everyone fanning out is already eating 429s and it'll probably only get worse if you keep raw ground truth synced underneath so runtime models can search and verify in milliseconds + pay compute at write-time and read-time --> hooray you can still be bitter-lesson pilled with a context layer
46
13
1
194
12,453
Relatedly I am bearish on file systems for the context layer. It is a weird blip in time right now that LLMs are best at navigating file systems, probably due to training procedures. But we know that it’s a lot of work to learn and remember how to navigate file systems (see 1973 Turing lecture from Charles Bachman; how bullish they were on the programmer/agent as navigator; all to be replaced by Codd and relational data model). the future of context layers is probably in some logical/physical data independence
8
1
17
1,262
Amazing to see the bots in the replies assume I made a mistake in using this idiom 🤣
agents make me feel like the days are very short and the years are very long
1
32
4,197
agents make me feel like the days are very short and the years are very long
12
3
2
70
9,666
Shreya Shankar retweeted
a context layer is actually not counter to the bitter lesson it’s just systems infra: a local read replica + derived indexes built by offline LLMs (no hardcoded ontologies, just recompute as models get better) people love to cite the bitter lesson as “skip the infra, let the model figure it out live,” but search is literally half of sutton’s point CPUs getting orders of magnitude faster didn’t kill b-trees or materialized views. those exist because compute outpaces I/O let's assume frontier-level-intelligence inference hits 0ms: live fan-out across scattered SaaS APIs still leaves you I/O-bound. and then in the SaaS endgame, proprietary state is the last moat they defend so those API straws only get narrower. narrow pipes still work with slow incremental sync of raw state, but not parallel search at runtime everyone fanning out is already eating 429s and it'll probably only get worse if you keep raw ground truth synced underneath so runtime models can search and verify in milliseconds + pay compute at write-time and read-time --> hooray you can still be bitter-lesson pilled with a context layer
context layer / semantic layer / ontology layer = lap 2 of prompt engineering bitter pill → 💊
9
7
5
119
25,360
Shreya Shankar retweeted
Me and a bunch of your favorite programmer-writers (Thomas Ptacek, Thorsten Ball, Hillel Wayne, etc.) are judging this neat writing contest. I'm looking forward to your submissions. Let's help the kids. RT for reach. advicewanted.dev/
8
43
3
319
14,699
good take. more thoughts: it is even more important (and higher payoff) than in pre AI days to have good semantic layers. also, we need an analog of BI/dashboards for agents — some interface that agents can cheaply & quickly issue 100s of queries (relying on system1 thinking)
the most important metric for OLAP systems is no longer speed. it's $/task. which takes into account both efficiency and query ergonomics
31
9
129
8,524
Shreya Shankar retweeted
it’s that time of the year again, getting some student reach out for application help in my inbox, so here we go ☺️
It’s PhD / grad school application season again🌱 I’ve been getting reach out about SoPs, research fit, “should I do PhD at all??” Here's the dump of my honest thoughts from my application experience - what worked for me, and how I decided if a PhD was right for me. Wrote it last year, now updated with some new notes. Hope it helps 💙 Link in thread.
5
1
65
6,759
Shreya Shankar retweeted
Was a great turnout for the launch of @HamelHusain and @sh_reya's new book, Evals for AI Engineers. We loved meeting so many agent builders. Thanks for hosting, @danolsen and @LeanProdMeetup. See you at the next one.
3
5
12
2,354
Shreya Shankar retweeted
Statements like “UI is dead. Chat is enough.” always frustrate me. First, chat is a UI too. Second, raw chat is far from sufficient for human-agent communication. Think of agents as other humans for a moment. If chat were enough, why did we invent emojis to convey nuanced emotions, Slack to organize conversations, social media for asynchronous sharing, but also all the visual media (animation, visualization, and videos). If chat were enough, we'll be living a world where everyone is having 20 phone calls with others at the same time. But we are not. UI isn't dying. It's evolving. We're moving from editing-heavy, human-driven interfaces toward interfaces for rich human-agent communication, and there is much to explore.
UI is dead but we keep inventing better UI than raw chat but UI is dead though.
10
9
1
78
3,985
Shreya Shankar retweeted
I got about 8% of the way through GTA (too distracted with side quests) and 30% of the way through EFAIE.
These two arrived on the same day, I might have to take two days off @sh_reya @HamelHusain 😅
1
2
1
22
6,163
Shreya Shankar retweeted
Excited to present @ AWS re:Invent 26 in Vegas Dec 1! Building better agents goes well beyond models. In INV535, I’ll share @DAP__Lab's work on designing agentic data envs for agents to new capabilities and limiting failure. There’s a rich research agenda ahead! See you there!
1
2
12
966