Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

DecomP

> 编程语言
Open source

Repository for Decomposed Prompting

100 stars0 likes4 views
WebsiteGitHub

About

Repository for Decomposed Prompting

DecomP

Repository for Decomposed Prompting

Setup

  1. Install the required dependencies
    bash
    conda create -n decomp python=3.8
    pip install -r requirements.txt
  2. Set the necessary env variables
    bash
    export PYTHONPATH=src/
    export OPENAI_API_KEY=

Running Inference

Letter Concatenation

Run the letter concatenation experiments with one of the prompts

bash
    promptid=p1 python -m decomp.inference.configurable_inference \
      --input datasets/letter_cat/n5_eg100_pos2_space.json \
      --config configs/inference/letter_cat/letter_cat_greedy_search.jsonnet \
      --output output/predictions/letter_cat_n5_eg100_pos2_space_decomp_predictions.json
      
    python -m decomp.datasets_utils.drop_eval \
      --gold_path datasets/letter_cat/n5_eg100_pos2_space.json \
      --prediction_path output/predictions/letter_cat_n5_eg100_pos2_space_decomp_predictions.json

Change promptid to p2 or p3 to try other prompts. Change config to cot_letter_cat_greedy_search to evaluate the CoT baseline and cot_rollout_letter_cat_greedy_search to evaluate the CoT w/ rollout baseline.

List Reversal

Run the list reversal experiments on sequences of length LEN using prompting strategy STRAT (STRAT should be one of decomp, cot, unrolled).

…

CommAQA

Run the CommAQA experiments with one of the prompts

bash
    promptid=p1 python -m decomp.inference.configurable_inference \
      --input datasets/commaqa_e/iid_test_eg100.json \
      --config configs/inference/commaqa/commaqae_fine_greedy_search.jsonnet \
      --output output/predictions/commaqa_e_iid_test_eg100_fine_decomp_predictions.json
      
    python -m decomp.datasets_utils.drop_eval \
      --gold_path datasets/commaqa_e/iid_test_eg100.json \
      --prediction_path output/predictions/commaqa_e_iid_test_eg100_fine_decomp_predictions.json

Change promptid to p2 or p3 to try other prompts. Change config to cot_commaqae_greedy_search to evaluate the CoT baseline and commaqae_coarse_greedy_search to evaluate the coarse decomposition. Change the test file to datasets/commaqa_e/compgen_test_eg300.json to evaluate the compositional generalization split.

Multi-hop Open Domain QA

All the code and experiments for multi-hop open-domain QA can be found in Harsh's Decomp-ODQA repo here: https://github.com/HarshTrivedi/DecomP-ODQA

Issues· 3 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言