Skip to content

AI context window truncation #1875

@enetheru

Description

@enetheru

While testing the ai generated commit messages using ollama, i noticed that after a certain point the AI just ignores the instructions and goes off on crazy tangents.

This happens because of the behaviour ollama has when its context window size limit is reached, it kicks out previous context dumping the prompt from the start of the window, which causes the AI to just do what it wants.

The start of the window can aparrantly be preserved with a property sent to the server: numkeep. But i got this info from talking to chatgpt-mini in github: https://github.com/copilot/share/024150be-0940-84c3-8103-b0080482401e

It suggested a PR, but i didnt want to be respnsible for a fuss like that.

A workaround is to limit the context by selecting files individually to limit the context window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions