← Back to Library
ChatGPTAdvancedContext Engineering

RAG Context Density Optimizer

Removes noise from multiple document chunks and densely reconstructs only core information to save LLM context window limits.

❀️ 950 likes

πŸ“‹ Full Prompt

The following are multiple document chunks extracted from a search engine. Remove all unnecessary information (noise) for answering the [question], and generate a single compressed context that integrates only the fact-based core information. [Document Chunks] [Expected length after compression]: Maintain less than 30% of the original length [Constraints]: Do not make up new facts, and maintain the causal relationship of the contents.

πŸ’¬ Input Example

5 Collected Chunks (About 3000 characters)

✨ Output Example

Compressed context (About 800 characters): Clear paragraphs organized into core facts 1, 2, 3.

🏷️ Tags

#context compression#token optimization#context engineering

πŸ’‘ Usage Tips

  • βœ…Replace the variables in brackets ([]) with your specific situation.
  • βœ…Specify the desired tone and length of writing for more accurate results.
  • βœ…Request additional modifications based on the generated output to improve quality.
  • βœ…Specifying a particular audience allows AI to adjust vocabulary and explanation level.

πŸ”— Related Prompts

Effective Writing Strategies with AI

AI writing prompts let you efficiently produce blog posts, business emails, press releases, novels, and more. The key is to assign AI a precise role, and clearly specify the desired tone, length, and target audience. For example, requesting "write a 2000-word SEO-optimized blog post in a professional tone" yields significantly higher-quality output. After generating a draft, iterative feedback helps elevate the final quality step by step.

This prompt belongs to the Context Engineering category, optimized for ChatGPT at a Advanced level. It is systematically designed applying core prompt engineering principles: role assignment, context setting, and constraints.

Explore More Prompts

Discover 90+ verified prompts in the PromptGenie library.

Browse Library