{"id":"https://openalex.org/W4401996408","doi":"https://doi.org/10.1145/3690635","title":"Structured Chain-of-Thought Prompting for Code Generation","display_name":"Structured Chain-of-Thought Prompting for Code Generation","publication_year":2024,"publication_date":"2024-08-29","ids":{"openalex":"https://openalex.org/W4401996408","doi":"https://doi.org/10.1145/3690635"},"language":"en","primary_location":{"id":"doi:10.1145/3690635","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3690635","pdf_url":"https://dl.acm.org/doi/pdf/10.1145/3690635","source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"type":"article","indexed_in":["crossref"],"open_access":{"is_oa":true,"oa_status":"bronze","oa_url":"https://dl.acm.org/doi/pdf/10.1145/3690635","any_repository_has_fulltext":false},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5100405693","display_name":"Jia Li","orcid":"https://orcid.org/0000-0002-5579-8852"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]},{"id":"https://openalex.org/I4210092262","display_name":"Ministry of Education","ror":"https://ror.org/00dh5gw98","country_code":"RO","type":"funder","lineage":["https://openalex.org/I2799732796","https://openalex.org/I4210092262"]}],"countries":["CN","RO"],"is_corresponding":false,"raw_author_name":"Jia Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","School of Computer Science, Peking University, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China"],"raw_orcid":"https://orcid.org/0000-0002-5579-8852","affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","institution_ids":["https://openalex.org/I4210092262"]},{"raw_affiliation_string":"School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100447682","display_name":"Ge Li","orcid":"https://orcid.org/0000-0002-5828-0186"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]},{"id":"https://openalex.org/I4210092262","display_name":"Ministry of Education","ror":"https://ror.org/00dh5gw98","country_code":"RO","type":"funder","lineage":["https://openalex.org/I2799732796","https://openalex.org/I4210092262"]}],"countries":["CN","RO"],"is_corresponding":false,"raw_author_name":"Ge Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","School of Computer Science, Peking University, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China"],"raw_orcid":"https://orcid.org/0000-0002-5828-0186","affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","institution_ids":["https://openalex.org/I4210092262"]},{"raw_affiliation_string":"School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5037363163","display_name":"Yongmin Li","orcid":"https://orcid.org/0009-0001-3702-0043"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]},{"id":"https://openalex.org/I4210092262","display_name":"Ministry of Education","ror":"https://ror.org/00dh5gw98","country_code":"RO","type":"funder","lineage":["https://openalex.org/I2799732796","https://openalex.org/I4210092262"]}],"countries":["CN","RO"],"is_corresponding":false,"raw_author_name":"Yongmin Li","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","School of Computer Science, Peking University, China"],"raw_orcid":"https://orcid.org/0009-0001-3702-0043","affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","institution_ids":["https://openalex.org/I4210092262"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5049100391","display_name":"Zhi Jin","orcid":"https://orcid.org/0000-0003-1087-226X"},"institutions":[{"id":"https://openalex.org/I20231570","display_name":"Peking University","ror":"https://ror.org/02v51f717","country_code":"CN","type":"education","lineage":["https://openalex.org/I20231570"]},{"id":"https://openalex.org/I4210092262","display_name":"Ministry of Education","ror":"https://ror.org/00dh5gw98","country_code":"RO","type":"funder","lineage":["https://openalex.org/I2799732796","https://openalex.org/I4210092262"]}],"countries":["CN","RO"],"is_corresponding":false,"raw_author_name":"Zhi Jin","raw_affiliation_strings":["Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","School of Computer Science, Peking University, China"],"raw_orcid":"https://orcid.org/0000-0003-1087-226X","affiliations":[{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies, Ministry of Education, Peking University, Haidian, China and School of Computer Science, Peking University, Haidian, China","institution_ids":["https://openalex.org/I4210092262"]},{"raw_affiliation_string":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]},{"raw_affiliation_string":"School of Computer Science, Peking University, China","institution_ids":["https://openalex.org/I20231570"]}]}],"institutions":[],"countries_distinct_count":2,"institutions_distinct_count":4,"corresponding_author_ids":[],"corresponding_institution_ids":[],"apc_list":null,"apc_paid":null,"fwci":68.9479,"has_fulltext":false,"cited_by_count":101,"citation_normalized_percentile":{"value":0.999461,"is_in_top_1_percent":true,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":99,"max":100},"biblio":{"volume":"34","issue":"2","first_page":"1","last_page":"23"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10260","display_name":"Software Engineering Research","score":0.9994999766349792,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},"topics":[{"id":"https://openalex.org/T10260","display_name":"Software Engineering Research","score":0.9994999766349792,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10639","display_name":"Advanced Software Engineering Methodologies","score":0.9988999962806702,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T11450","display_name":"Model-Driven Software Engineering Techniques","score":0.9984999895095825,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}}],"keywords":[{"id":"https://openalex.org/keywords/computer-science","display_name":"Computer science","score":0.8107408285140991},{"id":"https://openalex.org/keywords/chain","display_name":"Chain (unit)","score":0.4389961063861847},{"id":"https://openalex.org/keywords/code","display_name":"Code (set theory)","score":0.42399898171424866},{"id":"https://openalex.org/keywords/software-engineering","display_name":"Software engineering","score":0.3713870942592621},{"id":"https://openalex.org/keywords/programming-language","display_name":"Programming language","score":0.37036436796188354}],"concepts":[{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.8107408285140991},{"id":"https://openalex.org/C199185054","wikidata":"https://www.wikidata.org/wiki/Q552299","display_name":"Chain (unit)","level":2,"score":0.4389961063861847},{"id":"https://openalex.org/C2776760102","wikidata":"https://www.wikidata.org/wiki/Q5139990","display_name":"Code (set theory)","level":3,"score":0.42399898171424866},{"id":"https://openalex.org/C115903868","wikidata":"https://www.wikidata.org/wiki/Q80993","display_name":"Software engineering","level":1,"score":0.3713870942592621},{"id":"https://openalex.org/C199360897","wikidata":"https://www.wikidata.org/wiki/Q9143","display_name":"Programming language","level":1,"score":0.37036436796188354},{"id":"https://openalex.org/C1276947","wikidata":"https://www.wikidata.org/wiki/Q333","display_name":"Astronomy","level":1,"score":0.0},{"id":"https://openalex.org/C121332964","wikidata":"https://www.wikidata.org/wiki/Q413","display_name":"Physics","level":0,"score":0.0},{"id":"https://openalex.org/C177264268","wikidata":"https://www.wikidata.org/wiki/Q1514741","display_name":"Set (abstract data type)","level":2,"score":0.0}],"mesh":[],"locations_count":1,"locations":[{"id":"doi:10.1145/3690635","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3690635","pdf_url":"https://dl.acm.org/doi/pdf/10.1145/3690635","source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"}],"best_oa_location":{"id":"doi:10.1145/3690635","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3690635","pdf_url":"https://dl.acm.org/doi/pdf/10.1145/3690635","source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"sustainable_development_goals":[{"display_name":"Quality Education","id":"https://metadata.un.org/sdg/4","score":0.5799999833106995}],"awards":[{"id":"https://openalex.org/G2215374851","display_name":null,"funder_award_id":"62072007, 62192733, 61832009, 62192730","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"},{"id":"https://openalex.org/G5297088667","display_name":null,"funder_award_id":"62192731, 62152730","funder_id":"https://openalex.org/F4320321001","funder_display_name":"National Natural Science Foundation of China"}],"funders":[{"id":"https://openalex.org/F4320321001","display_name":"National Natural Science Foundation of China","ror":"https://ror.org/01h0zpd94"}],"has_content":{"grobid_xml":false,"pdf":true},"content_urls":{"pdf":"https://content.openalex.org/works/W4401996408.pdf"},"referenced_works_count":25,"referenced_works":["https://openalex.org/W1593271688","https://openalex.org/W1985282686","https://openalex.org/W2102075452","https://openalex.org/W2153887189","https://openalex.org/W2560674852","https://openalex.org/W2963995027","https://openalex.org/W4226278401","https://openalex.org/W4281944434","https://openalex.org/W4283706798","https://openalex.org/W4322718191","https://openalex.org/W4327810158","https://openalex.org/W4361866100","https://openalex.org/W4377238789","https://openalex.org/W4384345649","https://openalex.org/W4385571034","https://openalex.org/W4385572345","https://openalex.org/W4385572634","https://openalex.org/W4388483492","https://openalex.org/W4389519352","https://openalex.org/W4391272793","https://openalex.org/W4393905718","https://openalex.org/W4400318591","https://openalex.org/W6600339963","https://openalex.org/W6602430550","https://openalex.org/W6834284007"],"related_works":["https://openalex.org/W4391375266","https://openalex.org/W2748952813","https://openalex.org/W2390279801","https://openalex.org/W2358668433","https://openalex.org/W4396701345","https://openalex.org/W2376932109","https://openalex.org/W2001405890","https://openalex.org/W4396696052","https://openalex.org/W2382290278","https://openalex.org/W4395014643"],"abstract_inverted_index":{"Large":[0],"Language":[1],"Models":[2],"(LLMs)":[3],"have":[4],"shown":[5],"impressive":[6],"abilities":[7],"in":[8,61,185],"code":[9,78],"generation.":[10],"Chain-of-Thought":[11],"(CoT)":[12],"prompting":[13,22,45,56,75,133,149,177,180,188],"is":[14,85,189],"the":[15,38,41,125,140],"state-of-the-art":[16],"approach":[17],"to":[18,26,102,112,117,129,150,183,191],"utilizing":[19],"LLMs.":[20,145],"CoT":[21,44,55,130,179],"asks":[23],"LLMs":[24,111,152],"first":[25],"generate":[27,118],"CoTs":[28,69],"(i.e.,":[29,97,153,171],"intermediate":[30],"natural":[31],"language":[32],"reasoning":[33,121],"steps)":[34,122],"and":[35,71,100,104,138,156,165,174,193],"then":[36],"output":[37],"code.":[39,127],"However,":[40],"accuracy":[42],"of":[43,144],"still":[46],"cannot":[47],"satisfy":[48],"practical":[49],"applications.":[50],"For":[51],"example,":[52],"gpt-3.5-turbo":[53],"with":[54],"only":[57],"achieves":[58,194],"53.29%":[59],"Pass@1":[60],"HumanEval.":[62],"In":[63],"this":[64],"article,":[65],"we":[66,109],"propose":[67],"Structured":[68],"(SCoTs)":[70],"present":[72],"a":[73],"novel":[74],"technique":[76],"for":[77],"generation":[79],"named":[80],"SCoT":[81,132,148,176,187,207],"prompting.":[82,208],"Our":[83],"motivation":[84],"that":[86],"human":[87,198,202],"developers":[88,203],"follow":[89],"structured":[90,106,141],"programming.":[91],"Developers":[92],"use":[93,113],"three":[94,114,169],"programming":[95,115,136,142],"structures":[96,116,137],"sequential,":[98],"branch,":[99],"loop)":[101],"design":[103],"implement":[105],"programs.":[107],"Thus,":[108],"ask":[110],"SCoTs":[119],"(structured":[120],"before":[123],"outputting":[124],"final":[126],"Compared":[128],"prompting,":[131],"explicitly":[134],"introduces":[135],"unlocks":[139],"thinking":[143],"We":[146],"apply":[147],"two":[151],"gpt-4-turbo,":[154],"gpt-3.5-turbo,":[155],"DeepSeek":[157],"Coder-Instruct-":[158],"\\(\\{\\)":[159],"1.3B,":[160],"6.7B,":[161],"33B":[162],"\\(\\}\\)":[163],")":[164],"evaluate":[166],"it":[167],"on":[168],"benchmarks":[170],"HumanEval,":[172],"MBPP,":[173],"MBCPP).":[175],"outperforms":[178],"by":[181],"up":[182],"13.79%":[184],"Pass@1.":[186],"robust":[190],"examples":[192],"substantial":[195],"improvements.":[196],"The":[197],"evaluation":[199],"also":[200],"shows":[201],"prefer":[204],"programs":[205],"from":[206]},"counts_by_year":[{"year":2026,"cited_by_count":19},{"year":2025,"cited_by_count":67},{"year":2024,"cited_by_count":15}],"updated_date":"2026-06-18T10:00:31.954636","created_date":"2025-10-10T00:00:00"}
