Show HN: Create LLM-optimized random identifiers(github.com) I went exploring whether using LLM tokens as the individual "digits" of random ids would let you get more randomness for the same number of tokens, and the answer is yes. Using the current strategy in this library is about ~50% more token efficient than using base64 ids. I also ran hundreds of sessions against the OpenAI API to see if the logprobs would look off using this strategy, compared to base64 ids, and it seems like it's about the same or possibly slightly better (more "peaky"). Could be useful for agentic frameworks where tool results need to provide ids to refer back to later. A small win at best, but it was fun to explore! |