Llm Tuning Patterns

by parcadeid07ff4b06b62No license3.9K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 8 months ago

LLM Tuning Patterns

Instructions onlyAI & Agents
AI-generated overview

Reference patterns for configuring LLM parameters such as max_tokens, temperature and top_p by task type.

What it does
This skill provides evidence-based guidance for setting LLM generation parameters according to the task at hand. It gives parameter tables for theorem proving and formal reasoning, code generation, and creative or exploration tasks, each with stated rationales. It also lists anti-patterns and a proof-plan prompt template for chain-of-thought before tactics.
When to use it
Use it when choosing max_tokens, temperature or top_p values for an LLM task, especially theorem proving, code generation or creative work. It is also useful for reviewing common misconfigurations such as too few tokens or too low temperature for proofs.
Requirements
No tools, packages or credentials are required; it is instructions only and ships no scripts.

LLM Tuning Patterns

Evidence-based patterns for configuring LLM parameters, based on APOLLO and Godel-Prover research.

Pattern

Different tasks require different LLM configurations. Use these evidence-based settings.

Theorem Proving / Formal Reasoning

Based on APOLLO parity analysis:

ParameterValueRationale
max_tokens4096Proofs need space for chain-of-thought
temperature0.6Higher creativity for tactic exploration
top_p0.95Allow diverse proof paths

Proof Plan Prompt

Always request a proof plan before tactics:

Given the theorem to prove:[theorem statement]
First, write a high-level proof plan explaining your approach.Then, suggest Lean 4 tactics to implement each step.

The proof plan (chain-of-thought) significantly improves tactic quality.

Parallel Sampling

For hard proofs, use parallel sampling:

  • Generate N=8-32 candidate proof attempts
  • Use best-of-N selection
  • Each sample at temperature 0.6-0.8

Code Generation

ParameterValueRationale
max_tokens2048Sufficient for most functions
temperature0.2-0.4Prefer deterministic output

Creative / Exploration Tasks

ParameterValueRationale
max_tokens4096Space for exploration
temperature0.8-1.0Maximum creativity

Anti-Patterns

  • Too low tokens for proofs: 512 tokens truncates chain-of-thought
  • Too low temperature for proofs: 0.2 misses creative tactic paths
  • No proof plan: Jumping to tactics without planning reduces success rate

Source Sessions

  • This session: APOLLO parity - increased max_tokens 512->4096, temp 0.2->0.6
  • This session: Added proof plan prompt for chain-of-thought before tactics

Source and attribution

Source:parcadei/continuous-claude-v3in.claude/skills/llm-tuning-patternsat commitd07ff4b

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

Llm Tuning Patterns Agent Skill | SourceWeft