Skip to content

docs: add multi-turn strategy option to Qiskit code validation example#717

Queued
vabarbosa wants to merge 1 commit intogenerative-computing:mainfrom
vabarbosa:docs/qiskit-ivr-multiturn
Queued

docs: add multi-turn strategy option to Qiskit code validation example#717
vabarbosa wants to merge 1 commit intogenerative-computing:mainfrom
vabarbosa:docs/qiskit-ivr-multiturn

Conversation

@vabarbosa
Copy link
Contributor

@vabarbosa vabarbosa commented Mar 23, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

Implements configurable strategy selection for the Qiskit code validation example, allowing users to choose between RepairTemplateStrategy and MultiTurnStrategy for the Instruct-Validate-Repair (IVR) pattern. Includes updates to the README accordingly.

Changes

  1. Code (docs/examples/instruct_validate_repair/qiskit_code_validation/qiskit_code_validation.py)

    • Added MultiTurnStrategy support alongside existing RepairTemplateStrategy
    • Implemented configurable strategy selection via use_multiturn_strategy flag
    • Added automatic context selection (ChatContext for MultiTurn, SimpleContext for RepairTemplate)
    • Updated function signature to accept strategy parameter
    • Updated docstring parameter documentation
  2. Documentation (README.md)
    Added "Sampling Strategies" section explaining both strategies
    Added "Strategy Performance Comparison" section
    Updated Future Work section

Related Issues

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Signed-off-by: va <va@us.ibm.com>
@vabarbosa vabarbosa requested a review from a team as a code owner March 23, 2026 04:31
@mergify
Copy link

mergify bot commented Mar 23, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@github-actions
Copy link
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Copy link
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

LGTM
@ajbozarth for final review

@ajbozarth
Copy link
Contributor

Looks good on first glance, I'll take a deeper look after my morning calls to make sure it works locally for me.

Copy link
Contributor

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

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

Actually given that I'm going to be working on top of this lets just merge this and if I find any bugs after rebasing my active work on top of it I'll include it in my upcoming PR.

@ajbozarth ajbozarth added this pull request to the merge queue Mar 23, 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.

Add MultiTurnStrategy support to Qiskit code validation example

3 participants