Create a zero-dependency TF-IDF search index for keyword-based search.Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Signature
Parameters
TFIDFConfig
| Option | Type | Default | Description |
|---|---|---|---|
defaultSimilarityThreshold | number | 0.0 | Default minimum similarity |
defaultTopK | number | 10 | Default results limit |
Example
Key Differences from VectoriaDB
| Feature | TFIDFVectoria | VectoriaDB |
|---|---|---|
| Dependencies | Zero | transformers.js |
| Initialization | Synchronous | Async |
| Understanding | Keyword-based | Semantic |
| Reindex required | Yes | No |
When to Use
Use TFIDFVectoria when:- You need zero dependencies
- Keyword matching is sufficient
- No network access for model download
- Small corpus (< 10K documents)
Related
TFIDFVectoria Methods
All methods
TF-IDF Guide
Usage guide