Skip to content

Commit 8f92ce1

Browse files
Update prompting/maximize-token-efficiency.mdx
Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
1 parent 06cba73 commit 8f92ce1

1 file changed

Lines changed: 41 additions & 43 deletions

File tree

prompting/maximize-token-efficiency.mdx

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -61,73 +61,71 @@ CodinIT has buttons and menus that don't use tokens:
6161
✅ "Add user authentication with: 1) Login form, 2) Registration form, 3) Password reset, 4) Protected routes"
6262
```
6363

64-
## Key Efficiency Techniques
64+
## Smart Ways to Save Tokens
6565

6666
### Use Discussion Mode for Planning
6767

68-
Switch to discussion mode when you need guidance without code implementation:
68+
When you just want to talk and plan (not write code), use discussion mode:
6969

70-
- **Planning Phase**: Use discussion mode to plan features before implementing
71-
- **Architecture Decisions**: Get advice on system design and technology choices
72-
- **Code Review**: Discuss code improvements without making changes
73-
- **Learning**: Ask questions and get explanations without consuming implementation tokens
70+
- **Planning**: Talk about features before building them
71+
- **Getting advice**: Ask which tools to use
72+
- **Code review**: Discuss improvements without changing code
73+
- **Learning**: Ask questions without generating code
7474

75-
### Strategic Development Approach
75+
### Plan Before You Build
7676

77-
**Plan Before You Build:**
77+
**Think first:**
7878

79-
- Outline your application structure and features upfront
80-
- Break complex projects into manageable phases
81-
- Identify potential challenges before implementation
82-
- Create a development roadmap to guide your work
79+
- Write down what your app should do
80+
- Break big projects into small pieces
81+
- Think about problems you might face
82+
- Make a plan for what to build first
8383

84-
**Iterative Development:**
84+
**Build step by step:**
8585

86-
- Implement features incrementally rather than all at once
87-
- Test and validate each component before moving to the next
88-
- Use version control to track progress and enable rollbacks
89-
- Focus on core functionality before adding advanced features
86+
- Add one feature at a time
87+
- Test each piece before moving on
88+
- Use Git to save your progress
89+
- Build the main features first, fancy stuff later
9090

91-
### Error Handling Strategies
91+
### Don't Waste Tokens on Errors
9292

93-
**Avoid Repeated Fix Attempts:**
93+
**When something breaks:**
9494

95-
- Don't repeatedly click "Attempt fix" for the same error
96-
- Analyze error messages to understand root causes
97-
- Use discussion mode to get guidance on complex issues
98-
- Implement proper error handling in your code to prevent future issues
95+
- Don't keep clicking "fix" over and over
96+
- Read the error message to understand what's wrong
97+
- Use discussion mode to ask for help
98+
- Add error handling so it doesn't break again
9999

100-
**Add Comprehensive Error Handling:**
100+
**Prevent errors:**
101101

102-
- Include detailed logging to understand error patterns
103-
- Implement graceful error states in your UI
104-
- Add input validation to prevent common errors
105-
- Use try-catch blocks appropriately in your code
102+
- Add logging to see what's happening
103+
- Show friendly error messages to users
104+
- Check user input before using it
105+
- Use try-catch to handle errors gracefully
106106

107-
### Project Size Management
107+
### Keep Your Project Small
108108

109-
**Optimize Project Structure:**
109+
**Organize your files:**
110110

111-
- Keep files under 500 lines when possible
112-
- Split large components into smaller, focused modules
113-
- Remove unused dependencies and code
114-
- Use efficient data structures and algorithms
111+
- Keep files under 500 lines
112+
- Split big files into smaller ones
113+
- Delete code you're not using
114+
- Use simple, efficient code
115115

116-
**Context Window Management:**
116+
**Manage context:**
117117

118-
- Be mindful of how much context your project provides
119-
- Use specific file references instead of broad requests
120-
- Clean up chat history when conversations become too long
121-
- Focus on specific components rather than entire applications
118+
- Don't include your whole project in every request
119+
- Reference specific files instead
120+
- Start a new chat when conversations get too long
121+
- Focus on one part of your app at a time
122122

123123
<Callout type="info">
124-
**Discussion Mode**: Use discussion mode for planning, architecture decisions, and getting guidance without
125-
implementing code changes.
124+
**Discussion Mode**: Use this when you want to talk and plan without writing code. It saves tokens!
126125
</Callout>
127126

128127
<Callout type="tip">
129-
**Version Control**: Leverage Git/version control features to manage project state without consuming AI tokens for
130-
undo operations.
128+
**Use Git**: Save your work with Git instead of asking AI to undo things. It's free!
131129
</Callout>
132130

133131
## Model Selection Strategies

0 commit comments

Comments
 (0)