Small Models + Agent Skills: A Localized POMDP Evaluation Framework

    This article examines whether Agent Skills frameworks, originally designed for cloud-scale large language models, can be effectively deployed on locally hosted small language models under strict compliance and data isolation constraints. We introduce a Partially Observable Markov Decision Process (POMDP) perspective to model the skill selection and execution workflow, breaking down each skill into a structured tuple representation. The discussion covers a tiered model routing strategy, a lazy-loading mechanism for context resources, and engineering practices for skill library governance, context budget management, and observability. We conclude with a quantitative evaluation methodology designed to answer the core question: under finite hardware budgets, how should model size, routing logic, and skill library organization be optimized for reliable task completion.

    1. Background: Can the Agent Skills Framework Be Extended to Local Small Models?

    The Agent Skills framework has demonstrated strong task orchestration capabilities on cloud-based, large-scale language models: the model selects skills based on user intent, reads skill descriptions, invokes tools, and executes multi-step workflows. In industrial deployments, however, the most challenging issue is not “how high the performance ceiling is” but “whether the solution can pass compliance, budget, and data isolation reviews.” In projects subject to strict compliance, strong isolation, or policies requiring data to remain within a controlled network boundary, solutions that continuously depend on public APIs are often rejected during the review phase. At the same time, building a fully self-contained system from planning to execution introduces significant development cycles and maintenance costs.

    This raises a core question: can the Agent Skills framework, originally built for giant models, be transferred to open-source small language models running locally, delivering a comparable performance boost? Experience alone cannot answer this. The “model intuition” must be converted into quantifiable engineering metrics: task success rate, context consumption, number of tool calls, end-to-end latency, failure recovery rate, hardware footprint, and per-task cost. Only by incorporating these metrics into a unified evaluation can we determine, given a limited hardware budget, which model size to choose, how to configure routing, and how to structure the skill library.

    A common misconception is that small models lack the capability, rendering the entire skills framework unusable. A more nuanced view is that small models are not suited to carrying out all planning and validation independently, but they are well suited for high-frequency, clearly bounded, and verifiable sub-tasks, such as intent classification, skill retrieval, parameter extraction, simple tool invocation, and output format validation. By decomposing a complex system into layers of “skill representation, information revelation, execution, verification, and escalation,” the combination of small models and Agent Skills becomes viable—provided it is supported by careful POMDP-style modeling and routing design.

    2. Why Reframe Agent Skill Systems as a POMDP?

    An Agent skill system is, in essence, a controller that performs information-seeking in a partially observable environment. The agent does not have access to the complete task state: the user’s true intent may be ambiguous, the task stage may be hidden in conversation history, and environmental facts may not yet have been revealed by tool calls. At every step, the agent must weigh “continuing execution” against “acquiring more information,” all while consuming limited attention and context resources.

    This system can therefore be modeled as a partially observable Markov decision process, with information-gathering actions explicitly included. Its key elements are:

    • State (S): The possibly hidden task context, including user intent, task stage and progress, environment facts not yet retrieved, and whether skill preconditions are satisfied.
    • Observation (O): What the agent can access at time t, such as the current user message, history, loaded skill descriptions, revealed reference resources, and tool outputs.
    • Action (A): Skill selection, context acquisition (with an associated cost), skill execution, environment or tool invocation, and internal planning and reasoning.
    • Belief state: The agent’s probabilistic estimate of the hidden state, based on historical observations and past actions.
    • Cost: Context window consumption, time spent on information revelation, tool call latency, and the risk of erroneous execution.

    Within this framework, “revealing more skill information” is not a free action—it exchanges additional context cost for a more accurate observation. This is especially critical for small models: their context budget is limited, and loading all skill descriptions and reference resources into the prompt at once can dilute key information and increase the probability of mis-selection. The POMDP perspective requires the system to reveal information on demand: first retrieve candidate skills using short descriptions, then decide—based on confidence and information gain—whether to load references or escalate to a larger model for verification.

    3. A Triplet Representation for Skills and Its Engineering Implications

    Each skill can be abstracted as a triplet: a text descriptor, an internal policy, and a reference mechanism.

    1. Text descriptor: Contains the skill name and a short description, used for retrieval and discrimination. For small models, descriptors should be “short yet strongly discriminative,” avoiding high overlap between synonymously described skills. Engineering practice should establish naming conventions, input/output constraints, applicable and non-applicable scenarios, and failure examples as separate fields—but only the most critical discriminative information should be exposed in the prompt.
    2. Internal policy: The skill’s internal time-extended policy—the option-level process or workflow that governs a sequence of actions. When a small model executes this policy, it should be decomposed into small, verifiable steps, each with a clear input, output, and timeout, to prevent long chains from becoming uncontrollable.
    3. Reference mechanism: A mechanism for revealing additional skill context and tool pointers, formalizable as a Markov kernel. The value of the reference mechanism lies in lazy loading: only when skill selection is ambiguous, parameters are missing, or preconditions are unclear, is more information revealed. This reduces the context cost from “full loading” to “pay-as-you-go.”

    The triplet design directly determines whether a small model can use skills effectively. The text descriptor handles “finding” the skill, the internal policy handles “doing it correctly,” and the reference mechanism handles “asking precisely when uncertain.” All three are essential.

    4. Action Space and Belief Updates: Incorporating Information Gain into the Cost Function

    In the POMDP formulation, the action space includes at least four categories: committing to and executing a skill, revealing more information about a skill or its reference, taking a direct action in the environment, and internal planning and verification. In practical engineering, these map to:

    • Skill retrieval: Fetching Top-k candidates from the skill library.
    • Information revelation: Loading reference material, parameter descriptions, tool signatures, or examples for candidate skills.
    • Skill execution: Invoking tools or generating results according to the internal policy.
    • Escalation for verification: Routing to a larger model for review when confidence is low, risk is high, or tool returns are abnormal.
    • Fallback: Returning to information revelation or degraded handling upon timeout, missing parameters, or execution failure.

    Belief state updates should integrate user messages, historical actions, tool responses, and skill revelation results. A practical approximation is to maintain structured belief fields, such as intent confidence, parameter completeness, skill ambiguity level, environment fact gaps, and risk level. Each information revelation updates these fields, and the routing policy uses them to decide whether to “continue execution” or “continue asking.” The objective function can be written as: expected task reward minus context cost, latency cost, and error risk cost.

    5. Model Tiering and Routing: No Single Model Handles Everything

    The key to a localized Agent is not selecting a single “universal small model” but rather placing models of different scales in their appropriate roles. A pragmatic tiered strategy is:

    • Ultra-small models: Handle coarse intent classification, skill retrieval, and sensitive-word or risk pre-screening. Advantages: low latency and a small hardware footprint. Disadvantages: weak disambiguation capability.
    • Medium-sized models: Handle parameter extraction, skill orchestration, simple tool invocation, and output format validation. Well suited for the high-frequency primary path.
    • Larger models: Handle complex planning, cross-skill conflict resolution, exception recovery, and high-risk result verification. Triggered only under low-confidence or high-risk conditions.

    Routing signals should include at least: skill retrieval confidence, the gap between Top-k candidates, parameter completeness, context gaps, historical failure count, tool-return exception type, and task risk level. If the gap between the top candidate and the runner-up is large and parameters are complete, execute directly. If candidates are close or parameters are missing, reveal references first. If uncertainty persists after revelation, escalate to the larger model. If the larger model produces a result, cache its decision rationale for future use by smaller models.

    Pseudo-code illustration:

    1. def route(obs, belief, budget):
    2. candidates = recall_skills(obs, top_k=5)
    3. best = max(candidates, key=lambda s: expected_gain(s, belief) - cost(s))
    4. if confidence(best, obs) < TAU:
    5. if budget.context > MIN_CTX and has_useful_reference(best):
    6. return reveal_reference(best) # Trade context cost for a more accurate observation
    7. return escalate_to_large(obs) # Escalate when the small model is uncertain
    8. if risk_level(best, obs) > RISK_LIMIT:
    9. return verify_with_large(best, obs) # High-risk results require verification
    10. if params_complete(best, obs):
    11. return execute_skill(best) # Execute directly on the primary path
    12. return ask_for_missing_params(best) # Only request the essential missing information

    This logic embodies the POMDP philosophy: first reduce uncertainty with low-cost actions, then decide whether to execute; assess risk before execution; after failure, return to information revelation or escalation rather than having the same small model repeatedly attempt and fail.

    6. Local Engineering Practices: Skill Library, Context, and Observability

    First: Skill library governance. Skill descriptions should be versioned, retrievable, and sunsettable. Duplicate skills for the same capability should be avoided. Every skill should define input/output contracts, timeouts, idempotency requirements, and failure codes. Small models are more sensitive to conflicting descriptions, so the “discriminative power” of the skill library matters more than its raw size.

    Second: Lazy loading of references. Place long documents, tool signatures, examples, and extensive rules into reference resources, revealed only when needed. Revelation actions must have a budget ceiling to prevent excessive context loading, which can fragment a small model’s attention.

    Third: Context budget management. Set a maximum context footprint for each action type. When the budget is exceeded, prioritize preserving the user intent, the current skill contract, and recent tool results. Historical summaries and low-value references can be compressed or dropped.

    Fourth: Caching and idempotency. Cache skill retrieval results, reference revelations, and large-model verification conclusions. Tool calls should be idempotent where possible; retries after failure need an idempotency key to avoid duplicate side effects in the local system.

    Fifth: Observability. Log the full chain of every skill retrieval, information revelation, execution, escalation, and fallback, forming a replayable trace. Monitor success rate, average context consumption, escalation rate, timeout rate, and failure recovery rate. At the infrastructure layer, container platforms, object storage, log services, and monitoring and alerting capabilities can be used as the deployment and operation environment; the evaluation methodology itself should remain vendor-agnostic.

    Sixth: Security and isolation. Tool calls should operate on the principle of least privilege. Skill reference resources must be isolated per tenant. High-risk actions require mandatory review by a larger model or rule-based checks before execution. Logs should be scrubbed to prevent sensitive information in context from being written back.

    7. Evaluation Methodology: From “Feels Workable” to “Quantifiable and Reproducible”

    The evaluation should cover a full spectrum of model sizes, from sub-billion-parameter models to tens of billions, observing differences in skill retrieval accuracy, parameter extraction quality, execution success rate, and escalation rate. Offline replay can use real industrial task trajectories; online evaluation should focus on latency and cost. Ablation experiments should at minimum include: disabling reference revelation, disabling router escalation, fixing a single model, and disabling caching. Reported metrics should include task success rate, context token consumption, number of tool calls, end-to-end latency, escalation rate, fallback rate, and unit task cost.

    The final conclusions should support model selection decisions: if task boundaries are clear and the skill library is highly discriminative, small models can carry the primary path. If tasks are highly ambiguous or high-risk, a tiered routing approach—“small model on the primary path, large model for verification”—is required. Small models plus Agent Skills are viable, but only when skill representation, information acquisition cost, routing escalation, and observability are treated as first-class engineering problems. The competitiveness of a localized Agent lies not in the parameter scale of a single model, but in the collaborative design of the entire POMDP-style control strategy and engineering constraints.