## Diagram: ZS-FinDSL prompt for FinQA
### Overview
The image presents a diagram illustrating the ZS-FinDSL prompt for FinQA, showcasing four distinct processes: Reasoning extraction, Program extraction, LLM answering, and Answer extraction. Each process involves a question-answering sequence, utilizing a Large Language Model (LLM) at different stages. The diagram uses color-coded elements to represent different aspects of the process, such as signifiers, memetic proxies, constraining behavior, meta prompts, and inputs.
### Components/Axes
* **Titles:**
* Reasoning extraction (top-left)
* Program extraction (top-right)
* LLM answering (bottom-left)
* Answer extraction (bottom-right)
* **Elements:**
* **Input Box (Light Blue):** Contains the question-answering prompt.
* Passage: text + table
* Question: ask question?
* Answer:
* **LLM Icon:** Represents the Large Language Model.
* **Output Box (Pink):** Contains the LLM's response.
* **Arrows:** Indicate the flow of information.
* **Legend (Bottom Center):**
* Black square: Signifier
* Orange square: Memetic proxy
* Pink square: Constraining behavior
* Green square: Meta prompt
* Blue square: Input
* **Figure Caption:** Figure 2: ZS-FinDSL prompt for FinQA
### Detailed Analysis
**1. Reasoning Extraction (Top-Left)**
* **Input:**
* "Read the following passage and then answer the question:"
* "Passage: text + table"
* "Question: ask question?"
* "Answer this question by finding the relevant values and performing step by step calculations."
* "Answer:"
* **Process:** The input is fed into an LLM.
* **Output:** "Answer with reasoning from LLM."
**2. Program Extraction (Top-Right)**
* **Input:**
* "Question: ask question?"
* "Answer: Answer with reasoning from LLM."
* "Task: From the above question-answer, extract the calculations that were performed to arrive at the answer. The calculations should be provided in the following format:"
* `{"PROGRAM": {"#0":{OPERATION:"[arithmetic/logic]", ARG1:"[float/int]", ARG2:"[float/int]"}, "#1":{OPERATION: [arithmetic/logic], ARG1:"#0", ARG2:"[float/int/#int]"}, ...}, "ANSWER": "[numerical/boolean]"}`
* "Operation should strictly be restricted to {add, subtract, multiply, divide, exponent, greater-than, max, min} only."
* "When evaluated the program should only generate numerical or boolean values."
* "Solution:"
* **Process:** The input is fed into an LLM.
* **Output:** "Program generated by the LLM."
**3. LLM Answering (Bottom-Left)**
* **Input:**
* "Read the following passage and then answer the question:"
* "Passage: text + table"
* "Question: ask question?"
* "Answer:"
* **Process:** The input is fed into an LLM.
* **Output:** "Answer from LLM."
**4. Answer Extraction (Bottom-Right)**
* **Input:**
* "Question: ask question?"
* "Answer: Answer from LLM."
* "The final answer (float/int/boolean) is:"
* **Process:** The input is fed into an LLM.
* **Output:** "Final answer generated by the LLM."
### Key Observations
* Each process starts with a question-answering prompt.
* The "Program extraction" process has a specific task to extract calculations and provide them in a structured format.
* The LLM is used in all four processes.
* The diagram uses color-coding to differentiate between different elements.
### Interpretation
The diagram illustrates the ZS-FinDSL prompt for FinQA, which involves a multi-stage process of reasoning, program extraction, LLM answering, and answer extraction. The "Program extraction" stage is particularly important as it aims to extract the calculations performed by the LLM to arrive at the answer. This allows for a more transparent and explainable AI system. The diagram highlights the flow of information between the different stages and the role of the LLM in each stage. The color-coding helps to differentiate between the different elements and provides a visual representation of the process.