The knowledge base uses pgvector embeddings for semantic search, letting you find relevant information even without exact keyword matches.
How It Works
- Upload files to the file system
- Index files into collections
- Search using natural language queries
- Results ranked by semantic similarity (0-1 score)
The system uses 384-dimensional embeddings, balancing accuracy and performance.
Search the Knowledge Base
Basic Search
consuelo kb search "pricing information"
Returns documents semantically similar to your query, even if they don’t contain the exact words.
Search in a Collection
Limit search to a specific collection:
consuelo kb search "pricing" --collection sales-materials
Adjust Similarity Threshold
Control result quality:
consuelo kb search "pricing" --threshold 0.7
Higher thresholds return only very similar results. Default is 0.5.
| Threshold | Behavior |
|---|
0.3 | Broad results, may include tangentially related |
0.5 | Balanced (default) |
0.7 | High relevance, fewer results |
0.9 | Very strict, near-exact matches only |
Limit Results
consuelo kb search "pricing" --limit 20
Collections
Collections group related documents for scoped searching.
List Collections
consuelo kb collections list
Create a Collection
consuelo kb collections create --name "Product Docs" --description "Product documentation and guides"
Delete a Collection
consuelo kb collections delete collection_abc123
Deleting a collection removes its index entries but does not delete the
original files.
Index a File
Add a file to a collection’s search index:
consuelo kb index file_xyz123 --collection sales-materials
Chunking Options
Control how documents are split for embedding:
consuelo kb index file_xyz123 \
--collection sales-materials \
--chunk-size 500 \
--chunk-overlap 50
| Option | Description | Default |
|---|
--chunk-size | Characters per chunk | 500 |
--chunk-overlap | Characters overlap between chunks | 50 |
Smaller chunks = more granular search. Larger chunks = more context per result.
Remove from Index
Remove a file from search:
consuelo kb deindex file_xyz123
The file remains in storage but is excluded from search results.
View Index Stats
Shows:
- Total documents indexed
- Total chunks
- Collections with document counts
- Embedding model used
- Index size
Search Output
Human-Readable (Default)
Results for "pricing information":
[0.89] Product Pricing Guide (file_abc123)
...our pricing is structured as a monthly subscription...
[0.76] Sales Deck Q1 (file_def456)
...competitive pricing compared to alternatives in the market...
[0.65] FAQ Document (file_ghi789)
...questions about pricing and billing cycles...
JSON Output
consuelo kb search "pricing" --json
[
{
"fileId": "file_abc123",
"fileName": "Product Pricing Guide.pdf",
"score": 0.89,
"snippet": "...our pricing is structured as a monthly subscription...",
"collection": "sales-materials"
}
]
Use Cases
| Use Case | Example Query |
|---|
| Sales enablement | consuelo kb search "objection handling" --collection sales-materials |
| Product knowledge | consuelo kb search "how does feature X work" |
| Competitive intel | consuelo kb search "competitor comparison" |
| Onboarding materials | consuelo kb search "getting started guide" |
Next Steps