Context Optimization · seb1n/awesome-ai-agent-skills
Deduplicate and reorder retrieved context for a prompt
Deduplicates overlapping passages from a retrieved context set, scores each chunk for relevance and density, then reorders and allocates the token budget. Useful when RAG results are noisy or exceed the model's usable context length.
Good for
- Remove duplicate chunks from search results
- Score and reorder context by relevance
- Trim retrieved context to fit a token budget
- Source repository
- seb1n/awesome-ai-agent-skills
- Category
- Coding
Open-source skills are maintained by their authors and listed as published, with attribution. Results depend on how well the skill fits your task and material.
A good place to start
Deduplicate and reorder these retrieved chunks, then trim them to fit within a 4,000-token budget.

Make your next great thing.
Bring a question, a file, or an idea that’s not quite there yet.