Incorporating External Knowledge through Pre-training for Natural Language to Code Generation
Open-domain code generation aims to generate code in a general-purpose programming language (such as Python) from natural language (NL) intents. Motivated by the intuition that developers usually retrieve resources on the web when writing code, we explore the effectiveness of incorporating two varieties of external knowledge into NL-to-code generation: automatically mined NL-code pairs from the online programming QA forum StackOverflow and programming language API documentation. Our evaluations show that combining the two sources with data augmentation and retrieval-based data re-sampling improves the current state-of-the-art by up to 2.2% absolute BLEU score on the code generation testbed CoNaLa. The code and resources are available at https://github.com/neulab/external-knowledge-codegen.
Code (2)
Tasks
Code GenerationData AugmentationRetrievalSimilar Papers 제목 키워드 기반
FAITH: Factuality Alignment through Integrating Trustworthiness and Honestness
Large Language Models (LLMs) can generate factually inaccurate content even if they have corresponding knowledge, which critically undermines their reliability. Existing approaches attempt to mitigate this by incorporati…
Rethinking with Retrieval: Faithful Large Language Model Inference
Despite the success of large language models (LLMs) in various natural language processing (NLP) tasks, the stored knowledge in these models may inevitably be incomplete, out-of-date, or incorrect. This motivates the nee…
Language ModelingLanguage ModellingLarge Language Modelmodel+2Improving Medical NLI Using Context-Aware Domain Knowledge
Domain knowledge is important to understand both the lexical and relational associations of words in natural language text, especially for domain-specific tasks like Natural Language Inference (NLI) in the medical domain…
Natural Language InferenceIncorporating External Knowledge to Enhance Tabular Reasoning
Reasoning about tabular information presents unique challenges to modern NLP approaches which largely rely on pre-trained contextualized embeddings of text. In this paper, we study these challenges through the problem of…
Natural Language InferenceIncorporating External Knowledge into Machine Reading for Generative Question Answering
Commonsense and background knowledge is required for a QA model to answer many nontrivial questions. Different from existing work on knowledge-aware QA, we focus on a more challenging task of leveraging external knowledg…
Answer GenerationGenerative Question AnsweringQuestion AnsweringReading Comprehension