Best Practices
Best Practices
- Chunk size matters - 500-1500 chars optimal for context
- Retrieve enough context - top_k=5-10 for comprehensive answers
- Include source attribution - Always show which documents were used
- Handle edge cases - Empty results, API errors, timeouts
- Monitor token usage - Track costs and optimize prompts
- Use SQLite timeout -
timeout=30for concurrent access