Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Building code agents? Try code embedding models FAST and do it better
8 points by islogan 49 days ago | hide | past | favorite | 4 comments
We are a small group of undergrads interested in building human in the loop coding agents. We dream of a world where building complex agent workflows feels as simple and creative as playing with legos.

When we were building stuff we needed a tool that made it easy to try out different code embedding models so that we could see which ones worked best in different scenarios and understand their strengths and weaknesses.

So to speed that process up we made PurpleSearch an 'instant' search engine for your local codebases. This tool lets you quickly deploy any open source embedding model on hugging face into a real application that makes their capabilities visual and easy to digest. Check out the demo vid.

The flow: Pick any Java project. We'll turn it into a code graph, embed code snippets from the graph and index them. Then you can query the code snippet index. We'll return the 10 highest ranking snippets and the the subgraph that surrounds them for deeper contextual understanding (we call it a cluster). We feed these clusters into an LLM who uses them as context to answer your query.

Purple Search!

Demo video: https://www.youtube.com/watch?v=aglrXDLoOhQ

Github: https://github.com/logantucker25/PurpleSearch

note: This tool might be a little rough around the edges and occasionally get hung up. It hasnt been fully tested for use outside of our small group. We hope that it is useful to someone out there... if so feel free add to this code in any way that you like and make it into whatever suits you best. PRs welcome.




This is awesome. How does PurpleSearch handle overloaded methods or polymorphism in the graph?


Hi I'm a member of the team. Overloaded methods are handled by using the method signature (method name & parameter list) as the identifier for the node, so they are treated as distinct methods and embedded accordingly, each linked to the parent class.

More generally, polymorphism is handled by linking classes to their extending and implementing classes/interfaces in the graph. Thus, method overriding just corresponds to the superclass and subclass each having a method of the same name, embedded distinctly but traceable through the graph.

Does that answer the question? Happy to answer any followups


Good foundation, will definitely iterate on this.


Interesting




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: