Lore DB | Docs

Search

Lore DB uses hybrid search to find the most relevant documents for your query. It combines multiple signals for accurate results.

How search works

Search uses a hybrid approach: it combines semantic search (understanding the meaning of your query) with keyword matching (finding exact terms). Results are ranked by relevance, and recently verified documents get a boost. Only documents in your active libraries are searched.

The search pipeline

  1. Query expansion — Your query is enriched with synonyms and related terms to improve recall
  2. Semantic search — pgvector finds document chunks with similar meaning (cosine similarity on 1536-dim embeddings)
  3. Keyword matching — Token overlap scoring finds exact term matches
  4. Freshness decay — Recently verified documents get a ranking boost
  5. Hybrid combination — 70% semantic + 30% keyword + freshness modifier
  6. Re-ranking — Cross-encoder re-ranking for precision on the top candidates
  7. Score threshold — Only results scoring above 0.3 are returned

You can search across different scopes:

  • All active libraries (default) — Searches everything you have access to that is toggled on
  • Single library — Search within one specific library
  • System — Search all libraries within a system

Understanding source scores

Each result shows a relevance score (e.g., 92%). This reflects how closely the document matches your query. Higher scores mean stronger matches. A score above 80% is usually a direct hit; 50–80% is related content.

Tips for better searches

  • Be specific: “What are the steps to deploy to production?” works better than “deployment”
  • Ask complete questions: “How do I reset a user’s password?” gives better answers than just “password reset”
  • Use natural language: The semantic search understands meaning, not just keywords

Use library toggles to focus your search. Working on Project X? Toggle off unrelated libraries so your results are more relevant.