H OW I L EARNED TO S TOP WORRYING A ND LOVE A I-ASSISTED C ODING TOOLS Pe ty o D imitr o v 30th September 2023

About me • 16 years in Software Engineering • Senior Software Architect for Musala Soft / Qinshift • PhD in Computer Science from Technical University Sofia • Lector of course Distributed Systems in Technical University Sofia

Agenda • Initial interest • Reviewed AI-assisted tools • How I use Copilot(X)? • How I use ChatGPT? • How Musala uses AI-assisted tools? • Recent developments • Q&A

Prior to 2021

2022 Copilot initial tests

2023.03 - GPT 4 2022.11 - ChatGPT 2022.03 - GPT 3.5 2021.10 - GitHub Copilot 2021.08 - Codex 2020.06 - GPT-3 (175B) 2019.02 - GPT-2 (1.5B) 2018.02 - GPT-1 (0.1B) 2017 - Transformer with Attention

HackerRank challenge (1)

HackerRank challenge (2) A = 4, K = 5, P = 1

How we are introducing it in Musala 1. 2. 3. 4. 5. 6. 7. 8. Research & pick most promising candidate tools Define questionnaire to assess results Run 1-month trial & collect feedback Research protection mechanisms Identify suitable projects Prepare a list of recommended prompts Require a disclaimer in PR when AI is used Conduct demonstrations and talks to encourage adoption

Reviewed tools GitHub Copilot Codeium AWS CodeWhisperer ChatGPT

How I use Copilot?

Weaker features of Copilot • Inline fixing • Code translation • Refactoring

How I use ChatGPT?

For inspiration

As a Rubber ducky

Writing code in “second” languages

Analyze REST APIs (1)

Analyze REST APIs (2)

Analyze REST APIs (3)

Advanced Data Analysis (1) Display the difference between Main and CountryX and CountryY for the different code types. The numerical values are the number of lines of code.

Advanced Data Analysis (2)

Create diagrams

Generating presentations Generate Python code for creating a PowerPoint presentation on the topic “Basic Python syntax and data types”. Fill in the details with your knowledge. I need 7 slides. Run the code and return the resulting presentation.

Generating presentations

Prompt engineering - Examples or reference

Prompt engineering - Adopt a persona & style Custom Instructions / Roles

Prompt engineering - Step by step

Prompt engineering - Ask questions

Prompt engineering - Reflection

Prompt engineering - Delimiters

Prompt engineering - Periodic summary*

Effects on productivity ~ +5-10%

Musala AI-related projects • Commercial: Retrieval-Augmented Generation (RAG) • Internal: Summarization (interview) • Internal: Code review (practical tasks) • Approach: • ChatBot • API • Local model*

Risks - Devs • Verbose interactions • Hallucinations • Overreliance on the machine

Risks - Data • Leaking proprietary data • Intellectual Property • Siloed solutions by large vendors

Risks - EU AI Act Banned High Limited Low Social credit, realtime biometric Critical, education, law, employment Chatbots, image processing Spam filters, computer games

Latest news November – AWS Gen AI November – 365 Copilot AI Assistant September – Minstral September – ChatGPT Voice & Images September – Copilot Chat* August – Enterprise ChatGPT August – Code Llama (Instruct, Python) July – Llama2 July – Claude2 July – ChatGPT Code Interpreter

Conclusion • A new tool at our disposal like Google & StackOverflow • Only as an assistant • Juniors, Mediors and Seniors benefit differently • Copilot’s advantage is seamless IDE integration • ChatGPT helps with a wider variety of tasks • There are risks & challenges ahead

Questions

Thanks! www.linkedin.com/in/ petyo-dimitrov petyo.dimitrov@musala.com petyo.dimitrov@gmail.com