Globally, the software industry is projected to grow by 31% in the next few years. Despite the ongoing recession, there is a substantial population of aspiring developers who wish to get into top tech companies. As a result, clearing Technical interviews is a big challenge.
AI Chatbots like chatGPT can greatly help with interview preparation. However, the issues associated with them are
Extracting the question data from the raw HTML page of each platform was a significant challenge since each question div had children elements which also needed to be extracted for reading the text present inside.
Getting the element and it's classname was fairly straightforward using devtools. Once that was done, with help from ChatGPT, I created a function that recursively extracts each element until it finds the text present inside, and append it to a string.
Preserving each message after the extension was closed. Also needing to preserve chats based on the question from each platform.
Solving the former was quite simple by using localstorage. However, the way it is used on chrome extension is slightly different from the usual syntax. For solving the latter, I extracted the platform and question title from the url, and added them to the messages key, thereby creating unique localstorage objects for each question
Creating prompts that yielded the most desirable responses. In most cases, a direct prompt like "give me a hint", won't give the response you'd expect. The model often gives the full solution when asked for a hint. So designing the prompts was a challenge
I researched a bit about prompts, and found some public github repos with sample prompts. I also created placeholder texts for these pre-defined prompts so that the user experience is not ruined due to the large text from the prompts.