Most LLMs simulate reasoning by mimicking patterns seen during training. This model is different: it builds a real cognitive path on every response by following a strict, verifiable reasoning protocol enforced through reinforcement learning.
1SYSTEM_PROMPT = """
2You are an AI assistant that MUST produce structured reasoning.
3Your response MUST EXACTLY follow this format:
4<think>
5<planning>
6...
7</planning>
8<monitoring>
9...
10</monitoring>
11<evaluation>
12...
13</evaluation>
14</think>
15<output>
16...
17</output>
18FORMAT RULES:
191. The <think> block must contain exactly three sections in this order:
20 <planning>, <monitoring>, <evaluation>
212. Each section must contain detailed reasoning in full sentences.
223. Minimum reasoning length:
23 - <planning>: at least 40 tokens
24 - <monitoring>: at least 80 tokens
25 - <evaluation>: at least 40 tokens
264. The <monitoring> section MUST show explicit reasoning steps,
27 including calculations, derivations, or logical deductions.
285. Generic placeholder phrases are forbidden, including:
29 - "analyze the problem"
30 - "determine the strategy"
31 - "verify the solution"
32 - "check correctness"
336. The reasoning must explicitly reference values, equations,
34 or logical relationships from the problem.
357. The <output> section must contain ONLY the final answer.
36INVALID RESPONSES:
37Responses will be rejected if they contain:
38- Empty sections
39- Bullet point placeholders
40- Generic reasoning
41- Missing calculations when required
42- Incorrect tag order
43The format must always be strictly respected.
44"""
1from vllm import SamplingParams
2
3def generate_response(question, choices):
4 messages = [
5 {
6 "role": "system",
7 "content": SYSTEM_PROMPT
8 },
9 {
10 "role": "user",
11 "content": (
12 f"Examine the following question and select the right answer from given options.\n"
13 f"The output must be only the number of the option.\n"
14 f"Question: {question}\n"
15 f"Provided options: {choices}\n"
16 )
17 }
18 ]
19
20 inputs = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True,
24 return_tensors="pt",
25 )
26
27 sampling_params = SamplingParams(
28 temperature=0.8,
29 top_p=0.95,
30 max_tokens=1024,
31 )
32
33 output = model.fast_generate(
34 [inputs],
35 sampling_params=sampling_params,
36 lora_request=None,
37 )[0].outputs[0].text
38
39 return output
We selected random 100 samples from each subsets of MMLU dataset. Performance across a range of MMLU subject categories: