Two complementary retrieval paths
Exact equipment identifiers and descriptions of a fault are different retrieval problems. Lexical search helps preserve exact terms, while vector search finds semantic similarity. Hybrid retrieval combines candidates from both. Azure AI Search documents rank fusion in its implementation; raw scores from different retrieval engines should not be assumed comparable.
For more on this topic, read Semantic search with PostgreSQL and pgvector: from model to index in the Liyan knowledge base.
An editorial maintenance example
Test a pump-seal replacement question with and without its equipment code. The lexical path should preserve the identifier; the semantic path should find descriptions of the procedure. Normalize Persian character variants and digits for retrieval while retaining original text and technical identifiers. Uncontrolled punctuation changes can silently change which equipment a code identifies.
Merge results within access boundaries
Deduplicate using document, version and chunk identifiers. Preserve nearby table context and safety warnings. Apply permission filters before unauthorized content reaches the model. Hiding a citation after generation does not remove information already placed in the model context.
Compare against a reference set
Run lexical, vector and hybrid configurations on identical questions. Label the expected document, correct version and forbidden sources. Measure retrieval relevance, latency and grounded-answer quality separately. If hybrid retrieval does not help, inspect chunking and identifier handling before increasing candidate counts. More context can increase noise as well as cost.
Build a query set around one maintenance task
For pump P-204, include its exact identifier, a colloquial leak description and a confusing nearby code. Label the correct manual version and passage rather than just a filename. Include questions with no suitable document. Display equipment scope and validity beside results so a superficially similar manual is not mistaken for an actionable match. Establish useful retrieval before adding generated answers.
Normalize Persian while preserving technical identifiers
Retain original text for display and evidence. Create a separate search representation with deliberate character, spacing and digit normalization. Give technical identifiers their own matching rules rather than deleting punctuation indiscriminately. Have domain experts review synonyms. Version vocabulary changes and report exact-code and natural-language query results separately so improvement in one group cannot hide regression in another.
Inspect fusion and diagnose failures
Preserve lexical and semantic candidate lists during evaluation to explain the final order. Test rank-based fusion and candidate limits against the labeled set. Group duplicate document versions and enforce permission boundaries before generation. Measure reference-document presence in a fixed result window, valid-version ordering, response time and clicks to useful evidence. Investigate extraction for code failures, terminology for colloquial-query failures and missing source coverage before tuning ranking weights. Deliver examples and corrective actions alongside aggregate scores.
A repeatable comparison for the maintenance team
Build the reference set with a technician who knows which manual version actually applies to each pump. Keep exact-identifier queries, everyday descriptions and unsupported requests in separate groups. An agreed result window, such as the first five results, gives a straightforward comparison when used consistently across lexical, vector and hybrid runs. The example window is an evaluation choice, not a universal tuning recommendation.
For every failed query, inspect the extracted text before changing search weights. A missing hyphen or digit may explain an identifier failure. A colloquial-query failure may need terminology review, while an absent manual requires source coverage. If the right manual is found but only the wrong section is returned, investigate chunk context. Save the query, reference passage, candidate positions and diagnosis so the next change has a specific purpose.
After changing normalization or synonyms, rerun both the affected cases and a stable regression set. A vocabulary improvement that helps general wording can still harm exact code matching. Inspect duplicate versions and permission-filtered empty results explicitly. Finally, ask users to perform the real task: locate the applicable instruction and explain why they trust it. Record clicks and elapsed time through evidence selection. This validates whether better retrieval metrics translate into useful work. Do not let a fluent generated summary hide that the source, version or equipment scope is wrong.
Frequently asked questions
Is hybrid search always better?
No. Compare it against simpler retrieval methods on representative data.
Does it replace generation?
No. Retrieval, answer generation, citations and authorization remain distinct responsibilities.
Sources
- MicrosoftHybrid search overviewOfficial documentation
- Sentence TransformersRetrieve & Re-RankOfficial documentation
Further reading in the Liyan knowledge base
- Liyan Data ParsSemantic search with PostgreSQL and pgvector: from model to indexFor retrieval implementation, Liyan’s pgvector guide provides SQL examples, distance and index choices, and search-quality evaluation.