Skip to content

[New Skill]: Context-Window Optimizer #44

@rosspeili

Description

@rosspeili

Skill Name

optimization/context_optimizer

What should this skill do?

Large context windows (e.g., 2M tokens) are available but are slow and extremely expensive for repetitive tasks. This skill sits directly in front of the LLM. It takes a massive document and a specific query, runs a rapid, low-cost local embedding search (like a mini-RAG cycle), and returns only the most relevant sections of the document to the main agent, saving massive compute costs on looping tasks.

Ideal Inputs & Outputs

Input:
{
"document_text": "[... 500 pages of text ...]",
"agent_goal": "Find the jurisdiction clauses for data handling.",
"max_tokens_return": 2000
}

Output:
{
"optimized_context": "[... Only the 3 pages relevant to jurisdiction & data handling ...]",
"reduction_percentage": "94%"
}

Targeted Models (if applicable)

Model Agnostic (All)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestskill requestRequest for a new capability to be added.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions