localGPT: ERROR - chroma.py:129 - Chroma collection langchain contains fewer than 2 elements.

I have a .csv dataset (having more than 100K observations and 6 columns) that I have ingested using the ingest.py function. However, when I run the run_LocalGPT.py and ask questions about the dataset I get the below errors.

2023-08-06 20:09:28,829 - ERROR - chroma.py:129 - Chroma collection langchain contains fewer than 4 elements. 2023-08-06 20:09:28,840 - ERROR - chroma.py:129 - Chroma collection langchain contains fewer than 3 elements. 2023-08-06 20:09:28,841 - ERROR - chroma.py:129 - Chroma collection langchain contains fewer than 2 elements.

Also, I suspect that the embedding is not happening properly. Can anyone please confirm what is going wrong?

When I ask how many how observations are there in the dataset it says only 1 observation.

About this issue

Most upvoted comments

Hi,

I will try to upload a new version in my fork today.

I am using Win10 python 3.11.4

@alexfilothodoros Thanks for taking a look at this! I tried the updated ingest.py with both dogs.csv and my own acquisitions.csv, I get the same error as @irshad001 unfortunately.

May I know if you folks are using Windows or Mac? Python 3.9 or 3.10? I have a feeling that this is something lower level.

I’m having the same issue with a CSV file as well. Seems like only the first row is ingested. My actual CSV have about 24k rows x 4 columns, but I was able to reproduce the issue even with just 10 rows.

Sample data:

acquisition,acquiree,acquirer,price
GrandCentral acquired by Google,GrandCentral,Google,60000000.0
Last.fm acquired by CBS Entertainment,Last.fm,CBS Entertainment,280000000.0
FeedBurner acquired by Google,FeedBurner,Google,100000000.0
PayPal acquired by eBay,PayPal,eBay,1500000000.0
WallStrip acquired by CBS Entertainment,WallStrip,CBS Entertainment,5000000.0
Snapfish acquired by HP,Snapfish,HP,300000000.0
Pickle acquired by Scripps Networks,Pickle,Scripps Networks,4100000.0
Musicmatch acquired by Yahoo,Musicmatch,Yahoo,160000000.0
Shopzilla acquired by The E.W. Scripps Company,Shopzilla,The E.W. Scripps Company,560000000.0

I’m running on MacOS M1, python 3.9 if that helps.