How to convert tables into LLM friendly format


While LLMs can parse tables in files like Word or PDF, for important information it is best practice to convert tables into a specifically LLM-friendly format called markdown. This ensures the structure is as clear and readable as possible for the AI, leading to more accurate results.

Once converted, this markdown table can be placed in an assistant's instructions or saved as a file and uploaded to its Knowledge.

 

How to convert a table to markdown
The process involves using a general assistant to do the conversion for you.

  1. Open a general-purpose Madgwick assistant (e.g., your personal or executive assistant).

  2. Provide your table to the assistant. You can either drag and drop a Word or Excel file, or copy and paste the table directly into the chat.

  3. Instruct the assistant to convert it. Use a prompt like: "Convert this table to markdown format in a code window so I can extract it."

 

4. The assistant will generate the markdown version of your table in a black code window. Click the copy icon to copy the entire block of text.

5. You can now use this markdown text. Paste it directly into an assistant's 'Instructions' field, or save it as a .txt or .md file to upload to its Knowledge.

Using your markdown table: prompt vs. knowledge files
Placing a table in the prompt makes it a core instruction for the AI, not just a reference document. This ensures the assistant consistently follows the table's specific structure and data, leading to more accurate and reliable responses.

 

Advanced tip: use table templates for structured output
You can also use this technique to control how an assistant formats its answers. By providing an empty table structure in the prompt, you can instruct the AI to populate its responses using that specific layout.

For example, you can add a markdown table with just the headers you need and add the instruction: "When I ask for a summary, format your answer using this table structure." This ensures you get clear, consistently formatted results every time.

 
 
Previous
Previous

Madgwick AI cafe

Next
Next

Memory in Madgwick - A tale of two memory systems