Live data from Hacker News

Writing a GPT-4 script to check Wikipedia for the first unused acronym

gwern.net

51–60 of 118 posts

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#51

Earlier quoted context omitted.

Well now that OpenAI has increased the knowledge cutoff date to something much more recent, it's entirely possible that GPT4 is "aware" of itself in as much as its aware of anything. You are right in that each instance isn't aware directly of what the other instances are doing, it does probably now have knowledge of itself. Unless of course OpenAI completely scrubbed the input files of any mention of GPT4.

Yeah once ChatGPT shows up as an entity in the training data it will sort of inescapably start to build a self image.

Wait, this can actually have consequences! Think about all the SEO articles about ChatGPT hallucinating… At some point it will start to “think” that it should hallucinate and give nonsensical answers often, as it is ChatGPT.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#52
post #47

Earlier quoted context omitted.

I learned how expensive hashmaps and hashsets are through Wikipedia dumps. I did some analysis of the most linked-to pages. Countries were among the highest. Hash sets for holding outgoing edges in the link graph ended up causing my program to exceed my laptop’s memory. Plain old lists (Python) were fine, though. And given there aren’t a crazy number of links per page using lists is fine performance wise.

How'd the hashset exceed your laptop memory, if the whole dump is just 22GB? You should be able to fit the entire dataset in RAM.

That is a compressed dump you are looking at. The uncompressed data is much larger. Link graphs in general can grow quite big. Also, not every laptop has 32 GB RAM.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#53

I'll argue any civilized programmer should have a Wikipedia dump downloaded onto their machine. They're surprisingly small, and it saves you from having to use slow and unreliable APIs to do these types of basic processing tasks. They also let you do less basic processing tasks that would have been too expensive to expose over API.

Does the download dump include edit history?

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#54

I'll argue any civilized programmer should have a Wikipedia dump downloaded onto their machine. They're surprisingly small, and it saves you from having to use slow and unreliable APIs to do these types of basic processing tasks. They also let you do less basic processing tasks that would have been too expensive to expose over API.

Does the download dump include edit history?

Well there are full database dumps, but they're quite a bit too big to be of much practical use.

I'm usually working with the text-only OpenZim version, which cuts out most of the cruft.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#55
post #5

The question answered by this page is "what is the first unused 3-letter acronym in English Wikipedia?" - it's CQK for the record. However, the meat of the page is how to effectively use GPT-4 to write this script, hence why I've submitted it under this title (go to https://gwern.net/tla#effective-gpt-4-programming ). Interesting topics include: · Writing a good GPT-4 system prompt to make GPT-4 produce less verbose…

> Because of this, languages like Python are much better to use for GPT-4 coding as compared to more line-noise languages like Bash or Perl, for instance. By that argument, one should always make it use a language that's as hard as possible to write a compiling program. So Rust or Haskell or something? I guess at some point it's more important to have a lot of the language in the training data, too...

I think this is exactly the right conclusion.

The main complaint people have about strict, thorough type systems is that they have boilerplate.

Obviously boilerplate doesn't matter if a machine writes the code.

The type system also becomes helpful documentation of the intended behavior of the code that the LLM spits out.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#56

The question answered by this page is "what is the first unused 3-letter acronym in English Wikipedia?" - it's CQK for the record. However, the meat of the page is how to effectively use GPT-4 to write this script, hence why I've submitted it under this title (go to https://gwern.net/tla#effective-gpt-4-programming ). Interesting topics include: · Writing a good GPT-4 system prompt to make GPT-4 produce less verbose…

Where I grew up CQK was short for "Can't Quit the Koolaid."

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#57
post #20

I note that while E is more common than A if we're counting letters appearing anywhere in a word, A is substantially more common than E if we only count first letters of words: $ egrep -o . /usr/share/dict/words | tr a-z A-Z | sort | uniq -c | sort -rn 235415 E 201093 I 199606 A 170740 O 161024 R 158783 N 152868 T 139578 S 130507 L 103460 C 87390 U 78180 P 70725 M 68217 D 64377 H 51683 Y 47109 G 40450 B 24174 F 20181…

A bit off-topic, but this used to be (one of) my favorite unix admin interview questions.

Given a file in linux, tell me the unique values of column 2, sorted by number of occurencies with the count.

If the candidate knew 'sort | uniq -c | sort -rn' it was a medium-strong hire signal.

For candidates that didn't know that line of arguments, I'd allow them to solve it anyway they wanted, but they couldn't skip it. The candidates who copied the data in excel, usually didn't make it far.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#58
post #47

Earlier quoted context omitted.

I learned how expensive hashmaps and hashsets are through Wikipedia dumps. I did some analysis of the most linked-to pages. Countries were among the highest. Hash sets for holding outgoing edges in the link graph ended up causing my program to exceed my laptop’s memory. Plain old lists (Python) were fine, though. And given there aren’t a crazy number of links per page using lists is fine performance wise.

How'd the hashset exceed your laptop memory, if the whole dump is just 22GB? You should be able to fit the entire dataset in RAM.

I'm still sticking with 16GB on my laptop so that would exceed my current RAM. That may also cut close for a 32GB machine anyway, since the OS and other programs may not let you access all your physical RAM.

Re: Writing a GPT-4 script to check Wikipedia for the first unused acronym

#59

Earlier quoted context omitted.

> Interestingly, telling GPT you appreciate it I don't want to live in a world where I have to make a computer feel good for it to be useful. Is this really what people thought AI should be like?

AFAIK this is not something the model was intentionally trained for but an emerging property that was observed through trial and error.

That does not make it better, that makes it quite a bit more horrifying.
Post reply on HN