by inferense on 9/3/24, 10:04 PM with 16 comments
by jokethrowaway on 9/3/24, 11:00 PM
I do RAG for other types of structured data and this is fundamental to get relevant objects in your context.
My approach for code would be to create a graph structure with relationships between the different codepaths and expose a retrieval api through tools/function calling so that the LLM can query the codebase structure on top of doing semantic embedding similarity search and text similarity search.
You could also add a graph search for related elements for each element returned by the other search pipelines to increase the chance of having all the pieces of the puzzle in the context before using the LLM to solve the problem.
The other crucial thing to do would be to inspect dependencies (and their types, when possible) and maybe download documentation to offer tips that are accurate and not hallucinated.
Nowadays I get hallucinations for code generation as soon as things get hard, making LLM coding useful only for trivial code writing.
Analysing the code structure and dependencies would require plenty of work for each specific language, so it won't be a easy win like "just throwing RAG" - which is what the current players are doing to raise money - with mediocre results.
by davidt84 on 9/3/24, 10:45 PM
by airstrike on 9/3/24, 11:30 PM
I don't think others necessarily quote-unquote "lost focus" on this problem, but it's not exactly easy to solve correctly, so in the meantime it's easier to create something with the next best approximation.
by downWidOutaFite on 9/3/24, 11:15 PM
by dimgl on 9/3/24, 10:51 PM
by katdork on 9/3/24, 11:47 PM
by ratedgene on 9/3/24, 11:53 PM