Play the 20 Questions Sport In opposition to an LLM | by Alejandra Vlerick | Dec, 2024

And study LLM structure methods, parsed output, take a look at design and efficiency measurement of your system

Photograph by Carl Uncooked on Unsplash

The 20 Questions Sport is a basic guessing recreation for 2 gamers. One participant thinks of an object, particular person, or place, and the opposite participant takes turns asking yes-or-no questions to determine what it’s. The purpose is to guess accurately inside 20 questions. If nobody guesses by the twentieth query, the thinker reveals the reply, and the spherical ends. The actual recreation might be discovered right here, I encourage you to play pondering of one thing simple like a automobile or an apple.

Construct one of the best LLM agent potential to be the guesser on this recreation.

  1. Construct the agent utilizing LangGraph
  2. Check the agent utilizing Pytest and create your individual agent evals

A few issues have been clear to me from the start of beginning this venture. I needed the guesser agent to obtain a really clear record of all of the earlier questions requested and reply after which be prompted to give you the subsequent query to ask.