AI Collaboration
7 min

AI Thinking Pattern Quirks: Why Scalability Issues Go Unnoticed

Learn why AI tends to overlook scalability issues and how to guide it toward better design decisions, based on real implementation experiences.

AI DevelopmentScalabilityDesign PatternsClaudeChatGPT

During the implementation of NEWS and TIPS sections, an interesting phenomenon occurred. The AI initially chose to store all articles in a single JSON file. While this works as a "functional implementation," it didn't consider the premise that content would continuously grow.

From this experience, let's explore AI thinking patterns and methods to guide better design decisions.

Why AI Overlooks Scalability

1. Context Limitations

AI tends to focus on making things "work right now."

json
// Structure initially proposed by AI
{
  "articles": [
    { "id": 1, "title": "Article 1", "content": "..." },
    { "id": 2, "title": "Article 2", "content": "..." },
    // What happens with 100, 1000 articles...?
  ]
}

This design works fine for 10 articles, but as articles grow, file size balloons, causing:

  • Increased memory usage: Loading all articles just to display a list
  • Performance degradation: Parsing time increases with file size
  • Development inefficiency: Frequent conflicts when multiple people edit

2. Optimization Priorities

AI prioritizes "simple and understandable" implementations:

javascript
// AI's idea of "simple" implementation
const articles = await fetch('/data/news.json').then(r => r.json());
const latest = articles.slice(0, 10);

Indeed simple, but what if there are 1000 articles?

3. Implementation Thinking Differences

Human developers naturally think "what will happen in the future," while AI focuses on "solving the current task."

Human thinking: "News articles will be added daily, eventually reaching hundreds..."

AI thinking: "I'll implement article display. Storing as an array in JSON is simple."

Strategies for Better Design

1. Provide Explicit Constraints

markdown
# ❌ Vague instruction
"Implement a news feature"

# ✅ Clear constraints
"Implement a news feature:
- Articles will grow over time (target: 1000+ articles)
- Display 10 articles per page with pagination
- Frequent article additions and edits
- Consider simultaneous editing by multiple users"

2. Request Design Review

Ask for design proposals before implementation:

markdown
"Before implementation, provide a design proposal including:
1. Data structure
2. File organization
3. Performance considerations at 100, 1000 article scale
4. Operational challenges and solutions"

3. Reference Best Practices

markdown
"Implement following these best practices:
- Split large content into individual files
- Separate index and detail data
- Design to load only necessary data"

Correct Implementation Example

File Structure

/public/data/news/
├── index.json          # Metadata only (lightweight)
└── articles/           # Individual article files
    ├── 2025-06-16-001.json
    ├── 2025-06-16-002.json
    └── ...

Index File (Lightweight)

json
// index.json - metadata only
{
  "articles": [
    {
      "id": "2025-06-16-001",
      "date": "2025-06-16",
      "title": "Article Title",
      "excerpt": "Summary text"
      // No content included
    }
  ]
}

Individual Article Files

json
// articles/2025-06-16-001.json
{
  "id": "2025-06-16-001",
  "title": "Article Title",
  "content": "Full article content...",
  "author": "Author Name",
  "tags": ["AI", "Development"]
}

Implementation Code

typescript
// List display (load lightweight index only)
export async function getNewsList(): Promise<NewsIndex> {
  const res = await fetch('/data/news/index.json');
  return res.json();
}

// Detail display (load only needed article)
export async function getNewsDetail(id: string): Promise<NewsArticle> {
  const res = await fetch(`/data/news/articles/${id}.json`);
  return res.json();
}

// Pagination support
export async function getNewsPage(page: number, limit: number = 10) {
  const index = await getNewsList();
  const start = (page - 1) * limit;
  const end = start + limit;
  
  return {
    articles: index.articles.slice(start, end),
    totalPages: Math.ceil(index.articles.length / limit),
    currentPage: page
  };
}

Comparison of Benefits

Single File Approach

- ✅ Simple implementation - ❌ Scalability issues - ❌ Increasing memory usage - ❌ Edit conflicts

Split File Approach

- ✅ High scalability - ✅ Efficient memory usage - ✅ Easy parallel editing - ✅ Optimized CDN caching - ❌ Slightly complex initial implementation

Tips for AI Collaboration

1. Explain "Why"

markdown
"Split articles into individual files.
Reason: We plan to handle 1000+ articles in the future,
and a single file would degrade performance."

2. Provide Specific Numbers

markdown
"Design this system for the following scale:
- Article count: 1000+
- Monthly additions: 30-50
- Concurrent editors: 3-5"

3. Discuss Trade-offs

markdown
"What's your opinion on the trade-off between
implementation complexity and scalability?"

Conclusion

AI is an excellent coding partner, but humans need to complement its long-term perspective and scalability considerations.

    Key Points:
  1. AI tends to prioritize "works now" implementations
  2. Scalability must be explicitly requested
  3. Design-phase review is crucial
  4. Provide specific constraints and numbers

By understanding AI characteristics and guiding appropriately, we can achieve better design and implementation. This experience will enable better collaboration in future projects.