langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Number of requested results 4 cannot be greater than number of elements in index 3

Open lgertel opened this issue 2 years ago • 3 comments

Describe the bug ERROR - Error: Number of requested results 4 cannot be greater than number of elements in index 3

Browser and Version

  • Chrome
  • 112.0.5615.137

Screenshots image

lgertel avatar Apr 24 '23 22:04 lgertel

This was fixed in 76162a9ffa8314013fadb04217e09a688a635e97

It happens because what you are trying to load is not generating at least 4 documents which is the default number of retrieved documents by ChromaDB.

If you fix the split it could help (maybe the separator or the chunk size).

We are working on better tooling for debugging this kind of things.

ogabrielluiz avatar Apr 25 '23 14:04 ogabrielluiz

Is this one already available via pip or should I custom build it? Thanks for the answer!

lgertel avatar Apr 25 '23 14:04 lgertel

We'll release a new version today with many fixes and some new features. If you want to run it locally you can clone the dev branch and run make dev build=1and you should be able to check if your flow works properly on this version.

ogabrielluiz avatar Apr 25 '23 15:04 ogabrielluiz