Skip to content

[Enhancement] Add Self Refinement Feature#105

Merged
vipul-mittal merged 9 commits intomainfrom
scratch/feat_self_refinement
Jan 20, 2026
Merged

[Enhancement] Add Self Refinement Feature#105
vipul-mittal merged 9 commits intomainfrom
scratch/feat_self_refinement

Conversation

@psriramsnc
Copy link
Collaborator

@psriramsnc psriramsnc commented Jan 14, 2026

🚀 SyGra now supports Self Refinement

Summary 🧾✨

This PR adds Self Refinement as a first-class SyGra feature 🔁🤖. This uses newly implemented sygra.recipes.self_refinement recipe as a subgraph inside a task 🧩. Generated datasets that include judge scores ✅📊 and a reflection trajectory 🪞🧠 for each prompt.

Feature implemented: 🚀

  • Added self_refinement under recipes.
  • Added examples.self_refinement under tasks which uses the above recipe as a sub graph
  • Added a new feature doc: docs/features/self_refinement.md describing the Self Refinement workflow 🔄, outputs

Performance impact (if any): ⚡

N/A

How to Test the feature 🧪

Steps for reviewers to verify functionality:

Run the example task and observe generated artifacts ▶️:
Run: python main.py --task examples.self_refinement --num_records 2 🏃‍♂️💻

Observe output JSON under tasks/examples/self_refinement/ (e.g., output_.json) 📦🕒
self_refine.generate_candidate and self_refine.judge_candidate are tracked 📈🧾

Screenshots (if applicable) 📸

N/A

Checklist ✅

  • Lint fixes and unit testing done
  • End to end task testing
  • Documentation updated

Notes 🗒️

N/A

@psriramsnc psriramsnc self-assigned this Jan 14, 2026
@psriramsnc psriramsnc added the enhancement New feature or request label Jan 14, 2026
@psriramsnc psriramsnc marked this pull request as ready for review January 14, 2026 08:39
@psriramsnc psriramsnc requested a review from a team as a code owner January 14, 2026 08:39
@vipul-mittal vipul-mittal enabled auto-merge (squash) January 20, 2026 16:53
@vipul-mittal vipul-mittal merged commit 427e8cf into main Jan 20, 2026
4 checks passed
@vipul-mittal vipul-mittal deleted the scratch/feat_self_refinement branch January 20, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants