By Yingbo Zhou and Scott Nyberg
In our “Engineering Energizers” Q&A series, we examine the professional life experiences that have shaped Salesforce Engineering leaders. Meet Yingbo Zhou, a Senior Director of Research for Salesforce AI Research, where he leads the team to develop the model for Einstein for Developers a set of next-gen AI tools for improving how developers write code, using Salesforce languages and frameworks such as Apex and Lightning Web Components (LWC).
Read on to learn how Yingbo’s projects solve complex coding challenges — circumventing the intricacies surrounding Salesforce languages and frameworks that may challenge less experienced programmers.
What are Salesforce languages used for and what challenges must engineers overcome to use them?
Salesforce’s programming language and frameworks such as Apex and LWC are designed for developing SaaS applications atop its customer relationship management (CRM) functionality.
These languages deliver many benefits — including increased productivity and lightning-fast development — but writing Salesforce code demands specialized skills. Engineers without a programming background may find it challenging to learn the languages as they are as complicated as other languages like Java.
For example, mastering Apex may require tasks ranging from studying introductory materials to taking tutorials to asking for help from the Salesforce Trailhead community. Thus, there may be a steep learning curve involved, even for the most experienced engineers.
What is Einstein for Developers and how does it help engineers overcome that learning curve?
Einstein for Developers, powered by Salesforce’s own large language model (LLM), empowers developers to build Salesforce apps faster and tackle new problems creatively by using predictive AI code, templates, test cases and more — taking developer productivity to the next level.
By combining industry best practices with AI-suggested code, Einstein for Developers enables engineers to quickly learn Salesforce languages and ship best-in-class Salesforce code that is optimized, standardized, and robust.
And with conversational AI at their fingertips, developers can onboard to new projects instantly.
Lastly, programmers can find answers without leaving their coding environment — whether that is Salesforce Code Builder or VS Code.
Yingbo explains how Einstein for Developers helps boost developer productivity.
Diving deeper, how does Einstein for Developers help engineers write code faster?
Einstein simplifies the code writing process for any developer, from novice to pro-coder. Driving developer productivity and efficiency, the tool helps assemble structures and performs simple functions and maintenance.
For example, using natural language, a novice developer can transform ideas written in plain English into highly contextual and structured Apex or LWC code.
And if the code generated by Einstein needs to be refined or personalized further, the developer can ask Einstein to regenerate the output until the desired outcome is achieved. Developers can also start prototyping or jumpstart their projects faster by asking Einstein to generate entire functions, complex algorithms, and best-in-class boilerplate code that are contextual and rich with their CRM data.
Example of natural language to code functionality, one of Einstein for Developers’ many features.
Additionally, as Einstein generates code, developers can study its development process for their specific use cases. Consequently, this interactive learning experience enables engineers to enhance their skills and proficiency in Salesforce languages coding over time.
Teaming the app with ApexGuru – a tool that helps customers identify inefficiencies in their projects after deployment – further improves code, enabling engineers to improve its speed and performance efficiency following deployment. ApexGuru performs automatic and first remediation via runtime hotspot analysis to detect performance bottlenecks – helping developers discover anti-patterns and pinpoint areas of their code that they may want to optimize.
Yingbo further illustrates runtime hotspot analysis.
What is the AI model that powers Einstein for Developers?
Einstein for Developers is powered by Salesforce’s own conversational AI programming system introduced last year called CodeGen. CodeGen is the largest open source LLM for code using in-house models and custom data tailored for CRM. Today, it supports over 6+ languages and averages over 300,000+ downloads a month. CodeGen 2.5 represents a major modeling advancement, outperforming earlier and larger CodeGen models — improving both speed and accuracy.
Additionally, it delivers enhanced language coverage, trained on 84+ programming languages, and features a smaller, yet more efficient 7 billion model size compared to its predecessor’s 16 billion size.
What was your process for training CodeGen 2.5’s model?
The first phase focused on unsupervised pre-training, whereby the model underwent training without specific tasks in mind. This stage introduced the model to tremendous volumes of data that’s derived from permissively licensed open source projects, enabling it to learn the representation of different programs and decipher semantic nuances.
The second phase focused on fine-tuning the model. Unlike traditional supervised training that concentrates on individual tasks, instruction fine-tuning uses textual instructions to enable a broader task generalization. This strategic approach enhanced the model’s ability to perform diverse tasks. After this stage, the model could understand natural language requests and produce corresponding outputs in seconds.
How will CodeGen 2.5 support developers in the future?
Beyond supporting Einstein for Developers, the multidimensional model will enable a versatile chat interface that draws from help documents to answer user questions. So, instead of surfing the Internet for answers, users can ask a question in chat mode across multiple interactions:
- Text to code
- Text to text
- Code to text
- Code to code
For example, engineers can copy and paste their code into the search bar and ask the model to scan their code for issues. Or they could ask it to summarize their code to help them compose documentation. It could even provide explanatory information to engineers, answering questions such as, “Explain what Apex code is.” The use cases are endless.
CodeGen 2.5 is also set to offer an infill capability that will create new sections of code within an existing code. To achieve this, the model considers contextual cues from the surrounding code to seamlessly incorporate sections of new code, delivering a robust and efficient codebase.
Yingbo provides additional details on infilling.