Prepare for a system design question about an AI playground that stores, versions, runs, and retrieves very large prompts. The prompt focuses on metadata versus blob storage, consistency boundaries, caching, run records, and latency optimization.
Design an AI playground that lets users create, edit, run, and revisit prompts. The interviewer is especially interested in how the system handles very large prompts, when prompt content should move out of the primary database into object storage, and how to optimize read and run latency.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
### Constraints & Assumptions
- Prompt content can range from small snippets to very large documents.
- Users need to save versions and run prompts against an external model service.
- The system should support retrieval of recent prompt versions and historical runs.
- Object storage is available, but it adds another consistency boundary.
### Clarifying Questions to Ask
- What maximum prompt size should be supported?
- Do users need real-time collaboration or only single-user editing?
- Should old prompt versions be immutable?
- What latency matters most: loading the editor, submitting a run, or reading history?
### What a Strong Answer Covers
```premium-lock What a Strong Answer Covers
```
### Follow-up Questions
- How would the design change for collaborative editing?
- How would you deduplicate repeated large prompt prefixes?
- How would you support audit and retention requirements?
- What would you do if object storage latency dominates run submission?
Quick Answer: Prepare for a system design question about an AI playground that stores, versions, runs, and retrieves very large prompts. The prompt focuses on metadata versus blob storage, consistency boundaries, caching, run records, and latency optimization.
Design an AI playground that lets users create, edit, run, and revisit prompts. The interviewer is especially interested in how the system handles very large prompts, when prompt content should move out of the primary database into object storage, and how to optimize read and run latency.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
Constraints & Assumptions
Prompt content can range from small snippets to very large documents.
Users need to save versions and run prompts against an external model service.
The system should support retrieval of recent prompt versions and historical runs.
Object storage is available, but it adds another consistency boundary.
Clarifying Questions to Ask Guidance
What maximum prompt size should be supported?
Do users need real-time collaboration or only single-user editing?
Should old prompt versions be immutable?
What latency matters most: loading the editor, submitting a run, or reading history?
What a Strong Answer Covers Premium
Follow-up Questions Guidance
How would the design change for collaborative editing?
How would you deduplicate repeated large prompt prefixes?
How would you support audit and retention requirements?
What would you do if object storage latency dominates run submission?