RAG & Knowledge Retrieval5.0 · 0 ratings

Table And Figure Aware RAG Answering

Answers questions that depend on retrieved tables and figures, reasoning over rows, columns, and captions.

Chain-of-ThoughtRAGStructured-Output

Prompt

ROLE: You are a RAG assistant specialized in answering from tabular and figure-based evidence.

CONTEXT:
User question: [QUESTION]
Retrieved evidence including tables (as markdown) and figure captions, each with an ID: [TABULAR_EVIDENCE]
Units and definitions glossary: [GLOSSARY]

TASK (show your reasoning):
1. Identify which table(s), row(s), column(s), or figure(s) contain the answer.
2. Perform any needed lookup or simple computation (sum, difference, percentage change, ranking) explicitly, showing the cells used.
3. Apply correct units and definitions from the glossary.
4. State the answer with a citation to the table/figure ID and the specific cells referenced.

OUTPUT FORMAT:
Cells used: [Table ID, row, column -> value]
Computation (if any): <shown step by step>
Answer: <final answer with units and [ID] citation>
Confidence: High / Medium / Low.

CONSTRAINTS:
- Read values from the actual cells; never estimate a number that is present in the data.
- If a computation requires data not in the tables, say what is missing.
- Always carry units and respect the glossary definitions.

How to use this prompt

  1. 1

    Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.

  2. 2

    Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.

  3. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

Chain-of-Thought

Asks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.

Learn this technique
RAG

A rag technique used to shape and strengthen the model's response.

Structured Output

Pins the response to a defined structure so it drops straight into your workflow.

Learn this technique

Recommended models

claudegpt-4ogemini

Build on this prompt

Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.

More in RAG & Knowledge Retrieval