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