How to link chatbot answers to specific source text locations in PDFs using semantic search

I’m using Pipeline Builder along with AIP logic for PDF chunking and embedding. I’m also leveraging Workshop as an interface to build a chatbot experience. The PDFs involved are technical documents. When a user asks a question, the system responds using semantic search via a KNN object.

My requirement is to display the source PDF links in the chatbot’s response. Additionally, when a user clicks on a link, it should direct them to the exact (or closest possible) section of the document that the model used to generate the answer.

Could anyone advise on how to achieve this? Is there a recommended way to associate semantic search results with specific sections or anchor points in the original PDF?

Hi - below AIP logic training course has the similar one except the link reference. isn’t that you are looking for ?
https://learn.palantir.com/speedrun-your-e2e-aip-workflow/

Hi
Have you tried creating chunked pages and add it to ontology ? I am not sure if it would work for you but I was able to retrieve the object rid from the search result and show that object link as reference in the chat . If you want to highlight specific lines in the text , you may want to instruct the LLM to create a markdown format of the source text verbatim as well