35 ms·
SWE-Grep and SWE-Grep-Mini: RL for Fast Multi-Turn Context Retrieval
- marstall 1y agoSWE-1 has been being booped up by WindSurf to me lately and I've been impressed - often (enough?) getting me the same answers as GPT5 etc., but almost instantly. Gotta say speed is nice.
- swyx 1y agonice, what does booped up mean? is this gen z lingo?
- marstall 1y agoha more like how i talk to my two year old. WindSurf's Cascade sidebar tool (which i use in RubyMine) has a stable of LLMs and it somewhat randomly switches the active one out from time to time. So I get a taste of what different ones are like, it's kind of cool.
- tifa2up 1y agoSearched for 'hi' and it took 166s to return a response using this model: https://pasteboard.co/oB4VqVC5FGkl.png https://pasteboard.co/oB4VqVC5FGkl.png Claude Code took 0.1s, Cursor CLI 19s
- mgambati 1y agoIf you ask a real question, then you might get real results.
- silasalberti 1y agohey I'm from the SWE-grep team - feel free to ask me any questions :)
- daralthus 1y agothis would be useful outside of coding. could you release a benchmark so we can have more models tuned for this?
- bluelightning2k 1y agoNo question just wanted to say good job and thanks as a user. Same with deepwiki and codemaps.
- kwillets 1y agoAre you actually using grep here? How much data are you searching?
- swyx 1y agono - grep is just the closest analogy/use case that we have for it. if we end up releasing the CLI it should be as handy and nobrainer as using ripgrep idk what you expect from a question about "how much data". its tool based search. its a lot.
- kwillets 1y agoI'm just learning about agentic search so I'm a bit adrift. One of my side projects is a full text index for pattern search, and I'm trying to understand how it might fit with that. You mention tool call overhead, but is that a significant part of the latency in the multi-turn scenario, or is it the coding agent being forced into a serial processing pattern?
- swyx 1y agohey sorryjust saw this. i do think its majority serial processing, BUT, parallel calling the same tools also gets issues that i honestly havent spent the time to dig into (something something locks and threading). all i know is ive been stuck in very very super slow/tool calls myself in Windsurf/other AI IDEs and that was a drag. for another take on latency attribution see https://x.com/silasalberti/status/1979310181424206143 https://x.com/silasalberti/status/1979310181424206143
- swyx 1y ago(coauthor) main charts/evals here https://x.com/cognition/status/1978867021669413252 https://x.com/cognition/status/1978867021669413252 you can try the https://playground.cognition.ai/ https://playground.cognition.ai/ here i wrote a longer explainer here https://x.com/swyx/status/1978874342743343254 https://x.com/swyx/status/1978874342743343254 but saving you the click this was a perspective cut from the blogpost, but let me explain why subagents kill long context Like you can spend $500m building 100 million context models, and they would be 1) slow, 2) expensive to use, 3) have huge context rot. O(n) is the lower bound. Cog's approach is something you learn in day 1 of CS50 - divide and parallelize. Embeddings are too dumb, Agentic Search is too slow. So train limited-agency (max 4 turns), natively parallel tool calling (avg parallelism of 7-8, custom toolset) fast (2800tok/s) subagents to give the performance of Agentic Search under an acceptable "Flow Window" that feels immaterially slower than Embeddings. The benefit of this is threefold: - 8 ^ 4 toolcalls cover a very large code search space. can compound subagent calls if more needed. - predictable cost & end to end latency - subagent outputs "clean" contexts, free of context failure modes like context poisoning and context rot we originally called this Rapid Agentic Search, to contrast with RAG. but Fast Context rolls off the tongue better. -- Second perspective -- The Fundamental Equation of Coding Agents is: Coding Agent Performance = Ability to Read the Right Files * Ability to Generate the Right Diffs Fast Context is Cognition's first solution for the Read. As codebases get larger and and tasks get more complex, Reads get more important. the average production codebase first query in Cascade is >60% just searching and reading files. But if this were just about speed, it might not be that exciting. I think there are unappreciated effects in performance as well when you have very good context. In other words: Context Engineering is Actually Very Important. Too important for humans and hardcoded rules. The swe-greps are the first dedicated context engineer agent models.
- vessenes 1y agoThanks for the summary. I noticed from the announcement you trained on parallel tool calling to save on serial round tripping. This is awesome. Most LLM coding is so slow that you're permanently out of flow state, and in 'manager' state right now - I'm interested in a future where you've got enough fast low TTFT support that an engineer could maintain flow state and have sort of super power type productivity at the same time, and this tool makes me think of that. That is, it looks fast enough to be used as a sort of sidebar info tool, as in "what you're coding might need / refer to these other parts of the codebase" -- effectively increasing an engineer's working memory. Super cool. And obviously useful for an AI engineer as well. Thanks for the writeup!
- ntntnt 1y agolol dead thread, cognition begging to grab some traction in this space.
- kburman 1y agoI thought https://playground.cognition.ai/ https://playground.cognition.ai/ was just returning some cached query results, but no, they’re actually spinning up real VMs and running live queries without any authentication or restrictions. That must be costing them a fortune.
- groby_b 1y agoCurrently, all queries are returning "We're under load and processing too many requests. Please try again later." So that's how that is going ;)
- awsanswers 1y agoLLM product managers: Show me what's in the context convenient to where I am prompting. Likely the user knowing and editing the precise context between requests will be a user task for a long time
- breadislove 1y agoguys please release the benchmark or the benchmark code. like this is just "trust me bro"
- swyx 1y agowell thats what the playground is for! playground.cognition.ai
- breadislove 1y agoyeah but if people would like to double check the results it would be nice to have the actual benchmark. especially given that your playground is broken... "We ran into an error processing your request. Please try again"
- seanobannon 1y agoThis link redirects to https://cognition.ai/blog/swe-grep https://cognition.ai/blog/swe-grep now?
- swyx 1y agogot a lot of traffic and was taken down temporarily for a couple reasons - team got it online again last night
- bluelightning2k 1y agoThis is really cool. Thank you for this. I'm a Windsurf user since launch and was VERY pleasantly surprised to see this pop up. I also enjoyed the tech write-up. It's good to see REAL substantial engineering like this which is both highly impressive and highly productized.
- bluelightning2k 1y agoActually I do have a question! How come things as substantial as this were just released and not part of a "wave" ? I quite liked the waves way of doing things! Great work either way.
- SafeDusk 1y agoKickstarting an exploratory open version here https://github.com/aperoc/op-grep https://github.com/aperoc/op-grep since it doesn't look like they will do it.
- unturned3 1y agoThis has very little resemblance of SWE-grep haha. At least fine-tune a small pre-trained LLM or something on a retrieval dataset. But no, this literally tries to train a small RNN from scratch to retrieve results given a natural language query...