Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

Just like you can get better are searching things with google or explaining things to a human, you will be able to get better at getting what you want out of chatgpt.

I don't see why you find that controversial.


It's not controversial, it's just clear this will in the not-too-distant future be relegated to the same sort of high school level introductory course that introduces a person to saving files on google drive. I worry that people are believing this will be a thriving space and a new frontier for tech talent, when really they exist to the extent current interfaces are failing. And current interfaces are improving at impressive speed.


We found that having pre-determined sections are indeed very useful.

One for context, one for rules, one for output format, one for input data, etc.

Also, you can as for a structured output (gpt spits out JSON fine) but you need to be super explicit about each field possible values and the conditions they appear in.

Templating prompts with jinja goes a long way for testing.

And you will need a lot of testing, if for nothing else than remove variability in answers.

It's funny because people keep saying gpt will removing all values from having writer skills, but being a good writer helps a lot with crafting good prompts.


I've been writing prompts with the intent of producing JSON that contains JS functions to evaluate. Since the response needs to be parsed and evaluated in a specific structure it means that changes need to be made on the evaluation side as well as the prompt template side.

So I've been writing the translation examples (few-shot examples [not my favorite term]) as TypeScript, transpiling to JS and compiling with other examples and a prelude, and using the same method to build the translation examples as to build future prompts. It saves a lot of silly mistakes!

JavaScript has less tokens than TypeScript, so it seems more economical to convert to JS beforehand instead of passing TS to the LLM! I wouldn't be surprised if TS resulted in better solutions, though... add it to the endless list of things to test out...


The problem with that approach is that is very hard to verify that the output is consistent. If you get pure json, you can check it against a schema, and regularly check that chatgpt is not outputting BS (which is does easily). With turing complete code, it's way harder.


The approach I've been using is that I test against a corpus of questions with known answers. Using sample-and-vote, that is asking for some number of variable completions with a non-zero temperature and treating the explicitly computed solutions as votes, has smoothed over issues with basic syntax and logic errors.

This is pretty similar to the approach used in the Toolformer paper, other than sample-and-vote, which I believe is novel.


In this context what does temperature mean?


Temperature is an option passed into the LLM. A temperature of 0 means the response is deterministic, that is that it always returns the same completion. A temperature of greater than zero results in increasing variation in the completion.


Indeed, like people stating something is a deferred or a future instead of promise, and then pointing out a minor difference in their approach that justifies a whole new taxonomy.


Exactly. All those talks are always going to tell you the same things:

- limit side effects to your program boundaries

- abstract boundaries with utility functions

- mock program boundaries for integration tests in those utility functions

And then they pretend they didn't see the mock part.


Alright, so you get numbers from a json file in a ftp servers, you use scipy.newton to perform root finding on it, but needs the number of steps to be outputted as well (which newton() doesn't return), and you will save the result in a postgres table.

All this should be send to a task queue, triggered by a call to your REST API.

Good luck with purity.


"Railway Oriented Programming"[1] is a (functional) technique to achieve purity despite steps that could result in error states. The error states are hidden/pushed to the very edges/end of your code. So you can focus on the "happy state" for the main business logic:

> Many examples in functional programming assume that you are always on the “happy path”. But to create a robust real world application you must deal with validation, logging, network and service errors, and other annoyances.

> So, how do you handle all this in a clean functional way?

> This talk will provide a brief introduction to this topic, using a fun and easy-to-understand railway analogy.

Functional programming keywords/shorthands: option/either/monads

[1]: https://fsharpforfunandprofit.com/rop/


> Good luck with purity.

Most of your counter example needs integration tests to test properly anyhow - not really a good point.

If you can give up encapsulation (which IMO isn't actually that useful in practice) and in return, your program becomes 95% functional, that seems like a really good tradeoff.


1. code that listens to a REST API and puts a request on a task queue

2. code that listens to the task queue for new jobs

3. code that fetches a file from the FTP server

4. code that converts the JSON file to a format appropriate for the root finding

5. code that performs the root finding

6. code that converts the result of (3) to a format appropriate for insertion into a table

7. code that inserts the result into a Postgres table

Steps 4, 5 and 6 seem easy enough to implement in a pure fashion.


Yeah, just reading their description I was like "the middle part seems easily done as its own thing".

"Functional Core, Imperative Shell" was just posted too, this is the perfect example of where that structure works: https://news.ycombinator.com/item?id=34860164


You’re describing a bad API to begin with. Those are too many steps to test at once too.


As a side note, if you want an efficient python REPL and you don't need custom commands like offered in the project above, you can do the following:

- install ipython and rich

- set PYTHONSTARTUP to auto load whatever you like on start up

- call rich.pretty.install() in your startup script for a boosted repr()

- set %autocall to 1 to benefit from optional parentheses

- use ! to call shell commands

This covers most people needs for a non-custom REPL.

Still no reload() though, but python really doesn't like that.


I was actually intending for it to be custom commands, since I think it would be hard to beat even the vanilla python repl if we are talking about writing python.

But I just couldn't find much about small projects that enable quick custom command repl building. Either the package is enormous and a swiss army knife or they cater to a specific language (e.g. SQL). I'd like this package to be a small building stone for custom command cli of any kind.


2.4 billions is not enough for such a project given the EU overhead in cost. Espacially since the deadline is 2027, so 2030 with delays really, that means 350 millions a year for paying satellite design, build them, send them to space.


Antidote is a great commercial product for that, it's the best I could find in a the market and professionnally the ROI is fantastic.

But if you don't want or can't pay for it, gpt3 is actually also a good proof reader!


That's zoomers in a nutshell.


Useful doesn't mean it should be done. There are a ton of useful things for me I don't do because it's not right to do them.

Apparently as soon as a company becomes big enough, the line between convenience and ethical becomes very blurry.


> Useful doesn't mean it should be done.

I never said anything about what should be done. I'm just saying it is useful, as the previous commenter said it's not.


When did I say it isn't useful? I said they didn't need it. They also don't need to install a kernel module that records every keystroke and memory access, but it would certainly be useful data.


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

Search: