nowfound

AI · September 11, 2023

AS

A surprisingly effective way to predict token importance in LLM prompts

We explored a novel method to gauge the significance of tokens in prompts given to large language models, without needing direct model access. Essentially, we just did an ablation study on the prompt using cosine similarity of the embeddings as the measure. We got surprisingly promising results when comparing this really simple approach to integrated gradients. Curious to hear thoughts from the community!

A surprisingly effective way to predict token importance in LLM prompts launched on September 11, 2023 with 14 votes, #1,445 of 4,228 launches that month and more than 75% of that year's launches.

In plain words

This project presents a method for identifying which tokens matter most in prompts sent to large language models, without requiring access to the model itself. It uses ablation testing combined with embedding cosine similarity to measure token importance, and compares favorably against integrated gradients, a more complex alternative approach. The tool is designed for researchers and developers working with LLMs who need to understand prompt behavior and optimize input effectiveness.

written from the facts on this page · September 2026

Does a similar job

all alternatives →
  • Fully client-side GPT2 prediction visualizer2023 · perplexity.vercel.app · ▲153

    Hi HN! I've found this visualization tool immensely helpful over the years for getting an intuition for how an LLM "sees" some piece of text, and with a bit of elbow grease decided to move all compute to client side so I could make it publicly available. I've found it particularly useful for - Understanding exactly how repetition and patterns affect a small LM's ability to predict correctly - Understanding different tokenization patterns and how it affects model output - Getting a general sense of how "hard" different prediction tasks are for GPT-style models Known problems (that I probably…

  • PrompTessor2025 · promptessor.com · ▲125

    After countless hours of solo coding, designing, and iterating, I’m both excited and nervous to share my first-ever product: PrompTessor — now live. As someone who constantly experiments with AI tools like ChatGPT and Midjourney, I often found myself stuck in a loop of trial-and-error. The issue wasn’t always the AI — it was often the prompt itself. That observation became the starting point for PrompTessor. This tool doesn’t just optimize your prompt — it analyzes it. It gives you: - A prompt score - A breakdown of strengths and weaknesses - A fully optimized version of your prompt - And…

  • Wordllama – Things you can do with the token embeddings of an LLM2024 · github.com · ▲370

    After working with LLMs for long enough, I found myself wanting a lightweight utility for doing various small tasks to prepare inputs, locate information and create evaluators. This library is two things: a very simple model and utilities that inference it (eg. fuzzy deduplication). The target platform is CPU, and it’s intended to be light, fast and pip installable — a library that lowers the barrier to working with strings semantically. You don’t need to install pytorch to use it, or any deep learning runtimes. How can this be accomplished? The model is simply token embeddings that are…

  • Open Prompts – dataset of 10M Stable Diffusion generations2022 · github.com · ▲279

    Open Prompts is the dataset used to build krea.ai. The data comes from the Stability AI Discord and includes around 10M images from 2M prompts. You can use it for creating semantic search engines of prompts, training LLMs, fine-tuning image-to-text models like BLIP, or extracting insights from the data—like the most common combinations of modifiers.

  • Fine-grained stylistic control of LLMs using model arithmetic2023 · github.com · ▲85

    We developed a new framework that enables flexible control of generated text in language models. By combining several models and/or system prompts in one mathematical formula, it lets you tweak your style and combine model outputs with ease. A handy tool for those working with LLMs, looking for more fine-grained control of stylistic output. More details in our paper: https://arxiv.org/abs/2311.14479. Feedback and potential applications are welcome.

  • Tokensift, an open-sourced token-efficiency linter for LLM promptsAug 2026 · github.com · ▲6

    Token-efficiency linter for LLM prompts and payloads - ritenv/tokensift

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 18d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 18d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 19d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 21d ago · stillwet.art

  • A real-time world model you can explore and change

    AI · 29d ago · world.pixverse.video

  • Beam.win▲377

    Run AI agents on one Mac and use its windows on another

    AI · 4d ago · beam.win

Source: Show HN post ↗

Launched alongside, September 2023

the whole month →
  • Loops▲1,556

    Measure whether a campaign drove the desired outcome

    Dev tools · 2023 · loops.so

  • Tally 2.0▲1,479

    The simplest way to create forms for free

    Dev tools · 2023 · tally.so

  • Klu AI▲1,462

    Your data, unified and interactive

    AI · 2023 · klu.so

  • FirstHR▲1,063

    All-in-one HR platform for founders with dreams and teams

    Work · 2023 · firsthr.app

  • DevHunt▲945

    Open source Product Hunt for dev tools

    Dev tools · 2023 · devhunt.org

  • GenAI app to create personalized content

    AI · 2023 · yarnit.app