Inspiration

The inspiration behind SplitPrompt came from my frustration with ChatGPT losing track of the overall goal when dealing with long prompts. I wanted to create a solution that would help keep the context intact, ensuring the AI stays focused throughout the conversation. This led me to experiment with recursive prompt splitting to break down long inputs without losing the main point.

What it does

SplitPrompt takes a large, complex prompt and breaks it down into smaller chunks. After each chunk, ChatGPT restates the overall goal, keeping the context clear and preventing important information from being lost due to the context window limit. This allows users to get better results with longer prompts while keeping the AI on track.

How I built it

I took extra care with the UI, aiming for noticeable improvements over simple alternatives. I didn't want just a basic prompt splitter, so I included actual token counting rather than simply splitting based on string length, ensuring more precise chunking. I built the tool using vanilla JavaScript, which allowed me to keep things lightweight and easy to host. One of my goals was to make sure it could run for free on GitHub Pages, which I successfully achieved.

Challenges I ran into

One of the biggest challenges was making sure the prompt was split properly while also keeping the AI focused on the main goal. Balancing the logic between token counting, restating the goal, and managing recursive chunks was more complex than I initially thought, but it was worth the effort to get it right.

Accomplishments that I'm proud of

I'm really proud of building a tool that not only works effectively but also has a clean, user-friendly interface. Incorporating actual token counting was a big win, as it ensures more accurate splitting. Hosting it on GitHub Pages for free is another accomplishment I’m happy about—it’s great knowing this tool is accessible and doesn’t require expensive infrastructure.

What I learned

Throughout this project, I learned a lot about the intricacies of handling tokens in language models, as well as the importance of designing thoughtful, functional user interfaces. I also sharpened my skills in vanilla JavaScript and building lightweight web apps that are easy to deploy.

What's next for SplitPrompt - ChatGPT Prompt Splitter

Moving forward, I want future improvements to be driven by feedback from actual users. I’m planning to add more customization options based on what users need, like tweaking how often the goal is restated or offering different splitting strategies. I’m also interested in expanding to other AI platforms and possibly adding features like saving or sharing split prompts for specific use cases. There’s a lot of potential, and I’m excited to see where it goes with the help of the community!

Share this project:

Updates