busca-hibrida-local-first

Implements local hybrid search combining SQLite-VSS vector retrieval and BM25 with Reciprocal Rank Fusion.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill busca-hibrida-local-first-ryanzucchi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: busca-hibrida-local-first
Source: https://github.com/Ryanzucchi/Eldritch_Lich/tree/main/.agents/skills/busca-hibrida-local-first
Command: npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill busca-hibrida-local-first-ryanzucchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Fictional writing projects contain invented names, places, and magic terms that pure vector search fails to retrieve because embedding models lack these out-of-vocabulary words. This Skill combines dense vector search with lexical BM25 matching so authors can reliably find lore, notes, and chapters offline on their own device. ## Core Features & Use Cases - Hybrid Retrieval with RRF: Runs SQLite-VSS vector search and BM25 lexical search in parallel, then fuses rankings with Reciprocal Rank Fusion (k=60) for balanced semantic and exact-term results. - Local-First Indexing: Chunks text into 384-token segments with 10% overlap, generates embeddings with a local multilingual-e5-base model, and indexes vectors in SQLite-VSS using HNSW (M=16, ef_construction=200). - Use Case: A novelist searches "Where was Morgan's staff broken?" and the engine returns the exact chapter mentioning the staff, ranking exact lore terms above merely similar concepts like "scepter". ## Quick Start Ask the assistant to index my novel chapters and search for where a specific fictional item or character appears using hybrid local search.

Frequently Asked Questions about busca-hibrida-local-first

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I combine vector search and BM25 for hybrid retrieval?▼

Run both retrievers in parallel, taking the top 20 results from each, then merge rankings with Reciprocal Rank Fusion using the formula 1/(k + rank) with k=60. Sort the fused scores descending to produce the final result list.

Why does vector search fail on invented fantasy terms?▼

Pretrained embedding models have no semantic representation for out-of-vocabulary fictional names, so they return incorrect synonyms. Pairing embeddings with BM25 lexical matching guarantees exact invented terms like character or place names are retrieved.

Can SQLite-VSS run vector search offline on-device?▼

Yes, SQLite-VSS is a SQLite extension that stores and queries embeddings locally without a server. Combined with a local embedding model via ONNX Runtime or llama.cpp, the full pipeline runs offline on the author's device.

What chunk size should I use for embedding novel chapters?▼

Use 384-token chunks with a 10% overlap (about 38 tokens) between adjacent segments. This matches the multilingual-e5-base model's token limit and prevents meaning from being cut at chunk boundaries.

When should I not use hybrid search?▼

Skip hybrid search for exact filename or record lookups, where a direct SQL query is faster and simpler. It is also unnecessary for batch cloud processing where real-time latency is not required.