fix: improve distillation detail preservation for code-specific artifacts#378
Merged
Conversation
…acts Add CODE & TECHNICAL ARTIFACTS section to distillation prompt with explicit guidance and examples for preserving: - File paths, function/class names, variable names - Algorithm choices with rejection reasons - Configuration values, thresholds, TTLs - Migration/schema names, model enumerations - CLI commands, flags, error codes, HTTP status mappings - Directory contents, test results, environment variables MSR-1 first question: 2.51 → 4.60 (from distillation detail preservation alone)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds explicit guidance to the distillation observer prompt for preserving code-specific artifacts that were being systematically dropped during distillation.
Problem
The distillation observer was dropping specific technical details even though the prompt said 'preserve details'. The 'DETAILS TO ALWAYS PRESERVE' section was oriented toward personal-assistant use cases (names, prices, locations), not code artifacts.
Fix
Added 'CODE & TECHNICAL ARTIFACTS' section to the distillation prompt with explicit list of artifact types and BAD/GOOD examples.
Results (preliminary)
Mixed — the prompt helps in some cases (MSR-1 Q1: 2.51→4.60) but isn't consistent across runs due to LLM non-determinism. Worker calls don't use temperature=0, causing significant variance.
Root cause of inconsistency: distillation/curation worker calls use default temperature (1.0). Adding temperature=0 to the LLMClient interface is needed for reliable improvement.
Files Changed
packages/core/src/prompt.ts— distillation prompt CODE & TECHNICAL ARTIFACTS section.gitignore— exclude recorded eval fixtures