Skip to main content
The knowledge base uses pgvector embeddings for semantic search, letting you find relevant information even without exact keyword matches.

How It Works

  1. Upload files to the file system
  2. Index files into collections
  3. Search using natural language queries
  4. Results ranked by semantic similarity (0-1 score)
The system uses 384-dimensional embeddings, balancing accuracy and performance.

Search the Knowledge Base

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.
ThresholdBehavior
0.3Broad results, may include tangentially related
0.5Balanced (default)
0.7High relevance, fewer results
0.9Very 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
OptionDescriptionDefault
--chunk-sizeCharacters per chunk500
--chunk-overlapCharacters overlap between chunks50
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

consuelo kb 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 CaseExample Query
Sales enablementconsuelo kb search "objection handling" --collection sales-materials
Product knowledgeconsuelo kb search "how does feature X work"
Competitive intelconsuelo kb search "competitor comparison"
Onboarding materialsconsuelo kb search "getting started guide"

Next Steps