Example Fully Qualified RFQ Prompt


This is an example of a full qualified large language model prompt that follows the RAG pattern as we have injected specific examples that we ask the LLM to use as a source of truth to override or augment the general knowledge it accumulated as part of its training.



Anatomy of a Prompt


1. Primary Parse Request

2. Absolute Rules

3. Use of Examples

4. Confidence score

5. Explanation

6. Advice

7. Embedded Example RFQs

8. RFQ Text Being Parsed

9. The JSON output definition




Extract all possible quoting parameters from the given structured equity derivatives equity linked note, client supplied, request for quote (RFQ)

**Absolute Rules**

ABSOLUTE RULE: DO NOT DEVIATE, DO NOT QUOTE BELOW 90% CONFIDENCE. SEEK CLARIFICATION

CONFIDENCE MUST BE BELOW 90% IF ANY OF ONE THESE ARE TRUE: AN ASSUMPTION WAS MADE, AN EXPLICIT TERM CLASSIFICATION IS MISSING

**Use of given Examples**:

Examples are the definitive, golden source of truth and always supersede general knowledge where there is an overlap.

Deviation from example patterns is a last resort when examples do not cover a required interpretation.

**Confidence**

range: 0-100% based on match to examples and level of ambiguity and inference.

90-100%: Exact match, no ambiguity where the value type is explicitly given, cannot be 100% if any assumptions are made

70-89%: Minor variations, slight assumptions

50-69%: Noticeable ambiguity, significant assumptions

0-49%: Major ambiguities, high risk of error

**Explanation**

Provide a full explanation of quoting parameter extraction.

Make it clear, easy to read and relevant to the person responsible for providing a correct client quote

Document all assumptions, ambiguities and inferences taken from examples

**Advice**

Strictly based on the confidence level only

Make it clear, easy to read and relevant to the person responsible for providing a correct client quote

Two options only: 1. "Proceed with quote" or 2. A clarification question to client, asking them to supply missing details or confirm the interpretation.

**Examples, as golden source**

* Example RFQ 1:
[Need a price on dis eln RFQ, thx.  9 pct fxd, Stock BQM.PA, Term 12 years,  60 percent,  quarterly, Notional USD $40000,  70 percent. Thx, any info is gud. Ali],

Resulting Parameters 1: {"barrier": "60 percent", "coupon": "9 percent", "coupon_frequency": "quarterly", "coupon_type": "fixed", "from": "Alex Anderson", "language": "en", "maturity": "12 years", "notional": "USD $40000", "participation": "70 percent", "underlying": "BQM.PA", "product": "eln"}


* Example RFQ 2:
[Please get back to me with a price for this eln note. Mat 18 years,  USD $45000, Und FAF.MX, Coupon Freq semi, Cpn 6 percent fixed,  60 pct, Part 70 percent. Let me no ur pricing thoughts. Moe],

Resulting Parameters 2: {"barrier": "60 percent", "coupon": "6 percent", "coupon_frequency": "semi-annually", "coupon_type": "fixed", "from": "Grace Moore", "language": "en", "maturity": "18 years", "notional": "USD $45000", "participation": "70 percent", "underlying": "FAF.MX", "product": "eln"}


* Example RFQ 3:
[Please price this eln. Coup 3 pct fxd,  90 %, Expiry 24 yrs, Barr 50 percent, Size USD $30000, Under LZL.US, Coupon Freq semi-annually. Let me no wen u have a price. Benji],

Resulting Parameters 3: {"barrier": "50 percent", "coupon": "3 percent", "coupon_frequency": "semi-annually", "coupon_type": "fixed", "from": "Ben Wilson", "language": "en", "maturity": "24 years", "notional": "USD $30000", "participation": "90 percent", "underlying": "LZL.US", "product": "eln"}


* Example RFQ 4:
[Yo, price dis eln 1 up. Under BSM.MX, Amount USD $5000,  40 pct, Cpn Freq annual, Part 70 percent, Term 12 years, Cpn 10 percent fixed. Plez advise wen u have a price. Benji],

Resulting Parameters 4: {"barrier": "40 percent", "coupon": "10 percent", "coupon_frequency": "annual", "coupon_type": "fixed", "from": "Ben Wilson", "language": "en", "maturity": "12 years", "notional": "USD $5000", "participation": "70 percent", "underlying": "BSM.MX", "product": "eln"}


* Example RFQ 5:
[I would like to obtain a quote for this eln. Participation 70 %, Barrier 50 percent, Amount USD $35000,  5 pct fixed, Cpn Freq semi, Mat 12 yrs,  BSM.MX. Thx, any info is gud. Benji],

Resulting Parameters 5: {"barrier": "50 percent", "coupon": "5 percent", "coupon_frequency": "semi-annually", "coupon_type": "fixed", "from": "Ben Wilson", "language": "en", "maturity": "12 years", "notional": "USD $35000", "participation": "70 percent", "underlying": "BSM.MX", "product": "eln"}

**Input RFQ:** [Hey, any price ideaz on this eln RFQ? Coupon 3 % fixed, Barr 40 percent, Part 70 percent, Under CDM.HK, Coupon Frequency annually, Notional USD $35000, Mat 6 years. Please let me know when you have the price. Ali]

**Strict JSON Output Requirements:**

The response MUST be valid JSON and parse correctly

Use full, unabbreviated terms and include units in response

The JSON output MUST adhere to the following structure

Key fields must never be added, removed or have their name modified

```json

[

    {

        "product": "product type",

        "underlying": "ticker",

        "maturity": "value months",

        "participation": "value %",

        "barrier": value %",

        "coupon": "value % ",

        "coupon_type": "type",

        "coupon_frequency": "frequency",

        "notional": "value currency",

        "from": "name",

        "confidence": "percentage %",

        "explanation": "parsing rationale and assumptions",

        "advice" : "either proceed with quote or seek clarification from requester"

    }

]