1
[Feature Request] AI suggestions: make the 4000-character content limit configurable
Source: paperless-ngx/paperless-ngx#14833 · opened by @morrolinux
AI usage Yes, AI tools helped write this request Description AI suggestions (title, tags, correspondent, ...) only ever see the first 4000 characters of a document. The cut is hard-coded in build_prompt_without_rag: truncate_content() already trims the content to fit llm_context_size. Because of the [:4000] slice before it, raising PAPERLESS_AI_LLM_CONTEXT_SIZE (or the UI setting) has no effect on how much of the document the model reads. Nothing in the docs or the UI says so. Example: a 38-page PDF with about 112k characters of OCR text. The model gets about 3.5% of it, which is roughly the first page. When the first page is a cover, a form header or a table of contents, the suggested title is poor, and changing the model or the context size does not help. Proposal Make the limit configurable, for example PAPERLESS_AI_LLM_CONTENT_LIMIT (environment variable and/or application setting), with 4000 as the default so current behaviour and prompt sizes stay the same. This matte…
No pledges yet. Be the first to back this.
Comments
Similar requests
[Feature Request] Option to trigger AI manually without disabling automatic ML standard suggestions
8 votes · 0 comments
[Feature Request] AI Suggestions Cache
12 votes · 0 comments
[Feature Request] Allow workflow actions to wait for AI suggestions to be applied
1 vote · 0 comments
[Feature Request] Automatically suggest non-LLM suggestions when editing documents, like in versions before 3.0.0
15 votes · 0 comments
[Feature Request] Keep AI suggestions from the "Apply AI suggestions" workflow action for the document view
2 votes · 0 comments
No comments yet.