ragflow/api/db/services
devMls 41a0601735
organize chunks by document in the prompt (#3925)
### What problem does this PR solve?

This PR organize chunks in the prompt by document and indicate what is
the name of the document in this way

```
Document: {doc_name} \nContains the following relevant fragments:
chunk1
chunk2
chunk3

Document: {doc_name} \nContains the following relevant fragments:
chunk4
chunk5
```

Maybe can be a baseline to add metadata to the documents.

This allow in my case to improve llm context about the orgin of the
information.


### Type of change

- [X] New Feature (non-breaking change which adds functionality)

Co-authored-by: Miguel <your-noreply-github-email>
2024-12-10 09:06:52 +08:00
..
__init__.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
api_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
canvas_service.py Fix session API issues. (#3939) 2024-12-09 17:37:36 +08:00
common_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
conversation_service.py api http return error (#3941) 2024-12-10 09:04:24 +08:00
dialog_service.py organize chunks by document in the prompt (#3925) 2024-12-10 09:06:52 +08:00
document_service.py Add support to iframe chatbot (#3929) 2024-12-09 12:38:04 +08:00
file2document_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
file_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
knowledgebase_service.py Add pagerank to KB. (#3809) 2024-12-03 14:30:35 +08:00
llm_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
task_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
user_service.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00