Skip to main content
Knowledge troubleshooting maps the most common “my agent has documents but ignores them” symptoms to fixes you can verify in seconds.
The user passes files and asks a question; this guide confirms the answer actually came from those files — not from the model’s memory.

Quick Start

1

Install the knowledge extra

2

Run the three-check marker test

Follow the decision tree top to bottom: install → search → chat. All three must pass before you trust RAG.

Symptom: “Indexed OK, but agent answers generically”

Search returns the right chunks, but the agent answers from its own memory — a silent hallucination against your own docs. Before (broken):
After (grounded):

Verification recipe

Run this marker test against a fresh install. It proves both that search finds the chunk and that chat() actually uses it.
SEARCH_OK alone does not prove RAG is working — that was exactly the trap this bug set. Both SEARCH_OK and CHAT_OK must be True.

Why a unique marker matters

Generic questions can get a lucky correct guess from the model’s parametric knowledge, giving a false pass. Use a non-memorisable token like ZEBRA-QUOTA-9917 so a correct answer can only come from your documents.
This silent grounding failure in sync chat() / start() was fixed in PR #5109 (merged 2026-09-17, closing #5098). The retrieved context now reaches the LLM prompt for both text and multimodal (attachment) paths. The async path was already correct. The fix shipped on main on 2026-09-17; it is released in the next praisonaiagents version. If your SEARCH_OK=True but CHAT_OK=False, upgrade praisonaiagents.

Interim workaround (pinned to an older release)

If you cannot upgrade yet, inject the retrieved context into the prompt yourself:
You should not need this on current releases. It exists only to support code pinned to a version released before PR #5109.

Symptom: ModuleNotFoundError: No module named 'chonkie'

The knowledge extra (which bundles the chonkie chunker) is not installed.

Symptom: chat is grounded but the wrong chunks come back

CHAT_OK passes, but the cited chunks are off-topic — a retrieval-quality problem, not a grounding one. Tune reranking and chunker settings.

RAG Strategies

Choose chunking and retrieval strategies for your corpus.

RAG Quality

Reranking and quality filters for better chunk selection.

Best Practices

A unique token like ZEBRA-QUOTA-9917 turns “it looks configured” into a SEARCH_OK + CHAT_OK pass/fail you can trust.
Retrieval succeeding does not prove the agent used the result. Assert CHAT_OK too.
Add "praisonaiagents[knowledge]" to requirements so chonkie is always present across environments.
The manual context-injection workaround is only for pinned-old releases; upgrading removes the need entirely.

Knowledge Quick Start

Pass files to an agent and start asking questions.

RAG Quickstart

Get retrieval-augmented answers in a few steps.

Knowledge Indexing Errors

Diagnose empty indexes and embedding-backend failures.

Knowledge Search Results

Understand the shape of knowledge.search() results.