Custom Prompt Length
The plugin limits how much text is sent to the AI in a single request. This protects against timeouts and confusing errors when a prompt grows too large.
Default Limits (Most Users)
You do not need to change anything unless you hit a limit or use a large-context local model.
| Mode | Default limit |
|---|---|
| Single book | 128,000 characters |
| Multi-book (selected titles) | 256,000 characters |
| AI Search (full library index) | Uses compact format; see Search tab |
If the prompt is too long, the plugin shows a detailed message with the current size, the limit, and how many books were selected — plus guidance to use AI Search for library-wide questions.
When to Use a Custom Limit
Enable this only if you know your model supports a larger context window — for example Ollama with num_ctx set to 128k on the model side.
Do not select thousands of books manually and raise the limit to "make it fit." Use AI Search instead. Custom limits are an advanced fallback, not the main way to search a large library.
How to Enable
- Open Configuration -> General
- Check Custom prompt length limit
- Enter Max prompt length in characters (default suggestion: 524288)
- Click Save
Rough guide: 1 token ≈ 3–4 characters. For Ollama, also configure num_ctx in your model settings.
Multi-Book Behavior
- Up to 30 books: verbose metadata (title, author, publisher, etc.) for deeper comparison
- More than 30 books: compact one-line metadata per book
- More than 50 books: Ask offers to switch to AI Search automatically