get_rag_context
Retrieve relevant text chunks from a soul memory workspace and format them into a structured context block to prepend to system prompts, enabling grounded responses for prompt injection prevention.
Instructions
Build a grounded context block from soul memory for prompt injection.
Retrieves relevant chunks and formats them as a structured context block that can be prepended to the system prompt for grounded responses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The user's question or topic to ground against. | |
| workspace_path | No | Path to soul workspace. Defaults to current workspace. | |
| max_tokens | No | Maximum approximate tokens for the context block. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |