mex wiki query returns no results for natural-language questions, and doesn't say why. In
an evaluation over two scaffolds, 0 of 25 questions returned anything useful, while keyword
forms of the same questions did.
| query form |
Hono hit@5 |
mex hit@5 |
empty results |
| natural-language question |
0.00 |
0.00 |
92–100% |
| keywords |
0.75 |
0.85 |
8% |
| exact title |
1.00 |
1.00 |
0% |
Example: "Why does Hono avoid runtime dependencies?" returns nothing, although an entity titled
Zero runtime dependencies, Web Standards only exists; runtime dependencies finds it at rank 1.
Cause
toMatchExpression() (src/wiki/query/session.ts:482) quotes every term and ANDs them:
"Why" AND "does" AND "Hono" AND "avoid" AND "runtime" AND "dependencies"
Any term missing from an entity (Why, does, avoid) excludes it. The quoting is right for
safety (it stops user text from becoming FTS5 syntax). The AND of every token, stopwords
included, is what empties the result.
This needs a decision first. wiki query is documented as full-text search, not question
answering. But agents naturally phrase lookups as questions, and a silent empty result is read
as "there's no knowledge about this".
Proposed direction
- Drop stopwords and question words before building the expression.
- If the AND query returns nothing, retry with OR and rank by
bm25, labelling the result as
the broader match.
- When nothing matches at all, say so and suggest
ROUTER.md or mex graph scope, rather than
returning a bare empty list.
Keep the quoting either way.
mex wiki queryreturns no results for natural-language questions, and doesn't say why. Inan evaluation over two scaffolds, 0 of 25 questions returned anything useful, while keyword
forms of the same questions did.
Example: "Why does Hono avoid runtime dependencies?" returns nothing, although an entity titled
Zero runtime dependencies, Web Standards only exists;
runtime dependenciesfinds it at rank 1.Cause
toMatchExpression()(src/wiki/query/session.ts:482) quotes every term and ANDs them:Any term missing from an entity (
Why,does,avoid) excludes it. The quoting is right forsafety (it stops user text from becoming FTS5 syntax). The AND of every token, stopwords
included, is what empties the result.
This needs a decision first.
wiki queryis documented as full-text search, not questionanswering. But agents naturally phrase lookups as questions, and a silent empty result is read
as "there's no knowledge about this".
Proposed direction
bm25, labelling the result asthe broader match.
ROUTER.mdormex graph scope, rather thanreturning a bare empty list.
Keep the quoting either way.