Query Mode Comparison
Test Dataset
Example 1: Simple Keyword Search
Naive Mode ⚡
curl http://localhost:3000/api/query \
-H "Content-Type: application/json" \
-d '{
"query": "API refactor",
"mode": "naive",
"top_k": 5
}'Example 2: Entity-Focused Question
Naive Mode
Local Mode 🎯 (Better)
Example 3: Relationship Question
Local Mode
Global Mode 🔗 (Better)
Example 4: Complex Multi-Part Question
Hybrid Mode ⚖️ (Best for this)
Example 5: Production Query Requiring Maximum Accuracy
Mix Mode 🌟 (Best)
Side-by-Side Comparison
Mode
Results
Accuracy
Speed
Best Match
Decision Tree: Which Mode to Use?
Performance vs Accuracy Trade-offs
Development / Testing
Production / User-Facing
High-Volume / Cost-Sensitive
Real-Time / Low-Latency Requirements
Advanced: Tuning Parameters
Top K (Candidate Retrieval)
Chunk Top K (Final Results)
Score Threshold
Entity Limit
Real-World Examples
Customer Support Bot
Internal Search Tool
Autocomplete Suggestions
Next Steps
Last updated
Was this helpful?