The closest thing to context retrieval is text-to-SQL. You take a plain English question and turn it into a precise query against stored data. We’ve mostly solved that, because with SQL you know the schema. You know what’s stored and how it’s shaped. Code context has no schema. Nobody has agreed on what the underlying data should even be. So every tool invents its own answer to one question: what do we store? Today there are only three. – Store nothing. Keep the raw files and search them at query time with grep and find, the way Claude Code does. Fine on a toy repo. But one cross service question makes the agent read a dozen files and burn 40,000 to 90,000 tokens, and a real cross repo question burns up to 160,000. It’s slow and it breaks at scale. – Store vectors. Chop every file into 800 to 1,000 token chunks and embed each one. When a question comes in, embed that too, compare it against every chunk, and pull back whatever sits closest. Then hope the nearest match is the right one. That’s similarity, not understanding. – Store keywords. Chop the files into chunks again, title each one, load the titles into a graph database, and match the words in your question against the words in the titles. Faster, but it only finds code that happens to be named like your question. All three store a piece of the code itself: its text, its vectors, or its labels. None of them store what the code means. So they handle the structural questions, like “what calls validateCard()”, and go blind on the ones that matter, like “which code handles payment” or “what breaks across these 50 repos if I change this”. Those are questions about intent, and intent was never stored. submitted by /u/graphicaldot
Originally posted by u/graphicaldot on r/ArtificialInteligence
