> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getraya.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getraya.app/_mcp/server.

# Knowledge base

> **Warning**
>
> **Experimental, in beta.** Raya's MCP server is new and may change. For feedback, suggestions or problems, email [support@litwizlabs.ai](mailto:support@litwizlabs.ai).

Material only some calls need (FAQs, detailed policies, product or scheme catalogs, price lists, long lists of locations) works better in the agent's knowledge base than in its prompt. Each file's summary is sent with every request, and a file's full text joins the call only when the agent needs it. A leaner prompt keeps calls fast and costs down.

## What your assistant does

When you ask (or run `/mcp__raya__plan_knowledge_base`), the assistant:

1. finds what in the prompt belongs in the knowledge base,
2. splits it into one-topic files of roughly 1,000 to 3,000 tokens, each starting with a clear title and a one-line summary,
3. writes each chunk as its own file, plus the trimmed prompt,
4. tests the trimmed prompt once you've uploaded the chunks.

## Uploading the chunks

Export each chunk to PDF and upload them **as separate files** on the agent's **Knowledge Base** page (PDF only, up to 25 MB each). Don't upload the whole document as one file: the agent can then only load all of it or nothing.

Simulations use the knowledge base as it is in the portal, so upload the chunks before testing the trimmed prompt.

## Good chunks

* **One topic per file:** one scheme, product, policy or group of related questions. Split by what a caller asks about, not by page count.
* **Self-contained:** repeat the key context instead of "see above".
* **A clear opening:** a title and a one-line summary naming the topic and key terms, so the agent knows when to load it.
* **Tens, not hundreds:** every file adds its summary to every request. Merge fragments that are always needed together.

> **Warning**
>
> If a prompt can't fit its size limit, or chunks have to stay large or numerous, calls may carry a per-minute surcharge. The agent's prompt cost estimate in the portal shows the effect.