Learn how to enable fast, intent-based prompt discovery using advanced search and indexing.
When your project has dozens or even hundreds of prompts, finding the exact one you need with grep or a simple file search becomes impossible. You need a search that understands intent, not just keywords.
This guide will walk you through Prompt Lockbox’s advanced search capabilities. You’ll learn how to build a search index and use powerful hybrid and SPLADE search methods to find any prompt in seconds, no matter how large your library grows.
The Goal: To move beyond simple fuzzy search and learn how to:
Build a dedicated search index for your project.
To enable advanced search, you first need to create an index. This is a one-time process that scans all your prompts and creates optimized files for fast lookups. The plb index
command handles this for you.
Dependencies!
Advanced search methods require extra Python libraries. If you haven’t installed them, the command will guide you. You can pre-install them with: pip install prompt-lockbox[search]
You can choose which type of index to build. We recommend starting with hybrid.
This command will create several files inside your project’s hidden .plb/
directory. You only need to run this command again when you’ve added or significantly changed many prompts.
Now that your index is built, you can use the advanced search commands. Which one should you use?
Fuzzy Search (default)
plb search fuzzy "query"
Hybrid (TF-IDF + Embeddings)
plb search hybrid "query"
SPLADE Search
plb search splade "query"
Note
Search index needs to be built before using search!
Now that your index is built, you can use the advanced search methods through the search()
method in the SDK or the plb search
command.
Let’s imagine you have this prompt in your library and you want to find it.
A simple fuzzy search for “python code” might work, but an advanced search for “create a python function” is much more powerful because it understands that “create,” “writer,” and “generation” are conceptually related. Examples:
Hybrid Search (CLI):
Hybrid Search (Python SDK):
SPLADE Search (Python SDK):
A unique feature of the hybrid search method is the ability to balance between keyword and semantic matching using the alpha
parameter.
This is available in both the CLI and SDK.
By building an index
and using the hybrid
or splade
search methods, you transform your prompt library from a simple collection of files into a powerful, discoverable knowledge base.