Ruben Hassid Profile picture
Mar 24 12 tweets 5 min read Read on X
OpenAI shared the most complete library of guides to prompt chatgpt.

47 links of videos & academic papers.

I read them all, and made a top 10.

#1 → prompt engineering Image
Starting with the basics:
→ prompting techniques

All the techniques you need to know:
> zero-shot
> few-shot
> self-consistency sampling
> chain of thoughts (CoT)
> tree of thoughts (ToT)

First, what is the Chain of Thought? Image
#2 → chain of thoughts

It's a prompting technique that forces the LLM to think before giving a good answer.

Start by creating:
→ a step-by-step reasoning process.

Breaking down a problem into bite-size steps is easier for humans... & LLMs.

#3 → tree of thoughts: Image
What is the Tree of Thoughts?

It helps you brainstorm with the LLM.
> it creates a tree-like structure of ideas.
> each idea is a step to solve a problem.

You're the one selecting the right path:
→ the LLM simply provides options.

Now for the most famous video: Image
#4 → Andrej Kharpathy shared this famous Youtube video a year ago about:

> how to build GPT form scratch
> reading & exploring the data
> tokenizations

Here's the link:


And a month ago, he did a new one explaining how to build a tokenizer:
Image
#5 → the tokenizer is a necessary component of an LLMs.

It's like a puzzle maker. It takes a big piece of language & breaks it down into smaller puzzle pieces (token).

I'm fascinated by Andrej Kharpathy teaching us everything for free:
Image
#6 → jailbreak LLMs

1. Find a rule chatgpt needs to follow:
→ never use the word "computer"

But if you ask the right questions:
chatgpt say the forbidden "computer".

Just like "DAN" became famous, it's a reminder any LLM can be jailbreak.

For another prompting technique: Image
#7 → multi-agent debate

You create multiple agents & make them discuss with each other.

→ LLMs debate their answers over a few rounds to arrive at a common answer.

It helps for:
> mathematics.
> reasoning processes
> reducing hallucinations

#8 → reAct + CoT:
The benchmark said combining ReAct & CoT is the best way to prompt LLMs.

ReAct is a fact-driven method:
> ask the LLM to reason & act.

CoT sometimes makes up information that isn't true.

The best approach for answering questions is to combine their strengths. Image
#9 → prompt perfect

OpenAI shared a (paid) tool that helps you rewrite a perfect prompt for you.

All you need to do is:
> write your prompt
> send it
> click on "optimize"

And the chatbot craft a new prompt for you that you can edit & send again.
#10 → Open AI evals
Evals are designed to evaluate LLMs.

It's crucial for anyone working with LLMs.

It helps you understand how updates in model versions can impact your project.

Here's where to find it: github(dot)com/openai/evals

Last thing before you scroll away: Image
I run daily tests on LLMs like chatgpt, gemini & claude everyday to master them.

Check my profile @rubenhssd for more.

If you'd like to support me, a like or a simple RT goes a long way :)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ruben Hassid

Ruben Hassid Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @RubenHssd

Mar 26
chatgpt loves stupid words & I am sick of seeing them all over the web.

I wrote a piece of prompt to avoid this "dive", "realm", "unveiling" madness.

↓ And it worked pretty nicely: Image
#1 → I asked chatgpt to write an article about quantum computing.

It's a difficult subject.

But chatgpt always uses the same jargon → unveiling, dive, realm, etc.

As soon as I see them, I'm like:
= written by (a bad) chatgpt (prompt).

→ So I made a list of "ban words":
So I edited the first prompt by adding:
> my style
> gaslighting chatgpt
> a long list of banned words

And I finally have it:
→ a piece of prompt to add anywhere.

Once added, chatgpt no longer uses fancy jargon and bs wordings.

I run another test to safeproof it:
Read 6 tweets
Mar 14
chatgpt does not know how to prompt itself - and that's a bit of a pain.

So I'm feeding it the "26 prompt principles" to make a prompt generator.

↓ It worked pretty nicely: Image
#1. I asked ChatGPT to analyze each of those 26 principles.

And I got:
> explanations of each of the principles
> how-to guide for those 26 principles

I wanted to make sure it got it all.

Then, I asked ChatGPT to upgrade one of my prompt:
#2. The prompt I want to upgrade is:

"Create a prompt for a solopreneur who wants to draft a business plan for his Saas, a LinkedIn post generator"

And I got:
> a prompt using the 26 principles
> assigning a task to ChatGPT
> step-by-step reasoning

I didn't stop here:
Read 6 tweets
Mar 12
CoT (Chain of Thought) is the best way to prompt — according to academic papers.

But I want to run a test to be sure:
→ simple vs. CoT prompt on ChatGPT

I made this quick benchmark below: Image
First, what is Chain of Thought?

It's a prompt technique that forces the LLM to think before giving a good answer.

Start by creating:
→ a step-by-step reasoning process.

Breaking down a problem into bite-size steps is easier for humans... & LLMs.

So step 1: Image
I asked ChatGPT to read a 16-page PDF.

The PDF is about how to prompt LLMs.

On the left, my prompt is:
→ explain the PDF.

On the right, I used a CoT prompt:
→ a step-by-step reasoning process.

And that's what I got:
Read 7 tweets
Mar 10
Gemini 1.5 pretends to have a one million tokens limit (even up to 10 million tokens).

But Google lies.

I made the following tests to prove it:

test #1 read Inception to write Inception 2Image
Inception 1 is one of my favorite movies.

The whole script is about 50k tokens.

Gemini claims that before 512k tokens, everything should be fine.

Spoiler alert: it's not.

Let's start the test by uploading the PDF. Image
182 pages of dialogue + blend of actions.

Now if...
> the whole script is 50k tokens
> and I prompt gemini for 20-50 tokens
> we get a whole new 50k tokens' script

That was my hypothesis.

Once the PDF is uploaded, let's move on.

#1. my 1st prompt to Gemini was... Image
Read 11 tweets
Mar 4
BREAKING: claude 3 is live since 1h.

They claim to be better than gpt-4.

So I ran my own little test:

test #1 → copy the UI of a website
As you can see, same old problems.

Their AI ethics are through the roof.

It's sometimes impossible to cover the simplest task. OG chatgpt does not care though.

Now, test #2 → write a Linkedin post
The post is on the future of blockchain + royalties.

Claude 3:
> interesting takes.
> longer than usual.
> no formatting of headlines.

GPT-4:
> I hate their emojis, really.
> so much longer, it's insane.
> feels more complete for my topic.

test #3 → test their PDF vision
Read 6 tweets
Feb 14
ChatGPT now remembers you.

OpenAI released "Memory" 15h ago.
What is it exactly?
The more you chat, the smarter it gets.

You want ChatGPT to remember that you like short sentences.

He'll remember.

Next time you do a LinkedIn post, he'll know.
You can turn off memory at any time.

Go to:
→ Settings
→ Personalization
→ Memory
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(