Accessing tables of information accurately

Hi,

I have a prompt that is an expert in a chosen field. I’d like the prompt to be able to recall a set, unchanging table when asked to. For example “give me a recipe for lasagne el chillyo” . The prompt would then give the full table matching the title “lasagne el chillyo” including the information exactly as in the table without adding, taking away or changing anything. I have tried accomplishing this by adding both markdown and pdf copies of the tables (there are approximately 40) in the knowledgebase, but the output is always a combination of different tables and rarely, if ever accurate.

I have resorted to pasting all the tables directly into the prompt in markdown format (this works but only with a prompt injection to remind the assistant to include all the info from the matching table in the prompt).

This makes the prompt huge and unweildy and I know there must be a way to get around this? Perhaps with an action or some special way of presenting the tables in the Knowledgebase.

I would REALLY, REALLY appreciated some help with this. There must be a solution… I find it hard to believe that accessing concrete tables of organised information is beyond Pickaxe?!

Thanks in advance!
Terry

1 Like

Using a knowledge base may not be the best approach for this task. Most likely, you will need to use SQL. Store the data in an SQL table (such as Google BigQuery) and create an action for Pickaxe to query it. The action will convert user prompts to SQL, fetch the data from the table, convert it back to natural language, and display it to the user.

I have been working on this with some success in Pickaxe and am still refining the approach (especially the prompt. Its still not foolproof).

This guide was very helpful: GPT Actions library - BigQuery | OpenAI Cookbook.

The guide above is based on ChatGPT actions. Pickaxe actions are similar, and I prefer them because they are written in Python, making them easier to understand.