fix: update default embedding models for better performance

- Change WeChat, Browser, and Email RAG examples to use all-MiniLM-L6-v2
- Previous Qwen/Qwen3-Embedding-0.6B was too slow for these use cases
- all-MiniLM-L6-v2 is a fast 384-dim model, ideal for large-scale personal data
This commit is contained in:
Andy Lee
2025-08-02 18:53:55 -07:00
parent 1f6c7f2f5a
commit 31fd3c816a
3 changed files with 13 additions and 1 deletions

View File

@@ -18,6 +18,11 @@ class BrowserRAG(BaseRAGExample):
"""RAG example for Chrome browser history."""
def __init__(self):
# Set default values BEFORE calling super().__init__
self.embedding_model_default = (
"sentence-transformers/all-MiniLM-L6-v2" # Fast 384-dim model
)
super().__init__(
name="Browser History",
description="Process and query Chrome browser history with LEANN",

View File

@@ -17,6 +17,11 @@ class EmailRAG(BaseRAGExample):
"""RAG example for Apple Mail processing."""
def __init__(self):
# Set default values BEFORE calling super().__init__
self.embedding_model_default = (
"sentence-transformers/all-MiniLM-L6-v2" # Fast 384-dim model
)
super().__init__(
name="Email",
description="Process and query Apple Mail emails with LEANN",

View File

@@ -20,7 +20,9 @@ class WeChatRAG(BaseRAGExample):
def __init__(self):
# Set default values BEFORE calling super().__init__
self.max_items_default = 50 # Match original default
self.embedding_model_default = "Qwen/Qwen3-Embedding-0.6B" # Match original default
self.embedding_model_default = (
"sentence-transformers/all-MiniLM-L6-v2" # Fast 384-dim model
)
super().__init__(
name="WeChat History",