Skip to main content
Learn how to perform semantic searches with natural language queries.
src/basic-search.ts

Search Options

src/search-options.ts

Options Reference

Search Results

Each result contains:
src/types/search-result.ts

Understanding Scores

Scores range from 0 to 1:
  • 0.8-1.0: Very high similarity (nearly identical meaning)
  • 0.6-0.8: High similarity (strongly related)
  • 0.4-0.6: Moderate similarity (related concepts)
  • 0.2-0.4: Low similarity (loosely related)
  • 0.0-0.2: Very low similarity (probably unrelated)
src/interpret-scores.ts

Error Handling

src/error-handling.ts

Empty Results

Common reasons for empty results:
  1. Threshold too high - Lower the threshold option
  2. No matching documents - Check that documents are indexed
  3. Filter too restrictive - Review your filter function
src/debug-empty.ts

Filtering

Filter search results

Thresholds

Tune similarity thresholds

Performance

Optimize search performance