I'm working on a project where we need a chatbot that can answer technical questions by analyzing a large legacy PHP codebase. Unfortunately, there's no documentation or knowledge base available, so the chatbot needs to comprehend the code itself to explain processes, like how to remove a course or where enrollment is handled. The team often gets distracted from their work to dig through the legacy code, responding to questions like these can be frustrating, and since no one has quick answers, it's a challenge. I've been testing IDE-based AI tools like Copilot on my own, and they usually provide surprisingly accurate explanations. This chatbot would function in a GUI environment, allowing non-developers to ask questions in natural language and receive answers generated from the actual code. If you've tackled something similar, what strategy would you recommend?
2 Answers
I think creating an AI chatbot for this is ambitious but definitely doable! You should consider using language models that can be trained on your specific codebase, which may include using tools like GitHub Copilot to help build the right training data. This way, it could analyze and generate contextually relevant answers for your users. Also, setting up some form of continuous learning from user interactions with the chatbot would be critical as well. This way, it can improve over time!
While using AI might seem like a good shortcut, it seems like a band-aid for a bigger issue. If your team can't manage the legacy code well now, relying on AI might not fix the root problems. You might want to encourage your team to invest time in understanding the codebase itself. Maybe try a short-term project to get everyone up to speed before going the AI route. Just my two cents!

That's understandable, but with the main developer retiring soon, the urgency for quick answers has increased. An AI assistant might help bridge the gap until the project is fully modernized.