Replies: 7 comments 11 replies
|
You can instruct the LLM to handle custom fields as you want, BUT make sure that the LLM wont generate more than 120 chars as this is the limit of paperless-ngx for custom field values. Probally the LLM generated to much text for that field. |
|
Thanks for your reply @clusterzx I removed the Paperless AI start: Now the AI response looks like this: And the update data like this: The So I guess removing it comletely from the prompt does not work also. |
|
I think i figured out part of this issue, in doing so i think i discovered 2 bugs.... 1 of the bugs is relevant to this issue. The custom fields only seem to get updated when hitting the "scan now" button on the dashboard, not when manually scanning a document via the "manual" tab on the left. I have not yet set up auto scanning sicne i'm still testing paperless-AI. See bug #599 The other bug is when hitting "scan now" the existing tags are not sent to the LLM, but when doing a manual scan the existing tags are sent to the llm. see bug #600 Looking at the logs @Bleala provided between the an llm that worked and didn't work, i noticed the custom value is an array vs a decimal. I"m using lm studio and configured a structured output. This made my local llm start using an array for the custom value I named mine "Total". paperless ngx is now being updated with the value. |
|
It would be amazing, if some of you can share their promts including custom field. I tried a lot of combination yet, but without any visability in paperless-ngx. My setting: Using gpt-4omini. custom fieldsare createted in paperless-ngx as well as in paperless-ai. |
|
That worked fir me: |
|
It worked theoretically also with gemini 2.5 flash, but I had to add the expected json structure into my prompt. |






Uh oh!
There was an error while loading. Please reload this page.
How should the prompt be structured in order to populate custom fields in Paperless AI?
The fields are created successfully, but they remain empty after processing.
Is there a specific prompt format or syntax needed to instruct the model to fill these custom fields with extracted values?
In particular, I would like to:
Automatically generate a short summary (abstract) of the document.
Extract relevant keywords, including synonyms or alternative technical terms, to improve document discoverability.
Example use case:
From a medical document, extract a short summary and tag it with terms like:
"Hypertension", including synonyms such as high blood pressure, elevated BP
"Diabetes mellitus", also known as diabetes, high blood sugar
These values should ideally be written into custom fields or tags to improve search and classification.
Any examples or guidance on how to structure the prompt to enable this functionality would be highly appreciated.
Thanks :)
All reactions