top of page

AI-Powered Management Decision Support System (MDSS) Development Notes2

Jun 28
2 min read


Nothing appeared in the chat window last time because it was caused by a Gemini API 429 error. I investigated the issue further and identified three points: one root cause, one related architectural issue, and one additional UI fix.


1. Investigating the Gemini API 429 Error

When entering text into the chat window, the application returned a 429 RESOURCE_EXHAUSTED error. After investigating, I found that the quota for the gemini-2.0-flash model had effectively been set to 0. I couldn't understand why simply typing "Hello" immediately triggered such an error. I checked the Gemini API dashboard and found that the API had been used more than 150 times. After waiting until the next day, the dashboard showed that the daily quota had been reset, yet the same error still occurred. Suspecting a problem with my logic, I reviewed the code and discovered that the application was still using gemini-2.0-flash. After changing the model to gemini-2.5-flash, the application responded normally again. To be honest, it was an embarrassingly basic mistake.


2. Revising the MDSS Architecture

My original design followed the flow of User Action → AI Analysis → Display Results. However, this architecture created issues with API limits, operating costs, and response time. I changed the design to User Action → Database → Display Results, using AI only when an update is requested. As a result, API usage was reduced, response time improved, and the system became much more stable.


3. Fixing the Streamlit Layout Issue

Another issue was a large blank area displayed below the chat input box. After investigating, I found that the chat history was being rendered twice. Removing the unnecessary rendering block eliminated the extra blank space.


What I Learned Today

After experiencing a development style where AI writes the code while humans review it and improve the design, I believe it is possible to develop software without being an expert programmer. However, if you cannot at least understand what the generated code is doing, development quickly comes to a standstill. Although I am still learning Python, I honestly felt embarrassed that I failed to notice something as basic as using the wrong model and leaving redundant Streamlit code behind.

Comments


bottom of page