Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Learnings from codeQA – A chat-with-codebase application using top-K RAG (sankalp1999.notion.site)
5 points by dejavucoder on June 14, 2024 | hide | past | favorite | 1 comment


Blog post noting down my learnings and references used to make my side project - codeQA.

codeQA is a question-answering system for codebases that uses semantic code search with embeddings. It indexes codebases by chunking them into methods and classes using abstract syntax trees (AST), generating LLM-based comments for the chunks, and embedding them. The system then uses techniques like hypothetical document embeddings (HyDE), BM25 keyword search, and cross-encoder based reranking to improve the retrieval of relevant code snippets in response to natural language queries about the codebase.

I use tree-sitter (Part 1) for extracting the abstract syntax tree and building the codebase index. Elaborate discussion on cross-encoder vs bi-encoder

I use LanceDB for vectorDB, cohere rank v3 for re-ranking and various LLMs to generate LLM comments, summary and chat.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: