[GH-ISSUE #1100] asking a LLM to process a csv file as a source for data #26309

Closed
opened 2026-04-22 02:29:04 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @igorschlum on GitHub (Nov 12, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1100

I don't know how to ask Ollama to process a csv file. When I ask Falcon of Llama2 to do so, they give me instructions that are not functional.

I tried a prompt like this:

"$(cat /Users/igor/Documents/text.txt)" please translate this text in English.

Falcon: Yes, I can translate it for you. However, I need the text in question to be able to
translate it accurately. Please provide the text for me to translate.<|endoftext|>

(base) igor@MacStudiodeIgor-001 ~ % ollama run llama2 "$(cat /Users/igor/Documents/text.txt)" please summarize this data
Of course! I'd be happy to help you summarize a text file using natural language processing (NLP)
techniques. To get started, could you please provide me with the text file you would like me to
summarize? Additionally, please let me know what kind of summary you would like me to generate
(e.g. a short summary, a detailed summary, a summary of key points)?

how can I provide you with a text file in csv to process it?
Great! You can provide me with a CSV file in several ways:

  1. Upload it to the chat: You can upload your CSV file to the chat by clicking on the "Attach file"
    or "Upload" button on the bottom left corner of the chat window. Select the CSV file from your
    computer and I'll be able to access it.
  2. Share a link: If you prefer, you can share a link to a cloud storage service like Google Drive,
    Dropbox, or OneDrive where the CSV file is located. Just provide me with the link and I'll be able
    to access the file.
  3. Provide a download link: If you have the CSV file hosted on a website or server, you can provide
    me with a link to download it directly.
  4. Manually enter data: If you don't have a CSV file available, you can manually enter the data
    into the chat window using the following format:
column1,column2,...
value1,value2,...

For example, if your CSV file has two columns named "Name" and "Age", you can enter the data like
this:

Name,Age
John,25
Mary,30
Bob,35
...

Please let me know which method you prefer, and I'll be happy to help you process the CSV file!

how I can ask you to translate a google doc file. The URL of the file is "https://docs.google.com/doc
... ument/d/1xgKxH1ZgIQJ5M_HZ_AqGudzN8cUSwGyeF-dEIoXtEng/edit?usp=sharing" ?

I'm just an AI and do not have the ability to access external links or documents. Therefore, I am
unable to translate the contents of the shared document directly.

Originally created by @igorschlum on GitHub (Nov 12, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1100 I don't know how to ask Ollama to process a csv file. When I ask Falcon of Llama2 to do so, they give me instructions that are not functional. I tried a prompt like this: "$(cat /Users/igor/Documents/text.txt)" please translate this text in English. Falcon: Yes, I can translate it for you. However, I need the text in question to be able to translate it accurately. Please provide the text for me to translate.<|endoftext|> (base) igor@MacStudiodeIgor-001 ~ % ollama run llama2 "$(cat /Users/igor/Documents/text.txt)" please summarize this data Of course! I'd be happy to help you summarize a text file using natural language processing (NLP) techniques. To get started, could you please provide me with the text file you would like me to summarize? Additionally, please let me know what kind of summary you would like me to generate (e.g. a short summary, a detailed summary, a summary of key points)? >>> how can I provide you with a text file in csv to process it? Great! You can provide me with a CSV file in several ways: 1. Upload it to the chat: You can upload your CSV file to the chat by clicking on the "Attach file" or "Upload" button on the bottom left corner of the chat window. Select the CSV file from your computer and I'll be able to access it. 2. Share a link: If you prefer, you can share a link to a cloud storage service like Google Drive, Dropbox, or OneDrive where the CSV file is located. Just provide me with the link and I'll be able to access the file. 3. Provide a download link: If you have the CSV file hosted on a website or server, you can provide me with a link to download it directly. 4. Manually enter data: If you don't have a CSV file available, you can manually enter the data into the chat window using the following format: ```csv column1,column2,... value1,value2,... ``` For example, if your CSV file has two columns named "Name" and "Age", you can enter the data like this: ```css Name,Age John,25 Mary,30 Bob,35 ... ``` Please let me know which method you prefer, and I'll be happy to help you process the CSV file! >>> how I can ask you to translate a google doc file. The URL of the file is "https://docs.google.com/doc ... ument/d/1xgKxH1ZgIQJ5M_HZ_AqGudzN8cUSwGyeF-dEIoXtEng/edit?usp=sharing" ? I'm just an AI and do not have the ability to access external links or documents. Therefore, I am unable to translate the contents of the shared document directly.
GiteaMirror added the question label 2026-04-22 02:29:04 -05:00
Author
Owner

@easp commented on GitHub (Nov 17, 2023):

Try working on your prompts. I've had some success being more explicit about where in the prompt to find the text I want it to analyze. For example ollama run mistral "Please summarize the following text: " "$(cat textfile)"

Beyond that there are some examples in the /examples directory of the repo of using RAG techniques to process external data.

<!-- gh-comment-id:1816746045 --> @easp commented on GitHub (Nov 17, 2023): Try working on your prompts. I've had some success being more explicit about where in the prompt to find the text I want it to analyze. For example `ollama run mistral "Please summarize the following text: " "$(cat textfile)"` Beyond that there are some examples in the /examples directory of the repo of using RAG techniques to process external data.
Author
Owner

@jmorganca commented on GitHub (May 6, 2024):

Hi @igorschlum, yes as @easp mentioned best to send the data in the context – models are much better at this now 😊

<!-- gh-comment-id:2097089551 --> @jmorganca commented on GitHub (May 6, 2024): Hi @igorschlum, yes as @easp mentioned best to send the data in the context – models are much better at this now 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26309