[{"data":1,"prerenderedAt":322},["ShallowReactive",2],{"project-35488291":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":45,"post_text":47,"what":48,"said":74,"maker_in_thread":148,"shape":160,"grid":164,"attempts":285,"same_week":286,"maker_shows":32,"maker_hidden":314,"reader_version":315,"card":316},"35488291","Compress GPT-4 Prompts","Hey HN!","post","Show HN: Compress GPT-4 Prompts","https:\u002F\u002Fwww.promptreducer.com\u002F","promptreducer.com","jeanmayer",1680908983,2023,68,44,878,3109,29,"notable","ai","prompt compression","web_app",[24,25,26,27],"gpt-4 prompt compression","token reduction","prompt optimization","openai cost","roasted",-0.404,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,11,1,16,30,{"idea":37,"performance":40,"execution":42,"docs":43,"pricing":44},{"positive":38,"critical":39},0,6,{"positive":33,"critical":41},3,{"positive":33,"critical":41},{"positive":38,"critical":33},{"positive":38,"critical":41},[33,38,38,41,41,38,33,41,33,33,38,33,41,41,33,33,33,33,41,38,38,46,33,33,38,33,41,33,33,38,46,33,38,38,38,41,41,38,33,41],5,"Hey HN!\n\nI recently built Prompt Reducer, an app that makes it easier to compress GPT-4 prompts. The main goal is to reduce the number of tokens in each prompt, thereby reducing the cost of running GPT-4. I figured since @gfodor tweeted about compressing GPT-4. It’s still early, and it does not work perfectly, but I’d love to hear any feedback or suggestions for how to make it faster or more efficient.",{"problem":49,"audience":54,"pricing":55,"motivation":67,"time_to_build":54,"stack":71,"openness":72,"stage":73,"team_size":72},{"value":50,"source":51,"evidence":52},"Long GPT-4 prompts are expensive in tokens","maker",[53],{"id":7},null,{"value":56,"source":57,"evidence":58},"Free tier with $0 price noted by commenters","commenter",[59,63],{"id":60,"by":61,"text":62},"35489716","thejarren","It actually is a comedy bit, the page has a $0 free tier.",{"id":64,"by":65,"text":66},"35489739","herval","Doesn't look like they're trying to charge money for it? The pricing page explicitly states the product is free and they're open to work on projects\u002Fcontracts.",{"value":68,"source":51,"evidence":69},"Reduce the cost of running GPT-4 prompts",[70],{"id":7},[],"unknown","beta",{"praise":75,"objections":87,"requests":125,"questions":133,"alternatives":140},[76],{"value":77,"source":57,"evidence":78},"Interesting idea, could help context windows or local models",[79,83],{"id":80,"by":81,"text":82},"35488760","drusepth","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…",{"id":84,"by":85,"text":86},"35488746","wfhBrian","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…",[88,103,117],{"value":89,"source":57,"evidence":90},"Compressed prompts often do not reduce tokens and can increase them",[91,95,99],{"id":92,"by":93,"text":94},"35488861","ddod","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…",{"id":96,"by":97,"text":98},"35490028","cheald","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.…",{"id":100,"by":101,"text":102},"35488820","superkuh","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…",{"value":104,"source":57,"evidence":105},"Compressed prompts lose meaning and do not work reliably",[106,110,114],{"id":107,"by":108,"text":109},"35489201","mistercow","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…",{"id":111,"by":112,"text":113},"35489583","weird-eye-issue","This should just be deleted. I'm sorry, but it doesn't work reliably, hardly compresses the prompt, and is going to mislead people",{"id":115,"by":112,"text":116},"35489574","Yeah except this doesn't actually work reliably.",{"value":118,"source":57,"evidence":119},"Sending the full prompt to compress it means no net savings",[120,124],{"id":121,"by":122,"text":123},"35489702","abitnegative","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…",{"id":100,"by":101,"text":102},[126],{"value":127,"source":57,"evidence":128},"Remove the claim that results stay the same",[129],{"id":130,"by":131,"text":132},"35488931","ShamelessC","> 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…",[134],{"value":135,"source":57,"evidence":136},"Does this reduce token count?",[137],{"id":138,"by":139,"text":135},"35491040","quickthrower2",[141],{"value":142,"source":57,"evidence":143},"Asking GPT to summarize the prompt",[144],{"id":145,"by":146,"text":147},"35488892","highfreq","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…",{"comments":149,"answered":31,"key":150},4,[151,154,157],{"id":152,"text":153},"35489271","Well, that makes sense! Otherwise, it does reduce tokens if the result does not contain emojis",{"id":155,"text":156},"35489300","I love this episode, the art of communication",{"id":158,"text":159},"35489209","Yes, you are right. Just removed the “and still get the same results” part. Thanks for pointing out (:",{"commenters":161,"max_depth":41,"maker_replies":149,"first_comment_mins":162,"lifespan_hours":163},36,45,72,[165,167,171,174,178,181,184,185,188,190,193,195,197,198,201,204,207,209,211,214,216,219,220,222,227,231,234,236,239,242,243,246,250,253,256,258,260,261,264,269,273,275,278,283],[145,38,33,166,146,38],"project\u002Fcritical\u002Fidea",[168,38,38,169,170,38],"35489147","other\u002Fneutral\u002Fnone","staunton",[172,38,38,169,173,38],"35491540","MacsHeadroom",[175,38,41,176,177,38],"35489842","project\u002Fneutral\u002Fidea","sdenton4",[179,38,41,176,180,38],"35490428","dragonwriter",[182,38,38,169,183,38],"35518548","wingated",[107,33,33,166,108,38],[186,33,41,176,187,38],"35489782","tehlike",[189,33,33,166,108,38],"35489851",[191,33,41,176,192,38],"35490747","qiller",[92,31,33,194,93,38],"project\u002Fcritical\u002Fperformance",[152,31,38,196,11,33],"project\u002Fneutral\u002Fperformance",[96,31,33,194,97,38],[199,31,41,176,200,38],"35490363","lgats",[202,31,41,196,203,38],"35492640","blatant303",[205,41,33,194,206,38],"35489133","JimmyRuska",[208,41,33,166,97,38],"35490057",[111,149,33,210,112,38],"project\u002Fcritical\u002Fexecution",[212,149,33,166,213,38],"35492465","seba_dos1",[84,46,41,215,85,38],"project\u002Fmixed\u002Fexecution",[217,39,38,169,218,38],"35489031","petethepig",[155,39,38,169,11,33],[221,39,38,169,177,38],"35489860",[223,224,46,225,226,38],"35489965",7,"project\u002Fpositive\u002Fexecution","teaearlgraycold",[228,229,33,210,230,38],"35489208",8,"bm-rf",[130,232,33,233,131,38],9,"project\u002Fcritical\u002Fdocs",[158,232,38,235,11,33],"maker\u002Fneutral\u002Fdocs",[100,237,33,238,101,38],10,"project\u002Fcritical\u002Fpricing",[240,237,41,196,241,38],"35489008","babyshake",[115,237,33,210,112,38],[244,32,33,166,245,38],"35488989","sciolist",[247,32,38,248,249,38],"35489914","commenter\u002Fneutral\u002Fidea","lgas",[251,32,38,252,245,38],"35496933","commenter\u002Fneutral\u002Fnone",[80,254,46,255,81,38],12,"project\u002Fpositive\u002Fperformance",[121,257,33,238,122,38],13,[60,257,38,259,61,38],"commenter\u002Fneutral\u002Fpricing",[64,257,38,259,65,38],[262,257,38,259,263,38],"35491331","flangola7",[265,266,41,267,268,38],"35489918",14,"maker\u002Fneutral\u002Fidea","Imnimo",[270,271,41,176,272,38],"35488735",15,"KRAKRISMOTT",[274,271,38,176,11,33],"35489242",[276,34,33,238,277,38],"35489752","m3kw9",[279,280,41,281,282,38],"35489653",17,"project\u002Fneutral\u002Fnone","felipelalli",[138,284,41,196,139,38],18,[],[287,291,296,301,306,310],{"id":288,"name":289,"points":290,"category":20},"35543668","Phind",1401,{"id":292,"name":293,"points":294,"category":295},"35470915","Tabby",627,"dev_tools",{"id":297,"name":298,"points":299,"category":300},"35471129","BrainPlsWork",329,"productivity",{"id":302,"name":303,"points":304,"category":305},"35524328","OpenOwl",220,"infrastructure",{"id":307,"name":308,"points":309,"category":295},"35483933","ChatGDB",189,{"id":311,"name":312,"points":313,"category":295},"35548778","twitter-api-client",183,false,"v2",{"id":317,"name":5,"line":6,"ai":314,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":318,"top":18,"kw":319,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":320,"url":9,"mix":321,"praise":77,"objection":89,"sub":21},35488291,-0.4,[24,25,26,27],"1003301311013311113005110131105100033013",[31,32,33,34],1794036633758]