{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/beamsearchqa-large-language-models-are-strong","title":"Allies: Prompting Large Language Model with Beam Search","arxiv_id":"2305.14766","date":"2023-05-24","proceeding":null,"authors":["Hao Sun","Xiao Liu","Yeyun Gong","Yan Zhang","Daxin Jiang","Linjun Yang","Nan Duan"],"abstract":"With the advance of large language models (LLMs), the research field of LLM applications becomes more and more popular and the idea of constructing pipelines to accomplish complex tasks by stacking LLM API calls come true. However, this kind of methods face two limitations: narrow information coverage and low fault tolerance. In this work, we propose a novel method called ALLIES. Given an input query, ALLIES leverages LLMs to iteratively generate new queries related to the original query, enabling an iterative reasoning process. By iteratively refining and expanding the scope of the original query, ALLIES captures and utilizes hidden knowledge that may not be directly obtainable through retrieval. We take zero-shot open-domain question answering (ODQA) as an application scene and evaluate ALLIES on the widely-used benchmarks, such as NQ, WebQ and TriviaQA. The experimental results demonstrate that ALLIES significantly outperforms other zero-shot baselines, indicating its effectiveness in tackling those challenges. Our code is available in https://github.com/microsoft/SimXNS/tree/main/ALLIES.","url_abs":"https://arxiv.org/abs/2305.14766v3","url_pdf":"https://arxiv.org/pdf/2305.14766v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"beamsearchqa-large-language-models-are-strong","repo_url":"https://github.com/microsoft/simxns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"triviaqa","task_name":"TriviaQA"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.14766","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.14766"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/simxns","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":12},"by_repo_kind":{"official":{"samples":13,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"ed1a7cdd6a385a75","entry":"readfiles","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/utils.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed1a7cdd6a385a75"}},{"code_sha256_prefix":"7d94e4547cbd3c27","entry":"answer_with_gen","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/tools.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/tools.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d94e4547cbd3c27"}},{"code_sha256_prefix":"9ae939ed24cee1da","entry":"embed_passages","repo":"microsoft/simxns","repo_kind":"official","path":"CAPSTONE/models/co_training_generate_new_train_wiki.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/CAPSTONE/models/co_training_generate_new_train_wiki.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ae939ed24cee1da"}},{"code_sha256_prefix":"860e0ecfd5d3c0c9","entry":"extract_floats_from_string","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/tools.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/tools.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"860e0ecfd5d3c0c9"}},{"code_sha256_prefix":"bb95e483083da720","entry":"gen_background","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/tools.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/tools.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb95e483083da720"}},{"code_sha256_prefix":"316ed99ac8be6d85","entry":"generate","repo":"microsoft/simxns","repo_kind":"official","path":"CAPSTONE/models/generate_query.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/CAPSTONE/models/generate_query.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"316ed99ac8be6d85"}},{"code_sha256_prefix":"26455f41307d3f5c","entry":"get_question_embeddings","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/retrieval_utils.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/retrieval_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26455f41307d3f5c"}},{"code_sha256_prefix":"3d84e929685d7198","entry":"load_data","repo":"microsoft/simxns","repo_kind":"official","path":"CAPSTONE/models/generate_query.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/CAPSTONE/models/generate_query.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d84e929685d7198"}},{"code_sha256_prefix":"4ee31e53b22a4487","entry":"load_states_from_checkpoint","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/retrieval_utils.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/retrieval_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4ee31e53b22a4487"}},{"code_sha256_prefix":"d009b630f4496e64","entry":"load_tf_weights_in_bert","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/modeling_bert.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/modeling_bert.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d009b630f4496e64"}},{"code_sha256_prefix":"b3b424db5be9b55c","entry":"reform_out","repo":"microsoft/simxns","repo_kind":"official","path":"CAPSTONE/models/co_training_generate_new_train_wiki.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/CAPSTONE/models/co_training_generate_new_train_wiki.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3b424db5be9b55c"}},{"code_sha256_prefix":"e6b0e72e41150f0f","entry":"retrieval","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/utils.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6b0e72e41150f0f"}},{"code_sha256_prefix":"314a75c29803d7fd","entry":"sparse_retrieval","repo":"microsoft/simxns","repo_kind":"official","path":"ALLIES/utils.py","file_url":"https://github.com/microsoft/simxns/blob/HEAD/ALLIES/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"314a75c29803d7fd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}