What problem does it solve?
AI models often receive redundant, low‑relevance, and poorly ordered context, which wastes tokens and degrades answer quality. This skill refines raw context to ensure every token contributes meaningfully to the task.
Core Features & Use Cases
- Deduplication: Detects and removes overlapping or duplicate passages using semantic similarity or n‑gram overlap.
- Relevance & Density Scoring: Assigns utility scores that combine relevance to the query and information density per token.
- Filtering: Discards low‑utility chunks while preserving coverage of essential topics.
- Priority Reordering: Places the most useful chunks at the beginning and end of the context block to mitigate the “lost‑in‑the‑middle” effect.
- Coverage Validation: Ensures the optimized context still answers all sub‑questions of the user's query.
- Use Cases: RAG pipelines, multi‑turn agent conversations, code‑base analysis, and any workflow needing token‑efficient context.
Quick Start
Use the context‑optimization skill to refine your retrieved documents by providing the raw chunks, the user query, and the token budget.