Inspiration

We were moved by how artists are struggling in the new age of chat-gpt and image models like dall-e, so we wanted to help them instead make better art by empowering them to get the most out of llms.

What it does

We decided to hone on one specific use case which is the film industry and generating ideas for new films. We've built a HyperCycle server that can be called upon to take a film producer's initial query such as "I want a movie idea that is like....." and then refine with a genetic algorithm to get the most optimal idea from an llm that is guaranteed to achieve high scores!

How we built it

We built the server using the pyhypercycle package to run a genetic algorithm. The algorithm first generates an initial generation 0 comprised of permutations of the user's query and then passes it to a fitness function. Our fitness function calls our local llm running in docker to return an answer to our generated prompts. We then compare the resulting movie idea such as "title:....., this and that happens against our vector database. We used a lightweight local vectorizer model (also on docker) to vectorize the imdb dataset, which means that we can perform a cosine similarity vector search with our llm output and get a set of similar movies. From there we can get the average imdb scores of the vector database results to predict what score the movie idea our llm has generated. From there, we run a roulette wheel selection and then a single-point cross-over, and then a simple random mutation stage. Then we repeat the cycle for the intended number of generations to maximize the predicted movie score and return a string that the user can add onto their query to optimize their llm query.

Challenges we ran into

Learning everything on the spot and lack of time

Accomplishments that we're proud of

We got a working prototype and integrated it into Hypercycle! We've built a base that we intend to build into a full open source project and expand our use cases.

What we learned

Genetic Algorithms LLMs Team Management

What's next for mendel_prompts.py

Continue work and open source :) !

Built With

Share this project:

Updates