$npx -y skills add parcadei/Continuous-Claude-v3 --skill llm-tuning-patternsLLM Tuning Patterns
| 1 | # LLM Tuning Patterns |
| 2 | |
| 3 | Evidence-based patterns for configuring LLM parameters, based on APOLLO and Godel-Prover research. |
| 4 | |
| 5 | ## Pattern |
| 6 | |
| 7 | Different tasks require different LLM configurations. Use these evidence-based settings. |
| 8 | |
| 9 | ## Theorem Proving / Formal Reasoning |
| 10 | |
| 11 | Based on APOLLO parity analysis: |
| 12 | |
| 13 | | Parameter | Value | Rationale | |
| 14 | |-----------|-------|-----------| |
| 15 | | max_tokens | 4096 | Proofs need space for chain-of-thought | |
| 16 | | temperature | 0.6 | Higher creativity for tactic exploration | |
| 17 | | top_p | 0.95 | Allow diverse proof paths | |
| 18 | |
| 19 | ### Proof Plan Prompt |
| 20 | |
| 21 | Always request a proof plan before tactics: |
| 22 | |
| 23 | ``` |
| 24 | Given the theorem to prove: |
| 25 | [theorem statement] |
| 26 | |
| 27 | First, write a high-level proof plan explaining your approach. |
| 28 | Then, suggest Lean 4 tactics to implement each step. |
| 29 | ``` |
| 30 | |
| 31 | The proof plan (chain-of-thought) significantly improves tactic quality. |
| 32 | |
| 33 | ### Parallel Sampling |
| 34 | |
| 35 | For hard proofs, use parallel sampling: |
| 36 | - Generate N=8-32 candidate proof attempts |
| 37 | - Use best-of-N selection |
| 38 | - Each sample at temperature 0.6-0.8 |
| 39 | |
| 40 | ## Code Generation |
| 41 | |
| 42 | | Parameter | Value | Rationale | |
| 43 | |-----------|-------|-----------| |
| 44 | | max_tokens | 2048 | Sufficient for most functions | |
| 45 | | temperature | 0.2-0.4 | Prefer deterministic output | |
| 46 | |
| 47 | ## Creative / Exploration Tasks |
| 48 | |
| 49 | | Parameter | Value | Rationale | |
| 50 | |-----------|-------|-----------| |
| 51 | | max_tokens | 4096 | Space for exploration | |
| 52 | | temperature | 0.8-1.0 | Maximum creativity | |
| 53 | |
| 54 | ## Anti-Patterns |
| 55 | |
| 56 | - **Too low tokens for proofs**: 512 tokens truncates chain-of-thought |
| 57 | - **Too low temperature for proofs**: 0.2 misses creative tactic paths |
| 58 | - **No proof plan**: Jumping to tactics without planning reduces success rate |
| 59 | |
| 60 | ## Source Sessions |
| 61 | |
| 62 | - This session: APOLLO parity - increased max_tokens 512->4096, temp 0.2->0.6 |
| 63 | - This session: Added proof plan prompt for chain-of-thought before tactics |