I'm working on a project that involves creating a chatbot capable of answering technical queries based solely on a large, legacy PHP codebase. Since there's no available documentation or knowledge base, the chatbot will need to comprehend the code itself to explain how various functionalities work. For instance, it should be able to respond to questions like "How do we remove a course?" or "Where is enrollment handled?" Unfortunately, our team is often interrupted while trying to decipher the legacy code, as nobody can answer these questions off the top of their head. I've tested some IDE-based AI tools, like GitHub Copilot, which often provide really accurate explanations. This gives me hope that a dedicated chatbot could be a game-changer. I'm envisioning the chatbot as a GUI interface, allowing non-developers to ask questions in natural language and receive answers generated from the actual code. If anyone has experience with this type of project, I would love to hear your suggestions on the best approach.
4 Answers
Using GitHub Copilot as a coding assistant is an option, but you mentioned wanting a chatbot specifically for end-users. That’s a fascinating direction! You could leverage tools like Rector or PHPStan during the development phase to understand the code better. Then, train your chatbot on those insights to provide more accurate responses.
It sounds like a cool project, but I have to wonder if relying solely on AI is the best way to handle this problem. Isn't there a risk that if you're constantly depending on AI to navigate the code, the team won't actually understand it themselves? It might be worth investing some time into documenting the code as you modernize it, so you don't hit a wall down the line when the 'knowledge holder' retires.
Honestly, have you tried just diving into the code yourself? I mean, we've managed to do it without AI for years. Sure, it’s tedious, but at least you gain a better understanding of how everything works. And who knows, you might find some interesting stuff along the way!
I'm curious — are you strictly talking about creating a chatbot for your GUI? If that's the case, you might want to build specific functions that directly address common queries instead of relying on broad AI responses. It might keep the answers more concise and useful.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically