{"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/grimoire-is-all-you-need-for-enhancing-large","title":"Grimoire is All You Need for Enhancing Large Language Models","arxiv_id":"2401.03385","date":"2024-01-07","proceeding":null,"authors":["Ding Chen","Shichao Song","Qingchen Yu","Zhiyu Li","Wenjin Wang","Feiyu Xiong","Bo Tang"],"abstract":"In-context Learning (ICL) is one of the key methods for enhancing the performance of large language models on specific tasks by providing a set of few-shot examples. However, the ICL capability of different types of models shows significant variation due to factors such as model architecture, volume of learning data, and the size of parameters. Generally, the larger the model's parameter size and the more extensive the learning data, the stronger its ICL capability. In this paper, we propose a method SLEICL that involves learning from examples using strong language models and then summarizing and transferring these learned skills to weak language models for inference and application. This ensures the stability and effectiveness of ICL. Compared to directly enabling weak language models to learn from prompt examples, SLEICL reduces the difficulty of ICL for these models. Our experiments, conducted on up to eight datasets with five language models, demonstrate that weak language models achieve consistent improvement over their own zero-shot or few-shot capabilities using the SLEICL method. Some weak language models even surpass the performance of GPT4-1106-preview (zero-shot) with the aid of SLEICL.","url_abs":"https://arxiv.org/abs/2401.03385v2","url_pdf":"https://arxiv.org/pdf/2401.03385v2.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":"grimoire-is-all-you-need-for-enhancing-large","repo_url":"https://github.com/iaar-shanghai/grimoire","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2401.03385","atlas_url":"https://app.syntology.ai/?focus=2401.03385","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.03385"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/iaar-shanghai/grimoire","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":"6982375148c368d5","entry":"cal_std_dev","repo":"iaar-shanghai/grimoire","repo_kind":"official","path":"analyst.py","file_url":"https://github.com/iaar-shanghai/grimoire/blob/HEAD/analyst.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6982375148c368d5"}},{"code_sha256_prefix":"d9c9239142204c58","entry":"catch_all_exceptions","repo":"iaar-shanghai/grimoire","repo_kind":"official","path":"experiment.py","file_url":"https://github.com/iaar-shanghai/grimoire/blob/HEAD/experiment.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9c9239142204c58"}},{"code_sha256_prefix":"5fb0226b327b8528","entry":"load_yaml_conf","repo":"iaar-shanghai/grimoire","repo_kind":"official","path":"core/load_conf.py","file_url":"https://github.com/iaar-shanghai/grimoire/blob/HEAD/core/load_conf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5fb0226b327b8528"}},{"code_sha256_prefix":"37d53773023b0c04","entry":"read_all_results","repo":"iaar-shanghai/grimoire","repo_kind":"official","path":"analyst.py","file_url":"https://github.com/iaar-shanghai/grimoire/blob/HEAD/analyst.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"37d53773023b0c04"}},{"code_sha256_prefix":"2d8e7193d8cbfea4","entry":"read_results","repo":"iaar-shanghai/grimoire","repo_kind":"official","path":"analyst.py","file_url":"https://github.com/iaar-shanghai/grimoire/blob/HEAD/analyst.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2d8e7193d8cbfea4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}