Talk

Context Window Optimization Guide

From Wikiprompt, the free prompt encyclopedia

宝玉
Contributed by宝玉XSource

Nov 22, 2023

Context Window Optimization Guide A data-driven guide on optimizing context window usage for GPT-4 and Claude, with specific token limits and system prompt placement recommendations.

Prompt ContentSave

🌐
1. GPT-4-128K: No information loss when context < 73K tokens. Beyond 73K, information in the middle 7%-50% may be forgotten. 2. Claude-2.1-200K: Best under 24K context, degrades after 24K, very poor after 90K. 3. Keep context short; split long texts manually or automatically. For GPT-4, don't exceed 73K (input + output combined). 4. System Prompt can be at the beginning or end; placing it at the end is better. 5. If System Prompt is at the beginning, for GPT-4 keep it under 5% of context; for Claude, under 1%. 6. GPTs' prompts must be at the very beginning, so keep them under 5% (e.g., 128 * 0.05 = 6.4K tokens).

Sign in to see the full prompt

Continue with:

By logging in, you agree to our Terms of Use and Privacy Policy

Usage

This prompt is designed for use with research. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:research| twitter| gpt-4| claude

Talk