Google Gemini bad qdrant systemd advice

Sometimes I give AI a shot. This was one of the occasions where I did, and it ended up costing me more time that actually trying to solve the problem myself.

I had a request to run qdrant database, and I didn't want to do it under docker, due to all the extra nonsense that entails. So having installed it, basically just dropping a binary on the filesystem, I wanted to run it as a systemd service, under a specific user, qdrant.

On the qdrant site, they don't give an example, so I thought it would be quickest to ask Google Gemini, which quickly squirted out a reply. So I activated it and was confused when it wouldn't start. About an hour later, I figured out that the inline comments which Gemini had put in the systemd service files are not allowed. And when telling Gemini about this it cheerfully admitted that it knew about this all along:

Even though I 'shared' the finding, I'm skeptical that Gemini will learn from it, so here is the working qdrant systemd file for anyone interested.

[Unit]
Description=Qdrant Vector Database
After=network.target

[Service]
# sudo adduser --system --no-create-home --group qdrant
User=qdrant
Group=qdrant

ExecStart=/usr/bin/qdrant --config-path /etc/qdrant/config.yaml

# Put all data in here, please
WorkingDirectory=/qdrant

# Increase open file limit for better performance
LimitNOFILE=65536

Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

Leave a Comment