Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 2.04 KB

README.md

File metadata and controls

37 lines (23 loc) · 2.04 KB

1-Click Crossword

1-clickcrossword

The 1-Click Crossword is an open-source Next.js project that allows you to create a custom crossword puzzle with just one click. It utilizes OpenAI's GPT-3 language model to find words and clues related to specific topics. The project experiments with an AI-agent concept inspired by BabyAGI that uses a prompt template to identify the best words for a crossword game and their corresponding clues.

https://1-clickcrossword.promptsea.io/

Getting Started

In the application, we have three example puzzles that you can try out either by following the link above or by cloning the repository and running it on your own machine, anyway, if you want to generate a new puzzle, you will need to obtain an API key from OpenAI.

npm install
npm run dev

When the website is ready and the API key has been added, you can define the topic for the crossword puzzle to be generated by clicking on the 'Execute' button to prompt OpenAI's API to find the best words and clues related to the given topic.

The game grid is generated during gameplay, and ChatGPT assists in finding words and clues. Although we attempted to generate the grid using GPT-3 and GPT-4, it appears to be unfeasible.

Prompt Template

It all works through two templates.

(Word finder prompt) You're an AI agent and can only answer in a single string JSON array generate {totalWords} words of {types} in {topic} that no longer than 10 characters and choose a one word that easy to place the first on the crossword grid and put on the first item

After the response is received, the word list will be parsed and entered into the second template to generate the corresponding clues.

(Clue finder prompt) You're an AI agent and can only answer in a single string JSON array and from the list {words} return the clue for crossword game for all items, the string must be in this format "this is a clue"

License

This project is licensed under the MIT License