Develop a website-based AI assistant capable of answering questions with precision while minimizing the operational costs of cloud AI services.
I began by selecting OpenAI API calls for my AI platform, as they are inexpensive, reliable, and cost-effective. From there, I set up a backend using a free service called Render. Since it is free, the speed, processing, and memory are minimal, but for a prototype, that was fine, as my website does not require much. I then worked with ChatGPT, which generated the frontend code that I integrated and used to handle styling and communication with the backend. In the backend, the system takes the user’s question, the page they are on, and some previous chat history, and then asks GPT-5 Nano to determine which specialized AI model the request should be directed to. For general questions, it routes to a model with minimal information; for general AI questions, it directs users to a slightly more knowledgeable model; and for project-specific questions, it routes users to the most knowledgeable model in that area. Once everything is authenticated, the system runs the specialized model and returns the response. This approach reduces costs because the bulk of expenses comes from the vectors that hold the knowledge. By splitting the information into smaller, specialized sets and routing them accordingly, the vectors are significantly smaller than a single all-knowing model, making the system more cost-efficient while maintaining the same, if not better, level of knowledge.
One of the main challenges I faced was connecting the frontend to the backend and ensuring the system was secure so that no one could steal my API calls. To accomplish this, I relied on ChatGPT to generate the necessary code and then set up and configured several safety measures, including CAPTCHA, IP logging, a daily message limit, and restrictions that prevent unrelated questions from being processed. By integrating these features, I created a system that I believe is secure and resilient, making it difficult for anyone to exploit.
OpenAI API, Render, ChatGPT, HTML, CSS, CAPTCHA, Security features.
The project yielded a working prototype of a cost-efficient, multi-model AI assistant that now operates on my website and serves as a baseline for the company’s professional system. It demonstrated that routing across smaller, specialized models can significantly reduce costs while maintaining accurate and knowledgeable responses.
This project taught me how to balance cost, security, and performance when setting up an AI system, and it provided me with hands-on experience in designing a solution that works both as a prototype and as a foundation for more advanced applications.