Find answers from the community

Updated 10 months ago

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

@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