為何你的內部知識庫搜尋仍然失效
Why Your Internal Knowledge Base Still Fails at Search
作者審核自家知識庫兩週後,歸納出同義詞缺失、查詢句式不匹配、過時內容幹擾及按部門而非任務組織四種搜尋失效原因,並提出相應修正方法。文章建議以員工上月在聊天中提出的 20 個真實問題測試搜尋首位結果的正確率,作者的測試結果由 7/20 升至 16/20。少於 60 條目時可手動建立置頂索引;超過 60 條目且每週變動時,應先處理內容歸屬;純 API 文件則不需要擴展同義詞。
Most internal knowledge bases don't fail because nobody writes in them. They fail because the search layer was never designed. I spent two weeks auditing ours and found the same four failure modes in almost every team.
Here is what actually breaks, and what fixed it.
Failure 1: Missing synonyms (the vocabulary gap)
The document says "travel lodging standard." The employee types "where do I stay on a business trip." Zero characters match, so the index has nothing to rank. This is not a model limitation. Nobody ever told the system those two phrases mean the same thing.
Fix: generate synonyms in batches with an LLM, but constrain the output. Give it 40 entries with IDs, demand colloquial phrasing ("where do I stay" not "lodging specification"), and require a three-column table you can import. Without the colloquial constraint it just rewrites the same formal words.
Failure 2: Query shape mismatch
Employees type full sentences. Documents are written as clauses. A keyword index scores low on a long question even when the answer is right there.
Fix: pre-generate question variants per entry, segmented by role. A first-time traveler asks differently than an admin booking for a team. Ask the model for 6-8 variants, each tagged with which sentence of the source it maps to. That tag is your quality gate: if the model cannot cite a source sentence, it invented the question.
Failure 3: Stale content pollution
Two versions exist. The old one still ranks higher because it has more inbound links or an earlier date. Someone follows it and files an expense claim against a superseded policy.
Fix: never let the model delete. Have it assign a risk tier (high / medium / low / cannot determine) with the exact quote that triggered the tier. High means the text contains "interim" or references a retired system. Cannot determine means it cites a document that isn't in the batch. Then a human confirms. In practice this cut our review workload from 30 entries to 11.
Failure 4: Structure organized by department
Finance owns reimbursement. Admin owns booking. Legal owns contracts. The employee thinks "I'm traveling" and has to guess which department owns that.
Fix: do not restructure the tree first. Add a layer of task-oriented landing pages on top, each linking the cross-department entries for a single task. Ask the model to identify only the tasks spanning three or more departments, then rewrite its suggested titles into the words employees actually use. "Travel affairs portal" becomes "I need to travel."
How to verify it worked
Do not trust the feeling that search got better. Pull 20 real questions employees asked in chat last month, run them through search before and after, and measure one number: how often the top result is correct. Ours went from 7/20 to 16/20. That single metric beats any accuracy claim.
When not to do this
Under 60 entries, build a pinned index page manually. Above 60 entries but changing weekly, fix content ownership first. Pure API documentation does not need synonym expansion either, since engineers already search with exact tokens.
Originally published at my notes on internal wiki search
來源:DEV Community · dev.to