Doc-search answers are ungrounded when KB index is empty / sparse — model hallucinates plausibly wrong facts
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start at the doc-search no-hits prompt and the book-button knowledge-base state described in the issue; inspect how empty indexes and no-hit results reach the model and UI. Done means the chosen fix prevents confident unsupported answers and, if implemented, gives users a clear indexing or fallback signal; verify the supplied empty or sparse-KB reproduction.
Written by the indexing model from the issue text.
Description
Context
After landing #209 Fix 1 (PR #210), the doc-search path correctly bypasses tool selection. But on an empty / unindexed knowledge base, the model answers from training data alone and confidently fabricates specifics.
Repro
- Book button on
- Knowledge base not indexed (or query has no hits)
- Ask: "Whats the hook that allows me to inject content in the footer?"
- Model answers: "The hook that allows you to inject content in the footer is `footer_init`…"
`footer_init` is not a real WordPress hook. The correct answer is `wp_footer`.
Root cause
- Default model is Qwen 3 1.7B — knowledge gaps on specifics.
- Doc-search path's no-hits system prompt currently says "answer from general WordPress knowledge and tell them no local docs were found." That permits free-form answering, doesn't strongly enforce "say you're unsure when uncertain."
- No factual grounding mechanism when the KB is empty.
Proposed fixes (any subset)
- Tighter prompt when no hits. Push the model to "only answer if you are confident; otherwise, ask the user to index docs or rephrase."
- Surface KB state in the UI. If the KB index is empty when the user toggles the book button, show a one-time warning: "Knowledge base is empty — answers will fall back to general model knowledge."
- Encourage indexing in onboarding. Currently you have to opt in to KB indexing manually; with the book button being prominent, a first-run nudge to index would close the loop.
- Citations. When RAG context is used, include `path:lines` citations in the answer so users can verify (and the model is forced to ground statements in context).
Out of scope
- Improving model accuracy on small Qwen — that's an external-provider migration concern, separate from this UX gap.
Related
- #209 (umbrella — tool selection precision); this is a downstream UX issue from the bypass Fix 1 introduced in #210.
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 6
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pluginslab/wp-agentic-admin
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pluginslab/wp-agentic-admin#226 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pluginslab/wp-agentic-admin#215 ·
-
WP.org submission: close out review T4 (17 Jun) and stop the review loopMay be free again @ivdimova claimed this 44 days ago, and no pull request is open. Openphp question wporg-submission
pluginslab/wp-agentic-admin#228 · 5 comments · 2 assignees ·
-
enhancement react-js ux
Difficulty 5/5 Over a week Newbie friendliness 35/100
pluginslab/wp-agentic-admin#224 ·
-
enhancement ux
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pluginslab/wp-agentic-admin#223 ·
All issues in pluginslab/wp-agentic-admin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 3 days
-
Add: Atlas TVOpenchannels:add check:passed
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 4 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jaegertracing/jaeger-ui#4547 · 3 comments ·
Maintainers usually reply within 1 day
-
feedback simulation workshop
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
githubnext/gh-aw-workshop#4090 ·
Maintainers usually reply within 1 day
-
bug deck: add to staging level: missing p-feature: Manage Submissions p-feature: Submissions and process priority: MUST HAVE ready for dev lead role: missing size: missing time sensitive
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
hackforla/tdm-calculator#3581 ·
Maintainers usually reply within 2 days