How is your prompt engineering?

Who called in the fleet? :p

1._Battlecruiser_Default.webp
 
Are you getting useful things out of LLMs (AI chatbots)?

Yes, but it's not that easy.

I use GPT-5, with a paid subscription (20 EUR/month, not so expensive). I did a small benchmark of some LLM (GPT, Grok, Yiaho, Gemini, and Mistral). Same prompt for all; GPT is the best for me. This is a bit biased because I have been using GPT for some time, so it is more "trained" to better match what I expect, this is the memory system : you can manage the content and the form of answers. AI is just a tool, you have to learn how to use it to get the best results. As a tool, AI doesn't think for you, doesn't make decisions for you; it's just another tool, an assistant. In my toolbox today I have: experimentation, analytical calculation, abacuses, finite element calculation, CAD software and one more ChatGPT.

I use GTP-5 daily for electrical and mechanical engineering, 3 uses:

- As a super web search engine, GPT-5 has real ability for searching and compiling data, unlike regular engines that just output SEO web sites.

- As general view tools for roughing out projects, to do and redo repetitive and off-putting calculations and validity estimates.

- To help me solve a very specific, well-defined problem, validation of the logic and calculations.
 
i use ollama ...

llama list | grep -i code
starcoder:1b 77e6c46054d9 726 MB 3 weeks ago
starcoder2:15b 21ae152d49e0 9.1 GB 3 weeks ago
codegemma:7b 0c96700aaada 5.0 GB 3 weeks ago
codegeex4:9b 867b8e81d038 5.5 GB 3 weeks ago
starcoder2:3b 9f4ae0aff61e 1.7 GB 3 weeks ago
starcoder:3b 847e5a7aa26f 1.8 GB 3 weeks ago
codegemma:2b 926331004170 1.6 GB 3 weeks ago
dolphincoder:7b 677555f1f316 4.2 GB 3 weeks ago
codellama:13b 9f438cb9cd58 7.4 GB 3 weeks ago
yi-coder:1.5b 186c460ee707 866 MB 3 weeks ago
qwen2.5-coder:3b f72c60cabf62 1.9 GB 3 weeks ago
codeqwen:7b df352abf55b1 4.2 GB 3 weeks ago
starcoder:7b 53fdbc3a2006 4.3 GB 3 weeks ago
starcoder2:7b 1550ab21b10d 4.0 GB 3 weeks ago
qwen2.5-coder:1.5b d7372fd82851 986 MB 3 weeks ago
deepseek-coder:6.7b ce298d984115 3.8 GB 3 weeks ago
sqlcoder:15b 93bb0e8a904f 9.0 GB 3 weeks ago
dolphincoder:15b 1102380927c2 9.1 GB 3 weeks ago
codellama:7b 8fdf8f752f6e 3.8 GB 3 weeks ago
deepseek-coder:1.3b 3ddd2d3fc8d2 776 MB 3 weeks ago
qwen2.5-coder:0.5b 4ff64a7f502a 397 MB 3 weeks ago
sqlcoder:7b 77ac14348387 4.1 GB 3 weeks ago
 
Interesting thought. If you do vibe coding anyway, why not in C?

Advantages:
- compiles without requiring the user to install special compiler versions
- compiles fast
- some compile-time checking
- in an emergency can be read by many programmers
- LLM output will be verbose anyway, so C doesn't do much more damage

Disadvantage:
- could have more compile-time checking
- memory checking at runtime only, and not much of it

 
Note , i have :
ollama list | grep qwen
codeqwen:7b df352abf55b1 4.2 GB 3 months ago
qwen3:4b e55aed6fe643 2.5 GB 3 months ago
qwen2.5-coder:3b f72c60cabf62 1.9 GB 3 months ago
qwen2.5-coder:1.5b d7372fd82851 986 MB 3 months ago
qwen2.5-coder:0.5b 4ff64a7f502a 397 MB 3 months ago
 
AI is developing at breakneck speeds. Az you all know.
But for an almost complete noob re: native FreeBSD jails, I got Gemini 3 to create a pretty nifty ephemeral jail script for me, an entire script, after a bit of back and forth, last week. That got me up and going, you know?
But, in general, it feels like AI is tasked with dumbing you down, which is what it does unless it knows it can't, in which case it will try to anyway but with less alacrity.
 
ollama run qwen2.5-coder:3b
>>> give me a program for fibonacci numbers in sbcl
Sure! Below is an example of a simple Fibonacci number generator in Common Lisp (SBCL) using the functional programming style:
Code:
```lisp
(defun fib (n)
  "Return the n-th Fibonacci number."
  (labels ((fib-iter (a b count)
           (if (= count 0)
               a
               (fib-iter b (+ a b) (- count 1)))))
    (fib-iter 0 1 n)))
;; Example usage:
(format t "~d~%" (fib 10)) ; Output: 55
```

This function uses the `labels` macro to define an inner recursive function `fib-iter`. The `fib-iter` function takes three arguments: the current Fibonacci
number (`a`), the next Fibonacci number (`b`), and the count of iterations remaining (`count`). It recursively calculates the n-th Fibonacci number by updating
`a` and `b` and decrementing `count`.

To use this program, you can save it in a file with an `.lisp` extension, for example, `fibonacci.lisp`, compile it using `sbcl --load fibonacci.lisp`, and then
run it. The example usage at the end of the script will print the 10th Fibonacci number, which is 55.
 
It can produce the unit tests but does not print the output of it.
>>>> fibbonaci program in sbcl output of unit tests

Certainly! Below is an example of a simple Fibonacci number generator in Common Lisp (SBCL) with unit tests using the `check` library. This will help you verify
the correctness of the function.

First, ensure you have the `check` library installed. You can install it by adding the following line to your `.sbclrc` file:
Code:
```lisp
(ql:quickload :check)
```

Now, here is the complete code including unit tests:

```lisp
;; fibonacci.lisp

;; Load the check library
(ql:quickload :check)

(defpackage :fibonacci-tests (:use :common-lisp :check))

(in-package :fibonacci-tests)

;; Function to calculate the n-th Fibonacci number
(defun fib (n)
  "Return the n-th Fibonacci number."
  (labels ((fib-iter (a b count)
           (if (= count 0)
               a
               (fib-iter b (+ a b) (- count 1)))))
    (fib-iter 0 1 n)))

;; Test cases for the fib function
(defun test-fib ()
  "Run tests to verify the correctness of the fib function."
  (is (equalp (fib 0) 0))
  (is (equalp (fib 1) 1))
  (is (equalp (fib 2) 1))
  (is (equalp (fib 3) 2))
  (is (equalp (fib 4) 3))
  (is (equalp (fib 5) 5))
  (is (equalp (fib 6) 8))
  (is (equalp (fib 7) 13)))

;; Run the tests
(run-tests :fibonacci-tests)
```

To run these unit tests, you can save this code in a file called `fibonacci.lisp`, and then execute the following command in SBCL:


```lisp
(load "fibonacci.lisp")
(test-fibonacci-tests)
```

This will output whether each test passed or failed. The expected results are included in the comments within the `test-fib` function.

This setup helps ensure that your Fibonacci function is working correctly and can handle a variety of inputs.
 
It shows one thing I dislike about LLM code so far - no edge cases.

Neither the function code nor the unit tests deal with out-of-range input values such as -1.
 
Back
Top