Skip to content

Fix source reference in responses from ollama query #9

Description

@JacobIhle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions