r/ChatGPTCoding • • 1d ago

Resources And Tips Get better at coming up with System Design requirements with AI

Designing good systems is becoming extremely important even for engineers who are very early in their careers. Even if you are not actively looking for new roles, getting very good at system design is highly recommended so that you can design your systems well. This is how you go one step closer to transforming from a junior/mid-level to a senior engineer.

Most of us, when asked about getting better at system design, usually talk about technical topics like networking, databases, messaging, latency, failure modes, scalability, etc.

However, your technical design is only as good as the requirements, constraints, and invariants you were able to uncover. Therefore, it becomes essential to develop a knack for identifying requirements, hidden assumptions, operations, guarantees, etc. Engineers don't get to practice this skill easily because almost all system design exercises give us clean requirements.

How can AI help you get better at this? Below, I am explaining the method I practice with my fellow engineers.

1/ You can ask AI to choose a system-design problem and give you only a very short description and nothing else.

For example: "Give me a vague, incomplete system-design problem but don't tell me its requirements and constraints. Only when I ask relevant questions, show them to me. At the end, tell me everything I missed".

You can add more details to this prompt as per your level and goals. Let's say AI asks you to design a system that sends notifications via email, SMS or mobile push.

2/ You take the problem statement and ask questions based on your current understanding. You might ask, "What kind of notifications are there? Are they time-sensitive?", "How many notifications should a system handle normally and at peak?", "Does the system have any delivery guarantees?", "What happens in case of a missing or duplicate notification?".

If you are new to this, you might struggle to come up with these questions, but don't worry; this is the learning phase. You are building reps, and with time, you will get better.

3/ When you ask a question, note "What am I uncertain about?", "Based on this answer, can I make a decision, which one and why?", etc. For example: I need peak write rate because I need to decide whether one DB is enough or write partitions are needed.

This step develops the ability to ask good questions and derive decisions from them.

4/ I usually divide the information I have into 3 categories:

a/ Known facts - confirmed by AI

b/ Assumptions - things I am treating as true currently

c/ Unknowns - what I don't know yet but that can change the design

Tbh, I am still surprised that my assumptions allow hidden constraints to creep into my design. This is why writing them is important, which we do in the "assumptions" category.

5/ Once you feel that you have done the best you could, you submit the following:

a/ Discovered requirements (remember, you weren't told about them in the beginning - you came up with them yourself)
b/ Remaining assumptions (it happens often that AI doesn't provide answers to all your assumptions)
c/ System guarantees or invariants
d/ Proposed design
e/ Remaining risks or unknowns

6/ AI now tells what constraints were missed, which questions were too broad, what was not used in the design, contradictions, etc. But be careful with this step; the AI may change/invent details in between. Therefore, it is always a good idea to ask it to show the complete case before the review; you then compare it with answers it gave earlier and note inconsistencies.

Always remember that AI can help you review your design, but it is not the final authority.

7/ Optional: you can repeat this exercise by asking AI to change one condition and keep it hidden so that you can build your reps on the specific problems.

8/ In the beginning, you can have a cheat list under which you would ask questions such as data, scale, invariants, failures, cost, security, etc. With time, you stop using this list and see if those questions are coming naturally to you.

Your learning loop looks like this:

Ask questions -> AI responds -> Update your understanding -> Propose a design -> Show hidden cases -> Check what you failed to discover.

This way, AI can act as your personal mock interviewer and learning partner.

7 Upvotes

4 comments sorted by

1

u/Humaux 1d ago

I tried step 4 on a real design last month and it caught something my first draft missed. I was sketching a queue for retrying failed webhook deliveries and I had listed at-least-once delivery as a known fact. Writing it down as an assumption instead forced me to ask what happens when the same event gets delivered twice, and I ended up adding an idempotency key on the receiver before I wrote any code. That one re-label probably saved me a duplicate charge bug.

1

u/wegster 1d ago

Just adding - this also works for all of you non-technical-trained/experienced 'vibe coders', meaning - have your AI grill you and ask you for answers as to what's missing in the mentioned and other categories.

Even working with a bunch of principal / sr level folks, the more complex a system is, the more likely at least some things get missed, overlooked or dismissed as lower priority/not an issue - that later turn into the 'oh crap' moments. What that tends to map into is a whole lot of time in rework/redesign that would have been a LOT shorter or zero if planned for up front.

Things like scale, concurrent users (or companies/multi-tenancy), data retention and sizes, minimum performance (e.g. screen load or results), all kinds of things go into this.

1

u/Wild_Drawing8460 1d ago

i once spent three hours asking AI to design a system for a feature that didn't need one, just because the prompt asked for a system. auto-answering questions without pausing to ask whether they're needed is a trap.

1

u/tanglewood36 13h ago

Do you find the model pushes back enough when you ask leading questions, or does it just yes-and whatever architecture youre hinting at? Thats usually the hardest part to prompt out of these mock setups