Hi all,
(DISCLAIMER: this post may contain some rants about Python and other technologies I don’t like )
(DISCLAIMER2: as I’m working for a State, I cannot use AI models hosted in the cloud, so local solutions like Ollama are my only world)
For some weeks now, I started working on LLMs, RAG and agents. Mainly to build security-focused tools, such as a simple script/program which:
- Generates relevant web search queries with an original prompt sent to Ollama (also written in Golang )
- Sends these queries to the Brave API
- Scrapes the web pages
- Embeds the web pages’ content and stores them in Veaviate vector DB
- Retrieves the most relevant web pages to build a final prompt for Ollama to generate a response to the original prompt/question
For a weird reason, most AI and LLM tools are built in Python. I strongly suspect the AI community has a deep tendency for sadomasochism. Maybe I’m just too much an ol’timer more at ease with languages like C/C++ or Java.
So I started using Python based tools and libs, like Llamaindex, CrewAI, Qdrant, and other stuff from HuggingFace and GitHub. I waisted WEEKS to obtain a semi-working solution.
Then I tried Weaviate, and it changed my (rather short) life in AI:
- Written in Golang, no dependency issues (even when using venv’s). IT JUST WORKS.
- Finally could code in Golang, without weird syntax nor those messy tabulation/space-based code blocks, and no version issues (BraveSearch python module is a kind of Scrhroedinger Cat, depending on one lib version and/or/another incompatible one)
- IT TOOK ME HOURS to make a fully working tool, compared to WEEKS in Python and related techno’s
- Some hours I waisted on the Docker version before running Weaviate on bare-metal, I hate Docker almost as much as Python, this may be the topic of another article
- I always compile my Golang scripts: so no crash in a middle of a long run because of one of those pesty version, syntax or space/tabulation issues!
I’d like more AI/LLM technologies would move from Python to other techno like Golang, C/C++, Java, or even Rust.
As you may have guessed, I’m not a software engineer anymore (was for several decades), when I still write code, I just want it to WORK, quick’n dirty, as my goals and interests are focused elsewhere (cybersecurity), AND WEAVIATE JUST ALLOWED THIS.
My only criticism about Weaviate is: too many code examples in the docs are not available in Golang.
BTW, a rather famous AI project, GitHub - danielmiessler/fabric: fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere. , was rewritten from Python to Golang for the same reasons I explained.
Have a nice day!
JC