Story Crater Bot
629e7f727f
docs: comprehensive query optimization guides for developers
Added two major documentation pieces:
1. README.md - New Section: M3.8 Pluggable Query Optimization
✅ Architecture overview (ingest + query paths)
✅ 6 practical usage patterns with code examples:
- Basic query with auto-optimization
- Prompt construction with optimization
- Custom optimizer implementation
- Optimized query with metrics tracking
- Batch optimization for multiple queries
- Conditional optimization with graceful fallback
✅ Environment configuration
✅ Compression targets by content type
✅ Performance targets table
✅ Monitoring via structured logging
✅ Best practices (5 key points)
✅ Links to full documentation
2. QUERY-OPTIMIZATION-COOKBOOK.md - Quick Reference (15KB)
✅ Basic usage patterns
✅ Prompt construction techniques
✅ Custom optimizer examples:
- Content-type specific (Python optimizer)
- Domain-specific (Medical optimizer)
- Semantic pruning
✅ Format handlers (built-in + custom Gzip example)
✅ Error handling (graceful fallback + retry)
✅ Testing patterns (unit, integration, mocking)
✅ Configuration examples (env vars + Kubernetes)
✅ Performance tips (5 optimization strategies)
✅ Debugging guide
Target Audience: Developers integrating query optimization into:
- query_executor.rs
- hybrid_query_worker.rs
- Custom LLM clients
Includes:
- Copy-paste ready code examples
- Real-world patterns for medical, code, text optimization
- Testing strategies
- Kubernetes deployment config
- Debug logging setup
- Performance profiling tips
2026-08-28 12:32:08 -07:00
..
2026-08-27 20:25:05 -07:00
2026-08-27 21:05:09 -07:00
2026-08-28 09:12:09 -07:00
2026-08-27 21:05:09 -07:00
2026-08-27 20:25:05 -07:00
2026-08-27 20:25:05 -07:00
2026-08-27 12:29:23 -07:00
2026-08-28 07:50:12 -07:00
2026-08-28 07:49:34 -07:00
2026-08-28 12:14:49 -07:00
2026-08-27 21:12:10 -07:00
2026-08-27 20:25:05 -07:00
2026-08-27 20:25:05 -07:00
2026-08-28 12:32:08 -07:00
2026-08-28 08:13:36 -07:00