LLM Model Selection
Overview
Yeedu allows you to select different Large Language Models (LLMs) on a per-cell basis in notebooks. Choose the best model for each cell's task to optimize performance and cost.
Available Models
Model Options
| Model | Best For | Speed | Cost | Context |
|---|---|---|---|---|
| GPT-4 | Complex tasks, reasoning | Medium | High | 128K tokens |
| GPT-3.5 | Quick suggestions, summarization | Fast | Low | 16K tokens |
| Claude | Code analysis, documentation | Medium | Medium | 100K tokens |
| PaLM | Creative tasks, translation | Medium | Medium | 30K tokens |
| Local Model | Privacy, cost-free | Fast | Free | Limited |
Model Capabilities
GPT-4
- Advanced reasoning
- Complex problem-solving
- Code generation and debugging
- Multimodal input (text + images)
GPT-3.5
- Fast inference
- Good for simple tasks
- Lower token usage
- Cost-effective
Claude
- Excellent code understanding
- Long context windows
- Good for documentation
- Constitutional AI alignment
Selecting Model Per Cell
Change Cell Model
- Open notebook cell
- Click Model Selector dropdown
- Choose model from list
- Selection saved for this cell
Default Model
Set default model for all new cells:
- Go to Notebook Settings
- Find AI Assistant section
- Select Default LLM Model
- New cells use this model
- Can override per cell
Model Indicator
- Cell shows current model in small label
- Indicator color indicates model tier
- Gold: Premium (GPT-4)
- Blue: Standard (GPT-3.5)
- Green: Alternative (Claude, others)
Using AssistantX with Model Selection
Single Model Task
- Select cell
- Choose specific model
- Write prompt for AssistantX
- Model processes your request
- Review generated response
Multi-Model Comparison
Compare models for same task:
- Create 3 cells with same code request
- Assign different models to each cell
- Run all cells
- Compare results side-by-side
- Choose best output
Cost Considerations
Model Pricing
- GPT-4: Higher cost (~$0.03 per 1K tokens)
- GPT-3.5: Lower cost (~$0.0005 per 1K tokens)
- Claude: Medium cost (~$0.008 per 1K tokens)
- Local Model: No API cost (free)
Optimization Strategy
- Use GPT-3.5 for simple tasks
- Use GPT-4 only when needed
- Use Local Model for frequent, simple requests
- Monitor token usage
Model Selection Guide
When to Use GPT-4
- Complex code generation
- Debugging intricate problems
- Multi-step reasoning required
- First-time complex tasks
When to Use GPT-3.5
- Quick suggestions
- Simple code completion
- Error messages explanation
- Learning resources
When to Use Claude
- Code review and refactoring
- Documentation writing
- Deep code understanding
- Technical explanation
When to Use Local Model
- Frequent, simple operations
- Offline operation needed
- Privacy-sensitive tasks
- Budget constraints
Advanced Configuration
Token Usage Tracking
View token usage per model:
- Click cell with AI output
- See Tokens Used stat
- Track across cells
- Monitor total monthly usage
Model Parameters (Advanced)
For each model, configure:
- Temperature: Creativity (0=deterministic, 1=creative)
- Max Tokens: Response length limit
- Top-P: Diversity control
- Frequency Penalty: Repetition reduction
Default settings work for most cases.
Model Context Window
What is Context Window?
Maximum tokens the model can read:
- GPT-4: 128K tokens (~100 pages)
- GPT-3.5: 16K tokens (~12 pages)
- Claude: 100K tokens (~75 pages)
Using Large Context
For large codebases:
- Select Claude (100K context)
- Include full codebase context
- Model understands full scope
- Provides better suggestions
Switching Models Mid-Workflow
Change Model for Task
If current model isn't working well:
- Select new model for cell
- Re-run with different model
- Compare outputs
- Keep the better result
Model Limitations
Know the Boundaries
- Models can make mistakes
- Always verify generated code
- Context window limits large files
- Token limits affect response length
- API availability may vary
When Models Struggle
If getting poor results:
- Try different model
- Provide more context
- Simplify the request
- Break into smaller tasks
Best Practices
Model Selection Strategy
✓ Do:
- Match model to task complexity
- Use cheaper models when possible
- Test different models for comparison
- Monitor total token usage
- Consider latency for notebooks
✗ Don't:
- Always use premium models
- Ignore cost implications
- Use very large models for simple tasks
- Forget to verify output
- Exceed API rate limits
Workflow Optimization
- Start with GPT-3.5
- Upgrade to GPT-4 if needed
- Compare models side-by-side
- Save best-working models for templates
- Document model choices for repeatability
Troubleshooting
Model Not Available
- Confirm model subscription
- Check API credentials configured
- Verify region availability
- Try different model
Poor Quality Output
- Provide more context
- Try different model
- Rephrase the request
- Break into smaller tasks
Slow Response
- Reduce context size
- Use faster model (GPT-3.5)
- Check API status
- Monitor network latency
See Also
- AssistantX Overview
- [Create Notebook](./Create notebook.md)
- [Editor Pane](./Editor Pane.md)