TL;DR: Curious to know what do you use for your LLM-assisted workflow?
For example, I tried out ChatGPT Mac as part of this specialization and found several functionalities extremely useful and easy to integrate into my workflow.
E.g.
ChatGPT Mac + VSCode
I keep my VSCode editor open with the downloaded notebook and any other files which I want to provide ChatGPT with context, and enable the Work with Code option
Then I type my prompt with the best practice pre-amble (e.g. ‘acting as …’ etc.)
Call out the Edit with Copilot chat and add the necessary files before prompting.
This was a good specialization to better use LLMs to be a great pair-programmer, mentor and teacher. But what bugs me is that throughout the courses, the examples and labs cover fairly simple examples where everything fits into a single Notebook or a single Python file. What if there are multiple referenced files? e.g. in utils/utils_database, utils/utils_loader, etc.
What are the best practices in passing context to the LLM? I’m curious to know what workflow do people use to tackle this challenge. Be it via some LLM service (e.g. Github Copilot, ChatGPT) or “AI code editor” (e.g. Cursor), or even self-hosted (e.g. ollama ?)
@shernyap I am not sure this addresses your issue, but the most important lesson I’ve learned is you still need to know your code.
This is especially pertinent with your low-level languages like C.
Sure, the program might ‘run and work’, but you, the programmer have to understand every single detail of how/why it does so.
Otherwise you are setting yourself up (easiest, obvious example I can think of are SQL injection attacks). Or even though I was not the best at it, and though computers these days are quite fast, you still want to know ‘how to build a data structure’ and conduct ‘Big-O’ analysis.
Honestly, I think all this could, in the future, change. But I think we need an ‘AI’ oriented ISA.
I am not aware of anyone working on this type of problem though yet.
@shernyap as a concrete example… This is code with Cursor I’d tried to do in support of Karpathy’s GitHub - karpathy/LLM101n: LLM101n: Let's build a Storyteller. Yeah, it ‘works’-- But there are so many more subtle problems that I didn’t realize until I started looking at it more closely.
And just to give you a ‘hint’ where to look, there are some segments where it will ‘run some code’, but none of it has to do, at all, with the initial parse problem provided.
So like… why is this code even there ?
All I am saying is it can be dangerous if you don’t already know what you are doing.
Thanks @Nevermnd ! Yes, I am aware and will keep reminding myself to ALWAYS review the suggestions from the LLM. Recently just finished a course for Github Copilot and it was emphasized in almost every single module.
I think what I was looking for is more along the lines of “How to better collaborate with the LLMs to improve/speed up coding workflows”.
Here’re my thoughts after some exploring and reflecting on LinkedIn:
pulse/integrate-ai-copilot-code-development-workflow-shern-shern-yap-fqrmc/
Sorry, I can’t figure out how to declare that this linkedin belongs to me… It doesn’t let me post links.
In my mind-- The great advantage to using an LLM for programming is-- ironically, still to learn programming-- Not, as they say, ‘prompt engineering’.
The reason for this is then you have a solid understanding of coding and algorithmic structure. Then, much like a surgeon, in small very specific bits you can ask it to produce/reproduce the code you want and have greater rein on what it produces.
Not having knowledge of this and just using really ‘broad strokes’ to create the program you want-- It may compile and run, but there could also be all sorts of problems under the hood.