Building Your Own AI Models Instead of Using Off-the-Shelf APIs: Lessons from Real-World Projects
In modern software development, integrating AI solutions is increasingly common. However, instead of merely relying on third-party APIs like GPT, some projects have opted for a more challenging route: building their own AI models. This article explores the architectures and lessons learned from these endeavors.
Nguyễn Mạnh Quý
Vạn vật thay đổi Vật chất lên ngôi

Building Your Own AI Models Instead of Using Off-the-Shelf APIs: Lessons from Real-World Projects
As AI tools become increasingly powerful and accessible, the general trend is to leverage existing services, especially large language models (LLMs) like GPT. However, this can sometimes lead to third-party dependency, lack of deep customization, and potentially escalating costs. Recently, I came across several articles on DEV Community sharing different approaches, focusing on building and fine-tuning AI models for specific tasks, rather than just wrapping external APIs. This is a thought-provoking direction for those who want more comprehensive control over their AI solutions.
AI Interview Grader: Controlling Evaluation Quality
The article 'How We Built Our Own AI Interview Grader (No GPT)' by Peakblick on DEV Community clearly illustrates the process of building an automated interview grading system without relying on GPT. The core problem they addressed was how the system could accurately evaluate a candidate's answer, determining if it truly solved the problem posed by the question or was merely flowery language. This requires high consistency, speed, and accuracy.
Instead of using GPT, they chose to train their own generative model from scratch. This allowed them to deeply customize how the model understands and evaluates answers, ensuring it focuses solely on the predefined evaluation criteria for each question. This architecture required the team to invest significant time and resources into data collection, preparing training datasets, and fine-tuning the model. However, the benefit gained was complete control over business logic, performance, and data security.
Practical Value for Developers: If you are building an application that requires consistent evaluation or classification of input data according to strict business rules, considering training a small, specialized model yourself can be more effective than using a general-purpose LLM. It can help reduce latency, control costs, and enhance security. You should start by clearly defining evaluation criteria and preparing high-quality training data.
CSEHub: Scope-Limited AI Assistant
Another project, CSEHub, introduced in the article 'Hacktoberfest Submission', also adopts a smart approach with an AI Assistant. CSEHub's goal is to create a computer science learning platform where users can read articles and interact with an AI assistant. The key differentiator is that this AI Assistant has a strictly limited query scope.
Instead of allowing users to ask anything, which could lead to unfocused 'doomscrolling', CSEHub's assistant is only permitted to retrieve information from the specific article the user is currently reading. It is explicitly instructed to answer solely based on excerpts from that article. This helps keep the learning process focused and efficient, preventing users from getting sidetracked.
Practical Value for Developers: When integrating AI into content or knowledge applications, consider setting intelligent constraints for the AI assistant. Instead of a black box that can answer anything, create an AI 'expert' in a narrow domain. This technique, also known as Retrieval-Augmented Generation (RAG) with tightly controlled data sources, is a powerful strategy. It helps ensure the accuracy and relevance of information while minimizing the risk of the AI 'hallucinating' information.
Daylight Left: An Offline Tool Focused on Specific Needs
The article 'Daylight Left: an offline sunset clock that tells you where to go before dark' showcases another aspect of tool building: prioritizing simplicity, offline capability, and addressing a very specific need. This tool is a command-line interface (CLI) application that helps users know how much daylight is left and suggests favorite places to enjoy it.
Notably, it operates entirely offline, requiring only a list of favorite locations stored as plain text. While not a complex AI project in the traditional sense, it demonstrates that sometimes the best solution doesn't require flashy AI but rather focuses on effectively solving a real-world problem.
Practical Value for Developers: Don't hesitate to build small, simple, and offline tools if they solve a specific problem for users. In an increasingly connected world, standalone, reliable, and network-independent solutions can have their own unique value. Always ask yourself: 'What is the simplest possible solution to this problem?' instead of immediately thinking of complex technologies.
Architectural Insights and Next Steps
Through the three examples above, we observe a significant trend: a shift from merely using off-the-shelf AI APIs to building and customizing specialized AI components. This is a natural progression as organizations increasingly understand their needs and desire better control over performance, cost, security, and customization capabilities.
For developers and system architects, this presents several opportunities and challenges:
- Deep Customization: Instead of ceding all logic to an external model, you can fine-tune your model to fit specific business contexts.
- Cost Control: Training and deploying small, specialized models can be more cost-effective than calling APIs of massive LLMs for every task.
- Data Security: Sensitive data can be processed internally, minimizing the risk of external leakage.
- Expertise Requirements: This approach demands teams with deeper knowledge of Machine Learning, Data Engineering, and MLOps.
Recommendation: For new projects, start by thoroughly evaluating whether an off-the-shelf AI solution meets your requirements. If not, consider methods like RAG with tightly controlled data sources, or, if necessary, invest in training custom models. Always weigh the costs, development time, and long-term benefits.