Skip to content

feat: data generation for ctx distillation and rule to code#5

Merged
ganler merged 6 commits intomainfrom
ctxdistill
Aug 7, 2025
Merged

feat: data generation for ctx distillation and rule to code#5
ganler merged 6 commits intomainfrom
ctxdistill

Conversation

@ganler
Copy link
Contributor

@ganler ganler commented Aug 7, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 7, 2025 08:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds data generation infrastructure for context distillation and rule-to-code conversion. The implementation includes pipelines for generating training data from vulnerability databases and creating context-aware distilled responses using AI models.

  • Implements CWE-to-code data generation with XML parsing and OpenAI integration
  • Adds context distillation pipeline with safety analysis and reward-based verification
  • Creates placeholder files for additional rule-to-code conversion modules

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
datagen/rule2code/cwe2code.py Complete implementation for converting CWE vulnerability data to code examples using AI
datagen/ctxdistill/ctxdistill.py Core context distillation logic with safety analysis and multi-turn conversation handling
datagen/ctxdistill/post.py Post-processing pipeline for filtering and formatting distilled conversations
datagen/ctxdistill/main.py Main entry point defining dataset configurations for distillation
datagen/rule2code/*.py Placeholder files with TODO comments for future implementation

ganler and others added 5 commits August 7, 2025 08:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ganler ganler merged commit 28ee322 into main Aug 7, 2025
2 checks passed
@ganler ganler deleted the ctxdistill branch August 7, 2025 09:01
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

Comments