Clarify refine_factor, set default to 30
This commit is contained in:
parent
2f54ee7d59
commit
6d8ab2575d
3 changed files with 7 additions and 6 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
- Creates IVF_PQ indexes
|
- Creates IVF_PQ indexes
|
||||||
- Requires minimum 256 chunks (LanceDB training data requirement)
|
- Requires minimum 256 chunks (LanceDB training data requirement)
|
||||||
- New `search.vector_index_metric` config option: `cosine` (default), `l2`, or `dot`
|
- New `search.vector_index_metric` config option: `cosine` (default), `l2`, or `dot`
|
||||||
- New `search.vector_refine_factor` config option (default: 10) for accuracy/speed tradeoff
|
- New `search.vector_refine_factor` config option (default: 30) for accuracy/speed tradeoff
|
||||||
- Indexes not created automatically during ingestion to avoid performance degradation
|
- Indexes not created automatically during ingestion to avoid performance degradation
|
||||||
- Manual rebuilding required after adding significant new data
|
- Manual rebuilding required after adding significant new data
|
||||||
- **Enhanced Info Command**: `haiku-rag info` now shows storage sizes and vector index statistics
|
- **Enhanced Info Command**: `haiku-rag info` now shows storage sizes and vector index statistics
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ research:
|
||||||
|
|
||||||
search:
|
search:
|
||||||
vector_index_metric: cosine # cosine, l2, or dot
|
vector_index_metric: cosine # cosine, l2, or dot
|
||||||
vector_refine_factor: 10
|
vector_refine_factor: 30
|
||||||
|
|
||||||
agui:
|
agui:
|
||||||
host: "0.0.0.0"
|
host: "0.0.0.0"
|
||||||
|
|
@ -732,14 +732,15 @@ Configure vector indexing behavior for efficient similarity search:
|
||||||
```yaml
|
```yaml
|
||||||
search:
|
search:
|
||||||
vector_index_metric: cosine # cosine, l2, or dot
|
vector_index_metric: cosine # cosine, l2, or dot
|
||||||
vector_refine_factor: 10 # Re-ranking factor for accuracy
|
vector_refine_factor: 30 # Re-ranking factor for accuracy
|
||||||
```
|
```
|
||||||
|
|
||||||
- **vector_index_metric**: Distance metric for vector similarity:
|
- **vector_index_metric**: Distance metric for vector similarity:
|
||||||
- `cosine`: Cosine similarity (default, best for most embeddings)
|
- `cosine`: Cosine similarity (default, best for most embeddings)
|
||||||
- `l2`: Euclidean distance
|
- `l2`: Euclidean distance
|
||||||
- `dot`: Dot product similarity
|
- `dot`: Dot product similarity
|
||||||
- **vector_refine_factor**: Retrieve `refine_factor * limit` candidates and re-rank in memory for better accuracy. Higher values increase accuracy but slow down queries. Default: 10
|
- **vector_refine_factor**: Improves accuracy when using a vector index by retrieving `refine_factor * limit` candidates (using approximate search) and re-ranking them with exact distances. Higher values increase accuracy but slow down queries. Default: 30
|
||||||
|
- **Only applies with a vector index** - has no effect on brute-force search, which already returns exact results
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Vector indexes are only necessary for large datasets with over 100,000 chunks. For smaller datasets, LanceDB's brute-force kNN search provides exact results with good performance. Only create an index if you notice search performance degradation on large datasets.
|
Vector indexes are only necessary for large datasets with over 100,000 chunks. For smaller datasets, LanceDB's brute-force kNN search provides exact results with good performance. Only create an index if you notice search performance degradation on large datasets.
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class ProcessingConfig(BaseModel):
|
||||||
|
|
||||||
class SearchConfig(BaseModel):
|
class SearchConfig(BaseModel):
|
||||||
vector_index_metric: Literal["cosine", "l2", "dot"] = "cosine"
|
vector_index_metric: Literal["cosine", "l2", "dot"] = "cosine"
|
||||||
vector_refine_factor: int = 10
|
vector_refine_factor: int = 30
|
||||||
|
|
||||||
|
|
||||||
class OllamaConfig(BaseModel):
|
class OllamaConfig(BaseModel):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue