1
Language Agents for Software Developments!
Outline
Background: Feature Engineering
NLP Before 2014
Background: Model Engineering and the Rise of LLMs
Move from feature engineering to model engineering (2014 — )
Background: Model Engineering and the Rise of LLMs
Move from feature engineering to model engineering (2014 — )
Transformer decoder has become a standard for LLMs
Image source: https://arxiv.org/pdf/2011.04542
LLM in Different Applications
The Rise of Language Agents
Outline
Language Agents: Simplistic View
wrapper that plays any specific role / solves a particular task
Language Agents: Broad Views of Functionalities
Image: https://rdi.berkeley.edu/llm-agents/assets/percyliang.pdf
Outline
Language Agents for Software Developments
E.g., GitHub Co-Pilots, Aider, SWE-Agents, Open-hands
How Promising?
Challenges in Coding Agents
Code Generation
Find the median of an array
Concept
NL Description
Diverse token seq
Code
Modelling and Evaluation?
Code Completion Before Code LLMs (until 2021)
Input Description
Target code
Generated code
Perplexity
Code Generation
More information
as hint
Less diverse
ACL ’18
Sort my_tensor in descending order
Concept
Search examples
Browse thru. top few results
Adapt the results
my_tensor.sort(descending=True)
Python sorted in descending order
Real Users:
Code Generation
NL Description
GitHub/StackOverflow
Generated Code
LLM
EMNLP Findings ‘21
Code Retriever
Code Completion with Code LLMs (2021 —)
Retrieval Augmented Code Generation
Retrieved Example Code
Filter Noisy Retrievals
https://rdi.berkeley.edu/llm-agents/assets/percyliang.pdf
Pre-print, Enlisted in AI-Guides’ most impactful RAG papers
More High Quality and Diverse Retrievals
https://rdi.berkeley.edu/llm-agents/assets/percyliang.pdf
Retriever
Filter
Ensemble Retrievals
https://rdi.berkeley.edu/llm-agents/assets/percyliang.pdf
EACL ‘23
Retriever-1
Filter-1
Retriever-2
Filter-2
Retriever-3
Filter-3
Pre-trained LM-1
Pre-trained LM-2
Pre-trained LM-3
Always Retrieve?
Arbitrary LLM
Adaptive
Open-RAG
Retrieve
or Not?
EMNLP Findings ‘24
Achievement highlights
1Million+ readers, 2Millions+ monthly views
Most popular tech blog
Code Generation
Execution level (2021 — )
e.g, HumanEval (Chen et al., 2021)
Evaluation?
Can LLMs Really Code?
Code Generation
Competitive Problem Solving (2022 — )
xCodeEval: New Benchmark
ACL ‘24
xCodeEval: New Benchmark
xCodeEval: New Benchmark
Reflect and Debug
Reflect and fix if any implementation errors found
Implement or Code
Implement the plan into code
Plan or Pseudocode
Decompose into steps
And make plan
Developers’ Cycle
Recall Examples
Recall similar problems
e.g., same Algorithms, DS
How does a programmer solve a problem��
MapCoder: Multi-Agent Code Gen Appr
ACL ‘24
def sum_squares(lst):� """You are given a list of numbers.� You need to return the sum of squared numbers in the given list,� round each element in the list to the upper int(Ceiling) first.� Examples:� For lst = [1,2,3] the output should be 14� For lst = [1,4,9] the output should be 98� For lst = [1,3,5,7] the output should be 84� For lst = [1.4,4.2,0] the output should be 29� For lst = [-2.4,1,1] the output should be 6� """
Problem
Sample I/O
Retrieval Agent: (Self-retrieved Similar Problem, its solution with planning for helping the model better understand the original problem)
Example 1: Find the sum of all even numbers in a list.
...
Planning Agent: (Generated plan for original problem)
To solve this problem, we can iterate through the list, round each number to the upper integer, square it, and then add it to a running total. Finally, we return the total sum of all squared numbers in the list.
Implementation/Coding Agent: (Generate code using the above plan)
import math�def sum_squares(lst):� total = 0� for num in lst:� total += (int(num) ** 2)� return total
Testing with all the Sample I/O. But it failed in the following sample I/O:
assert sum_squares([1.4,4.2,0]) == 29
MapCoder
Example problem – MapCoder ��
def sum_squares(lst):� """You are given a list of numbers.� You need to return the sum of squared numbers in the given list,� round each element in the list to the upper int(Ceiling) first.� Examples:� For lst = [1,2,3] the output should be 14� For lst = [1,4,9] the output should be 98� For lst = [1,3,5,7] the output should be 84� For lst = [1.4,4.2,0] the output should be 29� For lst = [-2.4,1,1] the output should be 6� """
Problem
Sample I/O
Planning Agent: (Generated plan for original problem)
To solve this problem, we can iterate through the list, round each number to the upper integer, square it, and then add it to a running total. Finally, we return the total sum of all squared numbers in the list.
Implementation/Coding Agent: (Generate code using the above plan)
import math�def sum_squares(lst):� total = 0� for num in lst:� total += (int(num) ** 2)� return total
Testing with all the Sample I/O. But it failed in the following sample I/O:
assert sum_squares([1.4,4.2,0]) == 29
Debugging Agent: (Fix code using the above-mentioned plan and test report)
import math�def sum_squares(lst):� total = 0� for num in lst:� total += (math.ceil(num) ** 2)� return total
All sample input-output pairs now passed. The code is evaluated against private test cases, and it passed all of them as well.
MapCoder
Fix according to plan
Example problem – MapCoder ��
MapCoder: Achievements
CodeSim: Simulation Agent for Code
Under-review NAACL ‘25
Limitations
Outline
PwS: Poison with Style
Under-review S&P ‘25
PwS: Poison with Style
Outcome
Future Work