Hacker News new | ask | show | jobs
by calderknight 767 days ago
What model were you using? What prompt did you use?

You can learn to trust it for some tasks that it's reliably good at.

But for the most part, you don't trust it - you read through it and check it.

1 comments

ChatGPT.

Translate the following Python program to Lisp.

Yes, I forgot to add "... and no crap." ;)

ChatGPT is just the brand. I guess you're using GPT-4, but if you're using the default model (GPT-3.5) that would certainly explain below-expectation results.
> ChatGPT is just the brand.

"ChatGPT" is a model, says its provider.

But yes, the web page says model GPT-3.5.

Mystery solved! The answer to your OP is that the reason anyone can trust ChatGPT for code is that they use a much better model than the one you're using! GPT-3.5 is ancient and way behind GPT-4. In fact, there are now tens of organisations who have developed model classes way ahead of GPT-3.5.
> the reason anyone can trust ChatGPT for code is that they use a much better model than the one you're using! GPT-3.5 is ancient and way behind GPT-4.

Testing that theory now using Bing Copilot GPT-4.

Failed.

unmatched close parenthesis Line: 11, Column: 11, File-Position: 408

Input is:

  Translate this to Common Lisp.

  def solve(graph):
    a = 0
    while a < len(graph):
      for b in range(len(graph)):
        if b > a and graph[a].intersection(graph[b]):
          graph[b] = graph[a] | graph[b]
          graph.pop(a);a-=1
          break
      a+=1
    return graph

  a = [{1, 2}, {4, 5}, {1, 3}, {1, 4}]

  print((solve( a )))
Output is:

  (defun solve (graph)
    (let ((a 0))
      (loop while (< a (length graph)) do
        (loop for b from 0 below (length graph) do
    (when (and (> b a) (intersection (nth a graph) (nth b graph)))
      (setf (nth b graph) (union (nth a graph) (nth b graph)))
      (setf graph (remove-if (lambda (x) (equal x (nth a graph))) graph))
      (decf a)
      (return))))
        (incf a))
      graph))

  (let ((a (list (list 1 2) (list 4 5) (list 1 3) (list 1 4))))
    (format t "~a~%" (solve a)))
Yeah, if going that route the answer to the OP is "most people aren't using it for Lisp".