---
name: knowledge-rag-policy
description: Use when the user asks about books, authors, quotes, or factual content that should come from the mem0 knowledge base. Apply this policy to decide when to call the openclaw-mem0-python knowledge tools (list sources, describe a book, search a book) instead of relying on conversational memory or guessing.
---

# Knowledge RAG Policy

## Overview
Use the knowledge tools only when the user’s request clearly targets book/author content or verifiable facts. Conversational memory stays auto-injected; knowledge retrieval must be explicit via tools.

## Trigger checklist
Call the knowledge tools when the user:
- Mentions a **book title**, **author**, or **quote**.
- Asks “what does X say about Y?” or “where in the book is …?”.
- Requests citations or specific passages.

Do **not** call knowledge tools for casual chat, personal context, or tasks already satisfied by conversational memory.

## Workflow
1) **List books** (only if you don’t already know the relevant source):
   - `listKnowledgeSources()`

2) **Describe a candidate book** to confirm scope:
   - `describeKnowledgeBook({ sourceFile })`

3) **Search within a book** (preferred):
   - `searchKnowledgeBook({ query, sourceFile, limit })`

4) **Search across a few books** (only when needed):
   - `searchKnowledgeBooks({ query, sourceFiles, limit })`

## Output expectations
- Return short excerpts with **source_file + page/chapter metadata** when available.
- Keep snippets focused; ask follow‑ups if results are vague.
