Instruction Following Game is an engaging and educational project designed to help users improve their prompt engineering skills and gain a deeper understanding of Large Language Models (LLMs). By challenging players to craft precise prompts that elicit specific responses from an LLM, this game offers a fun and interactive way to explore the nuances of AI communication.
- Web-based interface using Gradio
- Multiple challenging questions to test prompt engineering skills
- Real-time interaction with a powerful LLM (Qwen1.5-72B-Chat)
- User authentication and progress tracking
- Leaderboard to showcase top performers
- Detailed feedback on each submission
- User Authentication: Players start by entering a unique User ID.
- Question Selection: Choose from a variety of predefined questions.
- Prompt Crafting: Create a prompt that will make the LLM respond in a specific way.
- AI Interaction: The prompt is sent to the LLM, which generates a response.
- Evaluation: The system checks if the AI's response meets the question's criteria.
- Feedback: Players receive immediate feedback on their performance.
- Progress Tracking: Completed questions and attempt history are saved.
- Leaderboard: A real-time leaderboard shows top performers.
- Backend: Python
- Frontend: Gradio (for the web interface)
- Database: MongoDB (for user data and leaderboard)
- LLM API: Together.ai (using the Qwen1.5-72B-Chat model)
- Additional Libraries: requests, pymongo, logging
-
Clone the repository:
git clone https://github.com/yourusername/instruction-following-game.git cd instruction-following-game
-
Install required packages:
pip install gradio pymongo requests
-
Set up MongoDB:
- Create a MongoDB Atlas account or use a local MongoDB instance
- Update the MongoDB connection string in
main.py
-
Set up Together.ai API:
- Create an account at Together.ai
- Replace the API key in
main.py
with your own key
-
Run the application:
python main.py
- Open the provided URL in your web browser.
- Enter a User ID to log in.
- Select a question from the dropdown menu.
- Craft your prompt in the input box.
- Click "Submit" to send your prompt to the AI.
- Review the AI's response and the feedback.
- Keep trying until you successfully complete the challenge!
- Shoutout to the Gradio team for their excellent web UI framework.
- Special thanks to all the prompt engineers and AI enthusiasts who inspire projects like this!
Happy prompting, and may the best engineer win! 🏆🎉