News for hackers. Stuff that matters.
Re:Searching a Codebase in English by tonyoconnell on Monday August 19, 2024 @09:54PM (#41296098)
Summary "Semantic search on codebases works better if you first translate the code to natural language, before generating embedding vectors. It also works better if you chunk more “tightly” - on a per-function level rather than a per-file level. This is because noise negatively impacts retrieval quality in a huge way."

This makes a lot of sense. You should also embed information about how the code is related to other functions/code and where it is located in the codebase. One approach is to add really wonderful comments to the code so that when humans and machines read it they are brought on a step by step journey of how the code fulfills a goal. I tell the LLM to explain step by step to junior developers and and to inspire seniour engineers with glimpse of the profound beauty of the code and its architecture.

Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @10:47PM (#41296300)
We use tree-sitter right now and experimenting with call graphs currently. Will write about the results when we have data on that.
Re:Searching a Codebase in English by tonyoconnell on Tuesday August 20, 2024 @03:46AM (#41297792)
I've been using tree-sitter also. Looking forward to reading about your results with call graphs