Papers
Topics
Authors
Recent
Search
2000 character limit reached

CoCoST: Automatic Complex Code Generation with Online Searching and Correctness Testing

Published 20 Mar 2024 in cs.SE, cs.CL, and cs.LG | (2403.13583v3)

Abstract: LLMs have revolutionized code generation ability by converting natural language descriptions into executable code. However, generating complex code within real-world scenarios remains challenging due to intricate structures, subtle bugs, understanding of advanced data types, and lack of supplementary contents. To address these challenges, we introduce the CoCoST framework, which enhances complex code generation by online searching for more information with planned queries and correctness testing for code refinement. Moreover, CoCoST serializes the complex inputs and outputs to improve comprehension and generates test cases to ensure the adaptability for real-world applications. CoCoST is validated through rigorous experiments on the DS-1000 and ClassEval datasets. Experimental results show that CoCoST substantially improves the quality of complex code generation, highlighting its potential to enhance the practicality of LLMs in generating complex code.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (16)
  1. Santacoder: don’t reach for the stars! arXiv preprint arXiv:2301.03988.
  2. Program synthesis with large language models. arXiv preprint arXiv:2108.07732.
  3. Evaluating large language models trained on code.
  4. Teaching large language models to self-debug.
  5. Classeval: A manually-crafted benchmark for evaluating llms on class-level code generation.
  6. Text2analysis: A benchmark of table question answering with advanced data analysis and unclear queries.
  7. Measuring coding challenge competence with apps. NeurIPS.
  8. Selfevolve: A code evolution framework via large language models.
  9. Ds-1000: A natural and reliable benchmark for data science code generation. ArXiv, abs/2211.11501.
  10. Starcoder: may the source be with you!
  11. Wizardcoder: Empowering code large language models with evol-instruct.
  12. Zohar Manna and Richard J. Waldinger. 1971. Toward automatic program synthesis. Commun. ACM, 14(3):151–165.
  13. OpenAI. 2023. Gpt-4 technical report.
  14. Code llama: Open foundation models for code.
  15. Self-edit: Fault-aware code editor for code generation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 769–787, Toronto, Canada. Association for Computational Linguistics.
  16. Docprompting: Generating code by retrieving the docs. In International Conference on Learning Representations (ICLR), Kigali, Rwanda.

Summary

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.