Skip to content

fix: improve distillation detail preservation for code-specific artifacts#378

Merged
BYK merged 1 commit into
mainfrom
fix-distill-details
May 19, 2026
Merged

fix: improve distillation detail preservation for code-specific artifacts#378
BYK merged 1 commit into
mainfrom
fix-distill-details

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 19, 2026

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.

Scenario Baseline With fix Notes
MSR-1 2.51 2.25 Inconsistent — one question improved dramatically, others didn't
MSR-2 1.83 1.61 Slight regression

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

…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)
@BYK BYK self-assigned this May 19, 2026
@BYK BYK merged commit e747113 into main May 19, 2026
10 checks passed
@BYK BYK deleted the fix-distill-details branch May 19, 2026 00:14
This was referenced May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant