You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When using the "Ask your data" mode, the citations are not rendered correctly. Unlike Chat mode, which renders citations using footnotes and a list of linked citations at the end , the "Ask your data" mode only appends the source names in round brackets within the text. This appears to be caused by a missing instruction in the prompt file.
Steps to Reproduce:
Use the "Ask your data" mode in the application.
Observe that citations are rendered with round brackets instead of the expected square bracket format and thus not being rendered.
Compare pre-rendered answers from Chat mode and "Ask the data" mode by adding console.log(answer.message.content); to app/frontend/src/components/Answer/Answer.tsx as first command in export const Answer (e.g., before const followupQuestions = answer.context?.followup_questions;
Expected Behavior:
Answers are rendered with a footnote at the respective position and a linked list of citations at the end of the answer.
Actual Behavior:
Citations are displayes as plain text with round brackets, which does not follow the intended format.
Proposed Fix:
Update the file app/backend/approaches/prompts/ask_answer_question.prompty to include the following instruction, similar to the one in chat_answer_question.prompty:
Each source has a name followed by the actual information, always include the source name for each fact you use in the response. Use square brackets to reference the source, for example [info1.txt]. Don't combine sources, list each source separately, for example [info1.txt][info2.pdf].
By adding this instruction, the "Ask your data" mode should render citations correctly.
Additional Context:
The chat_answer_question.prompty file already includes the correct instruction.
The discrepancy in prompt instructions between the two modes leads to inconsistent citation rendering.
The text was updated successfully, but these errors were encountered:
You're right, we somehow lost that part of the instruction. I can make a PR for it, although you're welcome to make it as well.
Unfortunately, I currently only run quality evaluations on the /chat endpoint when I make changes, so I didn't notice that issue for the /ask endpoint.
Description:
When using the "Ask your data" mode, the citations are not rendered correctly. Unlike Chat mode, which renders citations using footnotes and a list of linked citations at the end , the "Ask your data" mode only appends the source names in round brackets within the text. This appears to be caused by a missing instruction in the prompt file.
Steps to Reproduce:
console.log(answer.message.content);
toapp/frontend/src/components/Answer/Answer.tsx
as first command inexport const Answer
(e.g., beforeconst followupQuestions = answer.context?.followup_questions;
Expected Behavior:
Answers are rendered with a footnote at the respective position and a linked list of citations at the end of the answer.
Actual Behavior:
Citations are displayes as plain text with round brackets, which does not follow the intended format.
Proposed Fix:
Update the file
app/backend/approaches/prompts/ask_answer_question.prompty
to include the following instruction, similar to the one inchat_answer_question.prompty
:By adding this instruction, the "Ask your data" mode should render citations correctly.
Additional Context:
The chat_answer_question.prompty file already includes the correct instruction.
The discrepancy in prompt instructions between the two modes leads to inconsistent citation rendering.
The text was updated successfully, but these errors were encountered: