News for hackers. Stuff that matters.
Re:Searching a Codebase in English by Zambyte on Thursday August 15, 2024 @07:59PM (#41261780)
The page is unreadable on Firefox Focus
Re:Searching a Codebase in English by jesse__ on Monday August 19, 2024 @06:56PM (#41295261)
Also unreadable on Android/Chrome. The whole left side of the page is cropped off
Re:Searching a Codebase in English by bavent on Monday August 19, 2024 @06:58PM (#41295279)
Also unreadable on Firefox on iOS.
Re:Searching a Codebase in English by tonyoconnell on Monday August 19, 2024 @09:38PM (#41296040)
Works well in Arc and Chrome in OSX. Arc is a lovely browser BTW.
Re:Searching a Codebase in English by tanvibhakta on Monday August 19, 2024 @10:20PM (#41296186)
Unreadable on Firefox on Android also. I think maybe this site just wasn't tested on a small screen - ie where most people get there reading done.
Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @11:10PM (#41296399)
Sorry, fixed
Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @11:10PM (#41296406)
Pushed a fix, thanks
Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @11:10PM (#41296403)
Just fixed, sorry
Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @11:10PM (#41296401)
Sorry, just fixed
Re:Searching a Codebase in English by Zambyte on Tuesday August 20, 2024 @10:19AM (#41300314)
Cool, works now. Thanks!
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
Re:Searching a Codebase in English by deisteve on Monday August 19, 2024 @09:56PM (#41296102)
is there a free version of greptile
Re:Searching a Codebase in English by dakshgupta on Monday August 19, 2024 @10:46PM (#41296294)
Free for small open source repos + 300 large open source repos.

Code MISTRAL100 at checkout for a free month of Pro.

Re:Searching a Codebase in English by elashri on Tuesday August 20, 2024 @12:02AM (#41296639)
So does this mean that you can it for all your small open source repos or do you need to apply for each one? The only mention of free offering is in pricing page where you fill a form with a repo link to apply for the free offering.

Edit: found the information in docs here [2]

[2] https://docs.greptile.com/pricing

Re:Searching a Codebase in English by dakshgupta on Tuesday August 20, 2024 @12:23AM (#41296786)
That form is if you want to install the code review bot or other GitHub integrations for free on your repo .

If you want to chat with your repo for free you can do that on the website, assuming it’s a small public repo.

Re:Searching a Codebase in English by oshams on Monday August 19, 2024 @11:58PM (#41296612)
Interesting direction. We also have a codebase chat (example here https://wiki.mutable.ai/ollama/ollama) that HN might find appealing. It uses a wiki as a living artifact owned by your team to power the chat, gives us increased context length and reasoning capabilities. We didn't really like the results we got with embeddings. Have been pretty thrilled with the results on Q&A, search, and even codegen (more on that soon).
Re:Searching a Codebase in English by byearthithatius on Tuesday August 20, 2024 @02:22PM (#41302548)
I think I found a mistake. In the article you write: "We then compare that against our database of vectors and find the one(s) that match the closest, i.e., have the lowest dot product and highest similarity."

We want to maximize the normalized dot product (or cosine similarity) to find semantically similar text chunks.

Re:Searching a Codebase in English by byearthithatius on Tuesday August 20, 2024 @02:22PM (#41302555)
So this would be the highest dot product. Finding the lowest(closest to zero) would mean the two vectors are closer to orthogonal and thus very _not_ similar in direction (semantic meaning). If negative they are semantically opposite.
Re:Searching a Codebase in English by dakshgupta on Tuesday August 20, 2024 @08:01PM (#41305353)
Good catch! This is a mistake, fixing now.