Hasty Briefsbeta

Tuning Semantic Search on JFMM.net – Joint Fleet Maintenance Manual

10 days ago
  • #semantic-search
  • #Navy-QA
  • #vector-databases
  • The author shares their experience with submarine quality assurance (QA) in the Navy, including their role as a QA officer and the challenges of using the Joint Fleet Maintenance Manual (JFMM).
  • Frustrated with the slow search capabilities of the JFMM PDF on government laptops, the author built a semantic search engine for the manual after leaving the Navy.
  • Semantic search uses vector similarity to match queries by meaning, not just exact text, improving search relevance.
  • The first version of JFMM.net used Postgres with PGVector for vector search, but the author later switched to SQLite with sqlite-vec for simplicity and cost savings.
  • To reduce memory usage, the author implemented model quantization, lowering precision from 32-bit to 8-bit, which cut RAM requirements by 75%.
  • A reranker was added to improve result relevance by scoring and reordering search results, though it increased query latency.
  • The author adopted exclusion pagination to handle pagination with reranking, tracking seen IDs to avoid duplicate results across pages.
  • HATEOAS (Hypertext As The Engine Of Application State) was used to manage pagination state via URLs, aligning with REST principles and improving user experience.
  • The improvements led to more relevant search results, better developer experience, and cheaper infrastructure, though queries became slower due to reranking.