Today ollama is structured to include the source of the data at the end of the response.
Example. Salary is paid at the 15. each month [source]. But during testing this has shown to not be fool proof. As such the source can be set at the start of the text. It can be added twice, and it might be omited all together. Although it has never made ut a source during testing, but this is also a possibility.
A solution to this could be to update the response body that we tell ollama to use with its structured-outputs functionallity. This way we can get a json object of the text and source as seperate objects, and programatically add them together manually to ensure consistency.
Today ollama is structured to include the source of the data at the end of the response.
Example. Salary is paid at the 15. each month [source]. But during testing this has shown to not be fool proof. As such the source can be set at the start of the text. It can be added twice, and it might be omited all together. Although it has never made ut a source during testing, but this is also a possibility.
A solution to this could be to update the response body that we tell ollama to use with its structured-outputs functionallity. This way we can get a json object of the text and source as seperate objects, and programatically add them together manually to ensure consistency.