KZ
My project implements Monte Carlo Tree Search - a general inference-time compute technique that has been shown to produce better-quality LLM responses, especially to challenging questions.
Core trick
Runs Monte Carlo tree search over branched LLM responses, scoring each branch with an LLM judge exposed as MCP tools.
Tags
Description
My project implements Monte Carlo Tree Search - a general inference-time compute technique that has been shown to produce better-quality LLM responses, especially to challenging questions. It can be used with any query. Inspired by the paper https://arxiv.org/pdf/2503.04412
README excerpt
# MCP Server for Running Monte Carlo Tree Search in Le Chat This repository implements an MCP server with tools used to allow Mistral's Le Chat run an inference-time compute technique called (Standard) Monte Carlo Tree Search (MCTS). <img width="354" height="185" alt="image" src="https://github.com/user-attachments/assets/9908d3df-9b45-4a53-911c-369b0a674543" /> Image from Sakana AI: https://arxiv.org/pdf/2503.04412 ## How it works To perform MCTS with width `w` and height `h`, Le Chat does the following: 1. Run another LLM (defined by the argument `model` in `main.py`) using the `original_response` function to generate a response. This is the root of the search tree. 2. Run the `branching` function `w` times to generate `w` new responses refined according to an LLM judge (LLM-as-a-Judge, same architecture). These are the new nodes of the search tree. 3. Run the `selection` function to select the best of these refined responses according to an LLM judge. This is the next non-leaf node in the search tree. 4. Repeat steps 2 to 4 `h - 1` times, i.e. until the tree has reached a height of `h`. ## Notes 1. This project is inspired by Sakana AI's paper: https://arxiv.org/pdf/2503.04412, where they implement what they call AB-MCTS and go over other inference-time compute techniques such as Standard Monte Carlo Tree Search. 2. All responses and reviews are generated by other LLMs (they can be selected as needed, i.e. can be from other model providers too). Le Chat itself acts as