Find answers from the community

Updated 2 years ago

CSV Files

At a glance

The post asks if CSV files can be used instead of PDFs with LlamaIndex for the knowledge base. The comments suggest that using CSV files can be a bit tricky, and the recommended approach is to load the CSV into a SQL database or a dataframe, and then use the Pandas query engine or text-to-SQL. For highly numerical CSVs, the community members suggest using the paged CSV reader for the best results.

Useful resources
Can i use csv files instead of pdfs with llamaindex for the knowledge base?
E
L
2 comments
I think @Logan M can answer better

https://gpt-index.readthedocs.io/en/stable/examples/query_engine/pandas_query_engine.html

https://gpt-index.readthedocs.io/en/latest/examples/index_structs/struct_indices/SQLIndexDemo.html

But using CSV is a little tricky, the recommended is to load your CSV into a SQL database (without LLMs, just with code) or dataframe and then use pandas query engine or the text-to-sql
yea, highly numerical CSVs are best used with the suggetions above.

If you reaaally just want to do similarity search, you can try using the paged csv reader for best results
https://llamahub.ai/l/file-paged_csv
Add a reply
Sign up and join the conversation on Discord