Hello Chandra,
Thanks for reaching out to us, the response text containing references like [doc1]
, [doc2]
, etc., alongside the regular text indicates the presence of citations or document references related to the information provided in the response. These references are typically placeholders or markers that point to specific documents or sources where the information mentioned in the response can be found.
- Meaning of
[doc1]
,[doc2]
, etc.
Placeholder References: [doc1]
, [doc2]
, etc., are placeholders used within the response text to denote citations or document identifiers. They do not represent the actual document content but rather serve as markers or tags.
Dynamic Document Links: In some applications or systems, these placeholders might be replaced with actual hyperlinks or references to specific documents when presented to the end user. For example, clicking on [doc1]
might lead to a detailed view or summary of the document referenced as "doc1".
- Tying References with Citations
To tie these references ([doc1]
, [doc2]
, etc.) with actual citations or documents:
- Data Integration: Ensure that your application or system has integration logic that associates these placeholders with actual document metadata or links. This integration might involve querying a document database or search index to retrieve detailed information about each referenced document.
- Response Parsing: When handling the response from the Azure Open AI chat/completions endpoint, your application should parse the response text and identify these placeholders. It can then retrieve corresponding metadata or links from your document management system or database.
- Display and Interaction: Implement a user interface that dynamically links or displays these references in a meaningful way. Users should be able to interact with these references to access more information about the cited documents.
Assuming your application receives the response:
"The agreement stipulates that the advance amount for Capital Improvements is $1,000,000.00 [doc3][doc4]. However, the customer has requested that the limit for Capital Improvements Advances be $1,500,000.00 [doc1]."
Your application could:
- Parse the response text to identify
[doc1]
,[doc3]
, etc. - Query your document index or database to fetch metadata (like title, summary, link) for each referenced document.
- Present these references alongside the response text, allowing users to click or hover over them to access more information.
I hope this helps, please let us know if you have more questions.
Regards,
Yutong
-Please kindly accept the answer if you feel helpful to support the community, thanks a lot.