Disable reranking by default

This commit is contained in:
Yiorgis Gozadinos 2025-09-01 14:58:44 +03:00
parent d233788400
commit 58a04db556
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -109,7 +109,7 @@ See the [Pydantic AI documentation](https://ai.pydantic.dev/models/) for the com
Reranking improves search quality by re-ordering the initial search results using specialized models. When enabled, the system retrieves more candidates (3x the requested limit) and then reranks them to return the most relevant results.
Reranking is **automatically enabled** by default using Ollama, or if you install the appropriate reranking provider package.
Reranking is **disabled by default** for faster searches. You can enable it by configuring a reranking provider.
### Disabling Reranking

View file

@ -101,9 +101,9 @@ async for doc_id in client.rebuild_database():
## Searching Documents
The search method performs native hybrid search (vector + full-text) using LanceDB with **reranking enabled by default** for improved relevance:
The search method performs native hybrid search (vector + full-text) using LanceDB with optional reranking for improved relevance:
Basic hybrid search (default, with reranking):
Basic hybrid search (default):
```python
results = await client.search("machine learning algorithms", limit=5)
for chunk, score in results:

View file

@ -19,7 +19,7 @@ class AppConfig(BaseModel):
EMBEDDINGS_MODEL: str = "mxbai-embed-large"
EMBEDDINGS_VECTOR_DIM: int = 1024
RERANK_PROVIDER: str = "ollama"
RERANK_PROVIDER: str = ""
RERANK_MODEL: str = "qwen3"
QA_PROVIDER: str = "ollama"