A fire-code assistant often retrieves the wrong code sections despite decent chunking. Annotated pairs of queries and correct sections are available. What should the team do to improve lookup accuracy?
Select an answer to reveal the explanation.
Short Explanation
You’ve got labeled “this question → that section” pairs—that’s gold for teaching the embedder your fire code’s shape. Fine-tuning on those pairs pulls the right sections closer in vector space. You'll waste that gold if you just crank up top-k without teaching the embedder.
Full Explanation
Fine-tuning embeddings on annotated code-section pairs improves domain lookup accuracy when a fire-code assistant retrieves the wrong sections despite decent chunking and labeled query–section pairs exist. Supervised or contrastive adaptation pulls correct municipal code passages closer to their queries in vector space, teaching the embedder the structure and wording of the fire code rather than relying solely on a generic off-the-shelf space. With annotations already available, this is the highest-leverage accuracy fix short of redesigning the whole index.
Increasing retrieval top-k with the annotated code-section pairs available still only returns more of the same poorly ranked sections; it does not use the annotations to fix the underlying mismatch between queries and fire-code text, so the correct section stays buried among additional noise. Re-chunking the fire code with the annotated code-section pairs available still only alters coverage but does not teach the embedder the domain-specific structure and wording of the fire code, so it will not resolve the wrong-section retrieval problem. Fine-tuning the generator on the annotated code-section pairs to improve domain lookup accuracy still targets generation, not retrieval; it does not move correct sections closer to queries in vector space, so the assistant will still fetch the wrong sections.
Exam caveat: embedding fine-tuning helps when chunking is adequate but ranking of the right chunks is wrong and labeled pairs exist. It is not a substitute for hybrid exact-match paths for section identifiers or for fixing overlapping chunk boundaries.
Operational check: hold out annotated fire-code pairs from training, measure recall@k and MRR on the holdout after fine-tuning, compare against the generic baseline on the same chunks, and watch for overfitting to section-number patterns that fail when residents paraphrase without citing the code citation.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.