Which LLM Feature Converts Natural Language Comments to Code?
A company wants to use large language models (LLMs) to produce code from natural language code comments. Which LLM feature meets these requirements?
Community Votes
75% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The key distinction is that text generation creates entirely new content from scratch based on a prompt, while text completion simply continues or finishes an existing piece of text — code generation from comments requires generating new content, not just completing existing code.
This question tests knowledge of LLM capabilities, specifically distinguishing between text generation and text completion when converting natural language comments into executable code. The community largely agrees that text generation is the correct answer for producing code from natural language descriptions.
Many candidates choose text completion (C) because they view code generation as 'completing' a comment with code, but this misunderstands that text completion refers to finishing partial text/code, not generating entirely new content from natural language descriptions.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Understanding LLM Capabilities for Code Generation
When a company wants to use large language models to produce code from natural language code comments, they need an LLM feature that can generate entirely new content based on descriptive input. This is fundamentally a text generation task.
Why Text Generation is Correct
Text generation refers to the capability of LLMs to create new, original content based on input prompts. When you provide a natural language comment like "Calculate the factorial of a number," the LLM must generate completely new code that didn't exist before. The model is not simply finishing or extending existing code — it's creating new content from scratch based on semantic understanding of the natural language description.
This aligns with how modern AI coding assistants work: you describe what you want in plain language, and the model generates the corresponding code implementation.
Why Text Completion is Incorrect
The confusion arises because some candidates view the process as "completing" a comment with code. However, text completion in LLM terminology refers specifically to continuing or finishing partial text that already exists. For example:
- Input: "def calculate_sum(a, b):\n "
- Completion: "return a + b"
Why Other Options Are Wrong
- Text summarization (A): This condenses longer text into shorter summaries — the opposite of what's needed here
- Text classification (D): This categorizes text into predefined categories, which doesn't involve creating new content
Community Consensus
The majority of candidates (75%) correctly identified text generation as the answer, recognizing that producing code from natural language requires generating new content. The 25% who chose text completion likely misunderstood the distinction between completing partial text versus generating new content from descriptions.
Official Reference
Exam Strategy
When distinguishing between similar LLM capabilities, focus on whether the task requires creating entirely new content (generation) versus finishing existing content (completion). Code generation from natural language descriptions always falls under generation, not completion.
Related Analysis
Practice All AIF-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AIF-C01 Practice Test →