Compress GPT-4 Prompts

AI

prompt compression

SHOW HN2023

68points
44comments
#878of 3,109 in 2023
Top 29%of 2023 by points

How HN took it

RoastedHalf or more of the comments are critical

2 positive, 11 neutral or asking, 1 mixed, 16 critical, out of 30 comments about the project. Thread score -0.40.

Idea: 0 for, 6 againstPerformance: 1 for, 3 againstExecution: 1 for, 3 againstPricing: 0 for, 3 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Interesting idea, could help context windows or local models

    From 2 comments
    • This looks interesting if it works. A side benefit of prompt hacking like this appears when you transition from OpenAI to local, cost-static models, too. Losslessly minimizing…
      drusepth on HN
    • Tried twice and didn't get usable results. The first reduced the tokens by 80% and the results were better than I would've expected. The second try reduced the same prompt by…
      wfhBrian on HN

Objections

  • Compressed prompts often do not reduce tokens and can increase them

    From 3 comments
    • The original tweet author eventually realized this didn't decrease tokens. In most cases it actually increases them compared to just asking GPT to summarize while retaining all…
      ddod on HN
    • The gnarly thing is that common dictionary words are usually 1 or 2 tokens (a whole word, or a stem + a suffix), while things like emojis end up as _3_ tokens.…
      cheald on HN
    • I was hoping I could use this to reduce the cost of using the openai API. But since it sends both the custom prompt telling gpt4 to compress the intent and the full original…
      superkuh on HN
  • Compressed prompts lose meaning and do not work reliably

    From 3 comments
    • I gave it the prompt: > Explain the first law of robotics while speaking like a pirate, and in enough carefully considered detail that a seven year old child could understand The…
      mistercow on HN
    • This should just be deleted. I'm sorry, but it doesn't work reliably, hardly compresses the prompt, and is going to mislead people
      weird-eye-issue on HN
    • Yeah except this doesn't actually work reliably.
      weird-eye-issue on HN
  • Sending the full prompt to compress it means no net savings

    From 2 comments
    • It's kind of hilarious that you're trying to charge money for this. Given that compressing the prompt requires putting the full prompt into GPT-4, it's mathematically impossible…
      abitnegative on HN
    • I was hoping I could use this to reduce the cost of using the openai API. But since it sends both the custom prompt telling gpt4 to compress the intent and the full original…
      superkuh on HN

Requests

  • Remove the claim that results stay the same

    From 1 comment
    • > Reduce the number of tokens used in GPT-4 prompts by half and still get the same results! I would erase “and still get the same results” completely until you’re certain it can…
      ShamelessC on HN

Questions

Alternatives named

  • Asking GPT to summarize the prompt

    From 1 comment
    • So they are using the following GPT-4 prompt: -- compress the following text in a way that fits in a tweet (ideally) and such that you (GPT-4) can reconstruct the intention of…
      highfreq on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/35488291)