Selecting the Daily Prompt for the LLM Prediction Game
Introduction: The Role of Daily Prompts in the Game
Welcome back! In the previous lesson, you learned how to generate and store prompt data for the LLM Prediction Game. Now, let’s see how to use that data to make the game dynamic and engaging for players.
A key part of the game is that each day, players see a new prompt. This keeps the game fresh and gives everyone the same challenge for that day. In this lesson, you’ll learn how to select the correct prompt for today using the data you’ve already created.
By the end of this lesson, you’ll understand how the game picks a prompt based on the current date, loads it from your JSON file, and handles any issues that might come up. You will use the datetime, json and pathlib libraries to achieve this. This is an important step in making your game feel like a real daily challenge!
Project File Structure Overview
Before we dive into selecting the daily prompt, let’s get familiar with the main files and folders in your project. Here’s a quick overview of what each file does:
This structure helps keep your code organized and makes it easy to find where different parts of the game are implemented. In this lesson we will work on the game.py file.
