Context for a prompt
ragdown_contextRetrieve relevant notes for a user prompt and inject them as a ready-to-inject context block. Filters by similarity score, skips short prompts, and avoids duplicate sections per session.
Instructions
For hooks that run before a turn: the notes related to a user prompt, as a ready-to-inject block, or empty text when nothing is similar enough. Unlike ragdown_recall it filters by min_score, skips short prompts and slash commands, and never returns a section twice for the same session_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | Default RAGDOWN_HOOK_TOP_K | |
| prompt | Yes | The user's prompt, verbatim | |
| max_chars | No | Most characters in the block. Default RAGDOWN_HOOK_MAX_CHARS | |
| min_ratio | No | Lowest share of the best hit's similarity a hit may have and still be included; 0 keeps every hit above min_score. Default RAGDOWN_HOOK_MIN_RATIO | |
| min_score | No | Lowest cosine similarity to include. Default RAGDOWN_HOOK_MIN_SCORE | |
| session_id | No | Stable id of the conversation; sections already returned for it are skipped |