SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.09659 · 2025

Intent Factored Generation: Unleashing the Diversity in Your Language Model

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 12 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
flairox/ifg canonical 9 of 12
FunctionStatusWhere it lives
compute_performance_metrics Ran flairox/ifg/hendrycks_math/ifg_infer_and_score.py
code served (permissive licence) · get_code("25929c22eda9938b")
create_dataset_of_size_batch_size Ran flairox/ifg/training/tune_batch_size.py
code served (permissive licence) · get_code("b881ac314109956a")
format_duration Ran flairox/ifg/hendrycks_math/experiment_pipelines/hparam_sweeper.py
code served (permissive licence) · get_code("606bde9343246a50")
generate_subpaths Ran flairox/ifg/hendrycks_math/star.py
code served (permissive licence) · get_code("79035c5cd6888332")
get_bound Ran flairox/ifg/hendrycks_math/experiment_pipelines/hparam_sweeper.py
code served (permissive licence) · get_code("b99c690a18bac742")
get_result Ran flairox/ifg/hendrycks_math/experiment_pipelines/hparam_sweeper.py
code served (permissive licence) · get_code("adc1130833a4f725")
preprocess_sample Ran flairox/ifg/training/finetune_completion.py
code served (permissive licence) · get_code("e15df122cc85e5a6")
process_results Ran flairox/ifg/hendrycks_math/math_eval.py
code served (permissive licence) · get_code("90f8729aba04c979")
read_prompt_file Ran flairox/ifg/training/finetune_completion.py
code served (permissive licence) · get_code("196f3f69c8d074dd")
compare_final_answer_to_ground_truth Not yet run flairox/ifg/hendrycks_math/math_eval.py
code served (permissive licence) · get_code("e6b10b3a46a1e73c")
evaluate_comments Not yet run flairox/ifg/unstructured_tasks/metrics/reward_model_eval.py
code served (permissive licence) · get_code("e213f105ef5bfbfa")
process_docs Not yet run flairox/ifg/hendrycks_math/math_eval.py
code served (permissive licence) · get_code("1ab57d52c0087750")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Obtaining multiple meaningfully diverse, high quality samples from Large Language Models for a fixed prompt remains an open challenge. Current methods for increasing diversity often only operate at the token-level, paraphrasing the same response. This is problematic because it leads to poor exploration on reasoning problems and to unengaging, repetitive conversational agents. To address this we propose Intent Factored Generation (IFG), factorising the sampling process into two stages. First, we sample a semantically dense intent, e.g., a summary or keywords. Second, we sample the final response conditioning on both the original prompt and the intent from the first stage. This allows us to use a higher temperature during the intent step to promote conceptual diversity, and a lower temperature during the final generation to ensure the outputs are coherent and self-consistent. Additionally, we find that prompting the model to explicitly state its intent for each step of the chain-of-thought before generating the step is beneficial for reasoning tasks. We demonstrate our method's effectiveness across a diverse set of tasks. We show this method improves both pass@k and Reinforcement Learning from Verifier Feedback on maths and code tasks. For instruction-tuning, we combine IFG with Direct Preference Optimisation to increase conversational diversity without sacrificing reward. Finally, we achieve higher diversity while maintaining the quality of generations on a general language modelling task, using a new dataset of reader comments and news articles that we collect and open-source. In summary, we present a simple method of increasing the sample diversity of LLMs while maintaining performance. This method can be implemented by changing the prompt and varying the temperature during generation, making it easy to integrate into many algorithms for gains across various applications.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2506.09659")
get_code_for_paper("2506.09659")
have("2506.09659")

Connect an agent — have() is free.