mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2026-07-19 14:13:35 -04:00
Closed
opened 2026-02-22 18:21:04 -05:00 by yindo
·
8 comments
No Branch/Tag Specified
master
5846-bug-when-scrolling-up-scrolling-jumps
refactor-remove-workspace-pfp
5969-bug-stopgenerationbutton-disappears-on-the-first-prompt-that-initiates-an-agent-session
2235-bug-how-to-upload-a-folder-with-subfolders-with-files-to-anythingllm
5990-workspace-update-fails-with-unknown-argument-router_id-v1130v1150-intel-mac
opencomputer-examples
pg
feat/image-generation-translations
feat/image-generation
5924-bug-meeting-summary-fails-with-sincludes-is-not-a-function-when-default-llm-is-anthropic-claude
render
feat/uniform-modal-component
5883-bug-unescaped-content-in-json-strings-being-passed-to-document-generator-tools
5901-bug-api-update-embeddings-fails-prisma-argument-filename-is-missing-on-workspace_documentscreate-desktop-windows-v1141
hybrid-search
1981-translations
5752-bug-prompts-to-local-jan-endpoint-unresponsive
feat-disable-native-tool-calling-env-var
5676-bug-non-ollama-agent-providers-do-not-parse-and-present-reasoning-content
feat/markdown-web-scraping
5717-bug-apiv1documentupload-silently-drops-metadata-field-in-desktop-1130-arg-count-mismatch-nested-payload-key
fix/aibitat-context-overflow
5711-bug-erratic-deepseek-v4-flash-the-agent-model-failed-to-respond-400-the-reasoning_content
5631-feat-custom-api-request-timeouts-for-ai-providers
feat-reasoning-control
feat-agent-clarifying-questions-translations
5583-bug-lm-studio-provider-does-not-present-reasoning-output
5313-normalize-translations
feat/memory-translations
5305-lemonade-embedding-engine-swallows-errors-falsely-reports-documents-as-embedded
5060-bug-agent-interactions-agent-are-not-persisted-to-thread-history-via-api
pptx-subagent
feat-render-images-from-mcp-tool-results
stt-provider-expansion-openai-api-compatible
feat-file-search-agent-tool
feat-native-embedder-job-queue
5189-normalize-translations
feat-file-search-agent-tool-translations
i18n-eslint
5140-auto-migration
5112-bug-openrouter-failed-message-bug
3506-feat-parameters-for-openrouter-models
4992-feat-preserve-scroll-position
4973-bug-markdown-numbered-list-display-in-reasoning-pane
desktop
4938-bug-pending-chat-rerendering-ui-bug
quickstart-env
node-llama-cpp-in-container-cuda
node-llama-cpp-in-container
ollama-in-container
4817-feat-set-cooldown-per-mcp-server
4845-keyboard-shortcuts-to-navigate-in-chat
4844-feat-reorder-threads-by-latest-interaction
standardize-username-constraints-normalize-translations
4792-feat-refactor-workspacepfp-image
1382-embed-ip-improvements
1382-bug-embed-api-improvements
refactor-eslint-frontend
4687-feat-refactor-vector-db-providers
4615-feat-disable-apidocs-with-environment-variable
4559-feat-agent-web-search-enable-ordering-of-results
4599-bug-ollama-race-condition-bug
4572-bug-lmstudio-provided-llm-stopped-working-with-anything-llm-after-upgrading-to-190
4508-agent-youtube-transcript-analysis
4497-feat-workspace-names
frontend-eslint
ollama-lmstudio-auto-context-window
4431-validate-vector-database-connectioN
2019-slash-command-keyboard-selection
microsoft-foundry-provider
4431-validate-vector-database-connection
4325-sys-prompt-var-improvements
3209-feat-apiv1workspacestream-chat-sources-citations
4210-bug-voice-to-text-overwrite
4136-feat-jan-as-a-backend-server-option
4172-feat-openai-o3-support
1.8.3-rerelease
web-push-notifications-service
tasks
3955-feat-jinaai-embedder-provider-support
3921-feat-agent-skills-uiux-improvements
3901-bug-validfunccall-checks-optional-arguments
keyboard-dev
1787-custom-roles-and-permissions
add-jira-slack-data-connector
office-extension-wip
lightmode-dropdown-color-update
3586-bug-agent-flow-function-description-provided-by-user-is-not-seen-in-the-llm-query
3463-bug-agent-continues-to-run-if-request-failed-even-after-exit
3439-feat-call-variables-within-the-flow-api-block-url-field
3282-manager-view-models-workspace
3280-token-counting-server-side-truncation-improvements
3147-bug-embedded-chat-widget---not-considering-query-mode-option-always-working-in-chat-mode
2995-feat-disable-temperature-setting-for-deepseek-r1-deepseek-reasoner-model
2827-feat-perplexity-citations
2866-feat-finally-a-gemini-models-endpoint
2647-feat-hpp-header-for-a-c++-code-file-mime-addition
lancedb-revert
1656-feat-implement-tooltip-ui-designs
2011-feat-bump-perplexity-models
1873-feat-auto-add-and-watch-folder-for-document-uploads
1297-feat-gemini-agent-support
1759-bug-ui-bug-fixes
1686-feat-implement-winston-for-logging
1536-bug-toggling-on-users-can-delete-workspaces-does-not-take-effect
agent-ui-mobile-styles
1522-feat-chromadb-support
1595-bug-unable-to-get-live-web-search-and-browsing-agent-working-using-google-custom-search-engine-error-getaddrinfo-enotfound-http-errno-3008
1582-bug-lm-studio-does-not-allow-for-different-model-selection
1312-bug-usernames-should-not-be-case-sensitive-when-logging-in
1029-feat-hf-serverless-inference-api
1086-feat-implement-normalized-input-fields
knowledge-graph-support
644-bug-uploaded-file-name-does-not-match-the-displayed-file-name-after-the-upload
v1.15.0
v1.14.2
v1.14.1
v1.14.0
v1.13.0
v1.12.1
v1.12.0
v1.11.2
v1.11.1
v1.11.0
v1.10.0
v1.9.1
v1.9.0
v1.8.5
v1.8.4
v1.8.3
v1.8.2
v1.8.1
v1.8.0
v1.7.8
v1.7.6
v1.7.5
v1.7.4
v1.4.0
v1.3.0
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.0
Labels
Clear labels
Desktop
Docker
Integration Request
Integration Request
OS: Linux
OS: Mobile
OS: Windows
UI/UX
blocked
bug
bug
core-team-only
documentation
duplicate
embed-widget
enhancement
feature request
github_actions
good first issue
investigating
needs info / can't replicate
possible bug
pull-request
question
stage: specifications
wontfix
Mirrored from GitHub Pull Request
No Label
needs info / can't replicate
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mintplex-Labs/anything-llm#733
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RahSwe on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1187
How are you running AnythingLLM?
Not listed
What happened?
Using Railway instance, with Gemini Pro 1.5 (1M context window).
I am trying to maximize the advantage of the context window by pinning many and large files. It however seems that ALLM does not provide all the pinned files in the request (+20 files).
Also, only some of the pinned files appear in the citations.
From the answers, it seems clear that some of the pinned files are not provided.
Are there known steps to reproduce?
I would guess use Gemini Pro 1.5 API and pin a lot of files, also having files not pinned, and verify that ALLM correctly submit all the pinned files, along with snippets from the unpinned files, and correctly reflecting the sources in citations.
@timothycarambat commented on GitHub (Apr 25, 2024):
Are you sure there are files being omitted and it is not just the model ignoring the context? In the code there is no limit to how many files can be pinned, but there is still a context window and if it is over 1M tokens it will still be pruned from the chat.
Since you are on Railway you should see in the logs when a chat is sent if the context if too large for Google and it should say something like
cannonballing context xxxx to xxxxor something along those likes - which indicates you still sent too much text and we had to truncate it@RahSwe commented on GitHub (Apr 25, 2024):
Hi Tim!
Yes, I am not sure if it is connected with a redeployment, but suddenly I have major issues in all workspaces getting reports from all over the organization.
I have temporarily shut down the instance and have been testing around for an hour two, deleting all files and switching around different AI models (Claude 3-Opus or Gemini 1.5), different embedder (local or Open AI Large) and vector databases (local or Pinecone).
But my server went from awesome to getting all kinds of things wrong from not knowing the information in embeddings and pinned documents.
I have made sure that I am within the 1M range, testing with a few smaller files only but it really seems to be hit and miss.
By the way, are there any downsides to using internal vector database and internal embedding model as opposed to the ones mentioned?
@RahSwe commented on GitHub (Apr 25, 2024):
Hi, adding info that may be relevant, when I look at citations some of the pinned files are sometimes shown but not other pinned files (files that should also should have very high relevance).
@RahSwe commented on GitHub (Apr 25, 2024):
This is a picture from continued testing of our server.
It is very strange. Now instead of getting the answer from Gemini Pro, it
seems to give a weird reference in the beginning of the answer. The answer
is also wrong, not taking into account the most relevant document (pinned),
which is also not listed in the citations.
However another pinned document (AB 04), which contains no information on
the current query, is listed.
[image: image.png]
On Thu, Apr 25, 2024 at 4:57 PM Richard Sahlberg @.***>
wrote:
@RahSwe commented on GitHub (Apr 25, 2024):
Hi,
Another question. In my troubleshooting of this issue, I am removing vectors and as I have understood it, is it necessary to delete all files as well when you are switching embedding model? Then re-upload and re-embed? That was the information in the box appearing when switching model but it seems unnecessary to have to remove and reupload all files?
If it is necessary, it would be great to have an option to delete all files in a folder without deleting the folder itself (I have about 30 folders).
BR Richard
@timothycarambat commented on GitHub (Apr 25, 2024):
🤔 Hm, if a document is pinned then it for sure will be used in the messages sent to the model.
If you change the embedding model this will make all previously embedded documents and workspaces broken because the differences in embedder model outputs will make vector search impossible. So they would need to be deleted and re-embed.
This is where it occurs
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/chats/index.js#L93
Gemini pro has a context of https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L59C16-L59C25
and because we manage the context window and snippets are appended to system the real limit is
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L26
or ~ 157,286 tokens. Roughly 15%
The reason we put those limits is because some people like to put really really large inputs and some like to put really large system prompts. We have to cut it one way or another.
Im willing to bet because you has so many documents pinned and that context is still more than 100K tokens most of your documents are not making it to chat.
I am willing to bet that running
/reseton a chat window to wipe the history will result in a better first-response. I think what we need to do is have the prompt window values be dynamic based on which value is larger.If system is huge - that should take the majority of the window and shrink the allocation for user prompt. If the user prompt is large, then shrink the allocation for system.
Context window is limited so you cant have it both ways. That is for sure what is going on here.
@RahSwe commented on GitHub (Apr 25, 2024):
Hi Tim, yes it sounds like a dynamic mode would be necessary or some kind of setting in the workspace area.We are typically maxing the context window-10 % with pinned files, having the user prompt and answer being a very small part of the intended context window usage.And please let me add another function wish - having a admin tab or such where you can adjust chosen settings of workspaces all at once. I have 25 workspaces where I sometimes update them all in the same way which becomes a bit tedious =)Med vänlig hälsningRichard SahlbergAdvokat/Partner Foyen Advokatfirma+46 737 19 51 @.*** | LinkedIn Our services are subject to General Terms and Conditions, which are available on our website here.This communication is confidential and is only intended for the use of the individual or entityto which it is directed. It may contain information that is privileged and exempt from disclosureunder applicable law. Please find Privacy Policy here for information on how we process personal data.25 apr. 2024 kl. 18:31 skrev Timothy Carambat @.***>:
🤔 Hm, if a document is pinned then it for sure will be used in the messages sent to the model.
If you change the embedding model this will make all previously embedded documents and workspaces broken because the differences in embedder model outputs will make vector search impossible. So they would need to be deleted and re-embed.
This is where it occurs
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/chats/index.js#L93
Gemini pro has a context of https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L59C16-L59C25
and because we manage the context window and snippets are appended to system the real limit is
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L26
or ~ 157,286 tokens. Roughly 15%
The reason we put those limits is because some people like to put really really large inputs and some like to put really large system prompts. We have to cut it one way or another.
Im willing to bet because you has so many documents pinned and that context is still more than 100K tokens most of your documents are not making it to chat.
I am willing to bet that running /reset on a chat window to wipe the history will result in a better first-response. I think what we need to do is have the prompt window values be dynamic based on which value is larger.
If system is huge - that should take the majority of the window and shrink the allocation for user prompt. If the user prompt is large, then shrink the allocation for system.
Context window is limited so you cant have it both ways. That is for sure what is going on here.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
@RahSwe commented on GitHub (Apr 25, 2024):
Another thought on this - I have experimented in pinning beyond the max tokens in the AI model and I have received error messages from the model itself, that the total amount of tokens is too big. Just curious how that is possible if there are set limits/fractions in ALLM for different parts of the prompt.Med vänlig hälsningRichard SahlbergAdvokat/Partner Foyen Advokatfirma+46 737 19 51 @.*** | LinkedIn Our services are subject to General Terms and Conditions, which are available on our website here.This communication is confidential and is only intended for the use of the individual or entityto which it is directed. It may contain information that is privileged and exempt from disclosureunder applicable law. Please find Privacy Policy here for information on how we process personal data.25 apr. 2024 kl. 18:31 skrev Timothy Carambat @.***>:
🤔 Hm, if a document is pinned then it for sure will be used in the messages sent to the model.
If you change the embedding model this will make all previously embedded documents and workspaces broken because the differences in embedder model outputs will make vector search impossible. So they would need to be deleted and re-embed.
This is where it occurs
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/chats/index.js#L93
Gemini pro has a context of https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L59C16-L59C25
and because we manage the context window and snippets are appended to system the real limit is
https://github.com/Mintplex-Labs/anything-llm/blob/dfaaf1680ff4de647de727fcd404ec044c5dd8e2/server/utils/AiProviders/gemini/index.js#L26
or ~ 157,286 tokens. Roughly 15%
The reason we put those limits is because some people like to put really really large inputs and some like to put really large system prompts. We have to cut it one way or another.
Im willing to bet because you has so many documents pinned and that context is still more than 100K tokens most of your documents are not making it to chat.
I am willing to bet that running /reset on a chat window to wipe the history will result in a better first-response. I think what we need to do is have the prompt window values be dynamic based on which value is larger.
If system is huge - that should take the majority of the window and shrink the allocation for user prompt. If the user prompt is large, then shrink the allocation for system.
Context window is limited so you cant have it both ways. That is for sure what is going on here.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
[BUG]: RAG use with large context windows/many filesto [GH-ISSUE #1187] [BUG]: RAG use with large context windows/many files