KB Search Strategy and Tuning
Find evidence in complete parsed documents with UnieAI KB Super.
UnieAI KB Super searches complete parsed text. Search terms and regular expressions match text directly. There is no BM25 score, embedding similarity threshold, query expansion model, or reranker to tune.
Practical searches
- Start with a distinctive name, identifier, error code, or clause number that should appear in the document.
- Search alternative spellings separately, or use
kb_grepwithregex: trueandtermA|termBfor an explicit regular-expression search. - For a broad question, make several focused searches and read nearby lines with
kb_fetch. - Narrow to a knowledge base or document when the result set is large.
- Increase the result limit if the first matches do not cover the needed evidence.
Agent kb_search and POST /v1/kb/search first match the complete query text. If it finds nothing, it tries terms or Chinese character groups from the query. A term match is not proof that the whole question has been answered: check the source and surrounding context. Agents can also try shorter queries or alternative wording. This fallback does not require another model to generate keywords.
Search results identify matching files and lines. Validate the surrounding context before using a line as evidence. See UnieAI KB Super Search.