compress_hipocampo
Reduce prompt size by compressing retrieved memories with extractive, LLM, or hybrid methods, preserving critical information before sending context to another LLM.
Instructions
Compress retrieved memories using a hybrid approach (extractive + LLM).
First searches Hipocampo (SSC v1.0), then compresses the top-k results:
method="extractive": sentence-level keyword relevance (fast, no API cost)
method="llm": summarization via NVIDIA NIM (highest quality, API cost)
method="hybrid" (default): uses LLM for technical/code content, extractive for generic text
Use this tool BEFORE sending context to another LLM to reduce prompt size while preserving critical information.
Args: query: Natural language search query. k: Number of memories to retrieve (default 5, max 20). method: Compression method: "hybrid" (default), "extractive", or "llm". target_token: Target token count (-1 = auto, based on content). include_metadata: Include per-memory details in output. budget_ratio: Scale factor for auto-estimated tokens (default 1.0).
Returns: Compressed context as plain text with compression statistics. Includes: compressed text, original/compressed char counts, ratio, latency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| method | No | hybrid | |
| budget_ratio | No | ||
| target_token | No | ||
| include_metadata | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |