Skip to content

[BUG]: Pinned and Watched Documents without RAG #5334

Description

@sugoidesune

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

I would like to always add the entire, current, content of a file as context to my message, without embedding it through RAG.

The content of the file changes, so I can't use any of the static ways like System Prompts.

Currently the watch feature doesn't update when a new thread is created or a new message sent.
I found out that toggling the watch icon, updates the status under Watched documents but doesn't actually update the document. The documentation says that pinned documents are excluded from RAG, but have found that sometimes two versions of the document are added as context. Since pinned documents are excluded from RAG, therefore when watched there is no reason to not always read the latest version of a file from disc.

I suspect the various optimizations for pinned and for watched documents are not playing nicely together, hampering this feature.

Other options I considered that didn't work:
I was hoping to use system prompt variables, but those can't be dynamic (which would be a great feature on its own)

I also do not want to make two API calls each time in agent mode to have it read the file, doubling the cost.

Are there known steps to reproduce?

Pin and Watch a text file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Desktoppossible bugBug was reported but is not confirmed or is unable to be replicated.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions