ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: What does "positions" in the reference returned by the chat interface mean?

Open sinopec opened this issue 9 months ago • 3 comments

Describe your problem

I want to develop a flexible interface using the results returned by the chat API, but I don’t understand the meaning of the "positions" field in reference. I checked the official API documentation, but there is no corresponding explanation for this field. Specifically, I want to achieve the same effect as the official implementation of inserting citation buttons within the text, but I don’t know how to insert them in the appropriate positions.

sinopec avatar Mar 05 '25 08:03 sinopec

The number braced by ## and $$ is the index of chunks in response["reference"]["chunks"]. Positions are composed of page number, coordinates and size.

KevinHuSh avatar Mar 06 '25 03:03 KevinHuSh

The number braced by ## and $$ is the index of chunks in response["reference"]["chunks"]. Positions are composed of page number, coordinates and size.

How does the front-end page insert the corresponding circular button into a specific position in the text? What is this based on,If the position information refers to the location of the referenced text in the original content.

sinopec avatar Mar 06 '25 06:03 sinopec

I want to insert a chunk into a document through the API so that the chunk can be displayed directly on the PDF as if it had been parsed automatically. Actually, I now have this chunk coordinates in the PDF, is there a way to achieve it?

sun-qisen avatar Mar 06 '25 10:03 sun-qisen

The number braced by ## and $$ is the index of chunks in response["reference"]["chunks"]. Positions are composed of page number, coordinates and size.

in 0.17.2 use elasticsearch positions are normally Arabic numerals, but there are some things in English letters sometimes, eg. ##k$$ how to fix it?

shurllsy avatar Mar 19 '25 01:03 shurllsy