Find answers from the community

Updated 12 months ago

I am getting the following error when extracting top 5 indices from an index query engine

At a glance

A community member is encountering a ValueError: Calculated available context size -42 was not non-negative error when extracting the top 5 indices from an index query engine. Another community member responds that they don't have enough information to provide a confident answer, but suggests checking the LlamaIndex documentation and source code for more details on how the context size is calculated and used during querying. They also recommend ensuring that the query and the context provided to the query engine are within the acceptable size limits for the model being used.

@kapa.ai I am getting the following error when extracting top 5 indices from an index query engine wrt a query
ValueError: Calculated available context size -42 was not non-negative.
k
2 comments
Please stand by @balanp as I search the knowledge base. I normally take about 20 seconds or so. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The error you're encountering seems to be related to the context size when querying the index. However, the provided extracts do not contain specific information about this error or how to resolve it.

I recommend checking the LlamaIndex documentation or the source code for more details on how the context size is calculated and used during querying. Here are some potentially relevant links from the extracts:

  • LlamaIndex Documentation ()
  • LlamaIndex GitHub Repository ()
Remember to ensure that your query and the context you're providing to the query engine are within the acceptable size limits for the model you're using.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Add a reply
Sign up and join the conversation on Discord