Skip to content

sony/a_mpqc

Repository files navigation

A-MPQC

ICML 2026 Python 3.10+

Official implementation of Agentic Model Predictive Questioning Control (A-MPQC), from the paper Agentic Model Predictive Questioning Control in Visual Design by Kuang-Da Wang, Zhao Wang, Wei-Yao Wang, Yotaro Shimose, Jaechang Kim, and Shingo Takamatsu.

This repo provides a minimal, runnable banner artifact accompanying the paper. It reproduces the banner branch: multi-turn clarification under a fixed question budget, shared initial-plan caching, plan updating, GPT-Image-1 generation, and GPT-4.1 similarity judging.

Quick Start

Reference environment: Python 3.10 on Ubuntu 22.04.

git clone https://github.com/sony/a_mpqc
cd A-MPQC

conda env create -f environment.yml
conda activate a-mpqc

cp config/config_llm.ini.example config/config_llm.ini
# edit config/config_llm.ini and set Azure OpenAI + Gemini API keys
Installation notes

Prerequisites

  • Conda (or Mamba) for environment management
  • Python 3.10 (see environment.yml)
  • Network access to Azure OpenAI and Google Gemini APIs

API keys required in config/config_llm.ini

Service Used for
Azure OpenAI (GPT-4.1) Judge evaluation
Azure OpenAI (GPT-Image-1) Banner image generation
Google Gemini API Question agent, user simulator, plan generator/updater, satisfaction check

Setup steps

  1. Create the conda environment: conda env create -f environment.yml && conda activate a-mpqc
  2. Copy the config template: cp config/config_llm.ini.example config/config_llm.ini
  3. Fill in all keys under [KEYS] in config/config_llm.ini
  4. Place dataset folders at repo root: banner_logos_and_prompts/ and banner_ground_truth/

Notes

  • Do not commit config/config_llm.ini; it is ignored by .gitignore.
  • For simplicity, QA/user/plan/satisfaction agents use Gemini 2.5 Pro; judging uses GPT-4.1.
  • Runtime outputs go to banner_qa_experiments/results/.

Recommended Workflow

Paper budget: B = 12 questions as 3 replanning rounds × 4 questions per round.

Full clean re-run (no cached initial plans, no old results)

From the repo root, remove runtime artifacts so every mode regenerates shared initial plans d0 and writes fresh outputs:

cd A-MPQC

# 1. Remove cached initial plans (keeps the empty directory via .gitkeep)
rm -f initial_plan_store/*.json

# 2. Remove previous experiment outputs for the run label you will use.
#    The public bundle includes results/run_010_full_10samples; remove it only
#    when you intentionally want to regenerate the released table.
rm -rf banner_qa_experiments/results/*

Then run the pipeline (API keys must be set in config/config_llm.ini):

conda activate a-mpqc
cd banner_qa_experiments

# 3. Run all seven modes (settings from banner_experiment_config.json)
#    Default config writes results/run_010_full_10samples
python test_all_modes.py --config-file banner_experiment_config.json

# 4. Print paper-style performance table
python generate_performance_table.py --results-dir results/run_010_full_10samples

Where to inspect output

Each mode writes under banner_qa_experiments/results/{run_name}/{mode}/:

Artifact Purpose
{index}_{brand}/qa_conversation.json Per-sample QA history and token stats
{index}_{brand}/plan_history.json Plan updates per replanning round
{index}_{brand}/judge_evaluation.json GPT-4.1 similarity scores
{index}_{brand}/banner.png Generated banner image
batch_results.json Mode-level summary used by the performance table

Fresh runs also create experiment.log files as stdout mirrors. They are omitted from the public result bundle to keep the artifact small and focused.

After a clean re-run, confirm initial plans were recreated:

ls initial_plan_store/
# expect e.g. 001_ethicai.json once the first mode touches sample 001

Experiment Modes

Mode ID Paper name
no_user No user interaction
Naive_Agent_Fixed_Binary DG + Binary
Naive_Agent_Fixed_MultiChoice DG + Multiple-Choice
Naive_Agent_Fixed_OpenText DG + Open-Ended
Naive_Agent_Free_Ask DG (direct generation)
Naive_Agent_Flexible DG + Flexible
MPQC_Adaptive A-MPQC (Ours)

Configuration

Knob Location Paper default What it controls
max_qa_cycles config JSON / CLI --max-qa-cycles 3 Replanning rounds (n)
max_questions_per_batch config JSON / CLI --max-questions-per-batch 4 Questions per round (m)
run_name config JSON / CLI --run-name Named results archive under results/{run_name}/{mode}/
user_agent_reject_enabled config JSON / CLI --user-agent-reject / --no-user-agent-reject true User simulator respond/reject channel for interactive modes

By default, the respond/reject user simulator is enabled for all interactive modes. This is a post-rebuttal fairness setting: every questioning strategy is subject to the same single-question answerability check, rather than giving the rejection channel only to A-MPQC.

Project Structure

A-MPQC/
  config/                       # config_llm.ini (local only; see config_llm.ini.example)
  initial_plan_store/           # shared d0 cache
  banner_qa_experiments/
    banner_experiment_config.json
    test_all_modes.py
    generate_performance_table.py
    src/
      banner_experiments.py
      banner_qa_manager.py
      banner_adaptive_qa.py
      banner_prompt_loader.py
      banner_judge_evaluator.py
    prompts/
  utils/agent/               # LLM wrappers (Gemini, Azure OpenAI)
  banner_logos_and_prompts/
  banner_ground_truth/

Aggregate results table

After running experiments (test_all_modes.py or individual modes), print the comparison table:

cd banner_qa_experiments
python generate_performance_table.py --results-dir results/run_010_full_10samples

Output columns: Avg (1–5 judge score), ΔS (vs no_user), answerer Output / Reason tokens (batch totals), C, and ΔS/C (efficiency). generate_performance_table.py uses paper Eq. (1), C = Σ per-interaction output×reasoning / 10⁶.

Citation

BibTeX and contact

If you find this repository relevant or useful to your research, please consider citing our paper:

@inproceedings{wang2026agentic,
      title={Agentic Model Predictive Questioning Control in Visual Design},
      author={Kuang-Da Wang and Zhao Wang and Wei-Yao Wang and Yotaro Shimose and Jaechang Kim and Shingo Takamatsu},
      booktitle={Forty-third International Conference on Machine Learning},
      year={2026},
      url={https://openreview.net/forum?id=hvrnTzLyM7},
}

For questions or issues, please open an issue/PR or reach out to zhao.wang@sony.com.

About

Official Repo for The Paper "Agentic Model Predictive Questioning Control in Visual Design” (ICML’26)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages