- 15 attestor combinations (cycling through same patterns)
- 1 step name (always "build")
- 1 question format
- 1 command pattern
- No Rego policies
Result: Model sees same patterns repeatedly → Loss plateaus at 0.50
Current: 15 combinations Enhanced: 31 combinations (all possible from 5 safe attestors)
Safe attestors (no mocking needed):
- git, environment, material, product, file
All combinations:
- 5 singles
- 10 pairs
- 10 triples
- 5 quads
- 1 all-five
Current: Always "build" Enhanced: 10 step names
build, test, package, deploy, scan,
compile, lint, security-check, analyze, verify
Current: 1 template Enhanced: 7 templates
Examples:
- "How do I create..."
- "What's the setup for..."
- "Show me a working example..."
- "Walk me through..."
- etc.
Current: 1 pattern Enhanced: 5 patterns
echo "Success" > output.txt
cat input.txt > output.txt
cp input.txt output.txt && echo "Done" >> output.txt
...Current: None Enhanced: 4 policy types
Git policies:
- Branch enforcement
- Clean working directory
Environment policies:
- CI environment check
Product policies:
- Required output files
31 combinations × 10 steps × 7 questions × 5 commands = 10,850 variations
Plus Rego policy variations = 20,000+ unique examples possible
python3 scripts/generate_enhanced_verified.py --target 20000Features:
- Random sampling from all dimensions
- Some examples with Rego, some without
- Different step names
- Varied question phrasings
- Different command patterns
mlx_lm.lora \
--model mlx-community/Llama-3.2-3B-Instruct-4bit \
--train \
--data data/verified-enhanced \
--num-layers 32 \
--batch-size 8 \
--iters 1000 \
--learning-rate 2e-5 \
--adapter-path ./witness-expert-diverseExpected loss: 0.25-0.30 (vs current 0.50)
More diverse patterns prevent model from memorizing specific examples.
Model learns the CONCEPT of witness, not specific commands.
Different step names, questions teach robustness.
Adds another dimension of complexity and real-world usage.
More variation = more for model to learn from each batch.
Create lightweight mocks for:
- GitHub: Mock GitHub API responses
- GitLab: Mock GitLab CI environment variables
- AWS: Mock EC2 metadata service
- Docker: Mock docker daemon socket
This would add:
- github, gitlab, jenkins (CI/CD)
- aws-iid, gcp-iit (cloud identity)
- docker, oci (containers)
- +15 more attestor types
Potential: 100+ attestor combinations, 50K+ examples
As you mentioned, use actual go-witness struct definitions:
# Read from attestation/*.go files
def parse_attestor_schema(attestor_name):
"""Extract struct definition from go-witness source"""
go_file = f"/Users/nkennedy/proj/go-witness/attestation/{attestor_name}/{attestor_name}.go"
# Parse Go structs
# Generate conformant JSON
# Ensures 100% compatibility- Let current training finish (~15-20 mins)
- Generate enhanced 20K dataset (~1 hour)
- Retrain with improved hyperparameters (~1 hour)
- Compare loss: Should see 0.25-0.30 vs current 0.50
Want me to start generating the enhanced 20K dataset now (in parallel with current training)?