Live180 prompt chains that finish a whole jobRead one free
pothipathAI Library
RAG & researchFree

Build contextual RAG

a cited research dossier plus the knowledge-base schema it would be stored in

Turns8
Ends inplain text
FromContextual RAG
UsesOpenAI, PostgreSQL, Vector DB, Google Drive

How to run it

  1. Open a new chat with ChatGPT, Claude or MiniMax. Paste turn 1.
  2. Answer anything it asks. It wants real inputs; supply them.
  3. Paste the next turn into that same chat. Never start a new one mid-chain.
  4. The last turn produces the finished deliverable.
0 of 8 turns done
  1. 01 FRAME THE JOB New chat
    We are working in ONE conversation. Every turn from here builds on the last. Do not restart, do not ask me to re-paste anything, and do not ask me to confirm the brief - it is below.
    
    The brief
    
    I want a cited research dossier plus the knowledge-base schema it would be stored in.
    
    There is a standing automation that normally produces this. It is called Contextual RAG, and the video that demonstrates it is titled "The EASIEST Possible Strategy for Accurate RAG (Step by Step Guide)". Here is what that pipeline actually does:
    
    Cole Medin’s workflow showcases a robust RAG system enhanced with contextual retrieval. The system uses Google Drive triggers, custom JavaScript for text chunking, and an additional LLM call (using cost‐efficient models like GPT 4.1 nano with prompt caching) to prepend context to each chunk. Embedded in a Neon serverless Postgres (or similar vector database), this design improves document retrieval accuracy for AI agents. The free template is available via GitHub.
    
    The original pipeline is built in n8n and wires together: OpenAI, PostgreSQL, Vector DB, Google Drive.
    
    What is different about this session
    
    That automation is a permanent pipe. I do not want the pipe. I want the output, once, produced by you working through this conversation with me over the next few turns. Do not produce an n8n JSON export, a node graph, or a workflow diagram. Produce the thing the pipe was built to produce.
    
    Your job right now
    
    1. Read the brief and restate the deliverable in one sentence, in your own words, so we agree on what "done" means.
    2. Write a numbered execution plan - the actual production steps, in order, that you will carry out across this conversation. Be concrete: each step names an artefact it will produce.
    3. List the inputs I must give you for the plan to be executable. For each one, show the exact shape you want it in, with a fill-in-the-blank template I can type over. Assume I have none of this ready.
    4. Flag anything in the brief that is ambiguous or that you will have to assume. Make an explicit, defensible assumption rather than asking a vague question.
    5. State the final output format you will produce in the last turn (file layout, sections, length).
    
    Constraints for everything you produce in this conversation:
     Concrete and finished. No placeholders left where a real value belongs, no "insert your X here".
     If you cannot verify a fact, say so inline rather than inventing it.
     Every claim that rests on an external fact gets a source.
     Optimise for something I can act on this week, not for a textbook answer.

    Before you continue: The assistant should restate the deliverable and give you a numbered plan plus the inputs it needs. Answer its questions before continuing.

  2. 02 LOCK THE PLAN Same chat
    Continue from Turn 1. Do not re-plan from scratch.
    
    Take the numbered plan you produced and turn it into a locked execution checklist:
    
    1. Restate it as a checklist where every line is a specific artefact with a one-line definition of "finished". For example: #3 - Hook table: 10 hooks, each <= 8 words, each paired with the segment it comes from.
    2. Tell me, in priority order, which inputs I must supply right now to unblock the most work. Give me a single copy-paste block with the fill-in-the-blank fields already laid out. If an input genuinely cannot be typed (a file, a link list, an API response), tell me exactly what to paste and what shape it should be.
    3. Where you made an assumption in Turn 1, state it again in one line and tell me what it would cost if it is wrong. Mark each assumption as HIGH or LOW impact.
    4. Tell me the order you will work in and exactly which turn each checklist item lands in, so I know what I am waiting for at each step.
    
    Then stop and wait for my input. Do not start producing deliverables yet - I need to see the checklist first.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  3. 03 SOURCE STRATEGY Same chat
    Continue in this same conversation. Everything below builds on Turns 1 to 2; do not restart or re-brief yourself.
    
    We are building the evidence base for the dossier.
    
    1. From the brief, define the question set the dossier must answer. Group them into must-answer and nice-to-have. Six to ten questions maximum.
    2. For each must-answer question, specify exactly where the evidence comes from: the specific document types, datasets, pages, or sources that would hold a credible answer, and what would count as an adequate source versus a weak one.
    3. Write the extraction query for each question - the actual search string, API call shape, or filter I should run to pull it. Be literal and copy-pasteable.
    4. Tell me what to do about gaps: if a question cannot be answered from any source I have, what is the honest fallback?
    5. Produce a source-quality rubric: how I judge whether a source is worth citing, and what gets discarded.
    
    Output: the question set, the source table (question | source type | extraction query | fallback), and the rubric. This is the table I will work from, so make it complete.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  4. 04 EVIDENCE PASS Same chat
    Continue in this same conversation. Everything below builds on Turns 1 to 3; do not restart or re-brief yourself.
    
    Now collect. Work through the source table from the previous turn.
    
    1. For each must-answer question, assemble the actual evidence you can support. Quote or state the specific finding, not a paraphrase of a source's summary.
    2. Attach a source to every finding. Use this format: finding — source — confidence (high/medium/low).
    3. Where sources disagree, present both positions side by side and say which is better supported and why. Do not average them into a vague middle.
    4. Where you are relying on general knowledge rather than a source, label it clearly as [unverified] so I can decide whether to check it.
    5. Finish with a GAPS section listing what you could not support.
    
    Do not pad. A short evidence table that is fully sourced beats a long one that is partly guesswork.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  5. 05 SYNTHESIS Same chat
    Continue in this same conversation. Everything below builds on Turns 1 to 4; do not restart or re-brief yourself.
    
    Turn the evidence into findings.
    
    1. Produce the core findings - the 5 to 9 claims the dossier actually argues. Each one is a single, testable sentence.
    2. For each finding: the supporting evidence from the last turn, a confidence rating, and what would change my mind about it.
    3. Explicitly separate what the evidence shows from what I am inferring. Label inferences as such. This is the section people skip and then trust wrongly.
    4. Write the counter-arguments: the strongest case against each major finding.
    5. Name the things this dossier cannot tell me, even though the reader will assume it can.
    
    Output as numbered findings with sub-sections. No introduction essay.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  6. 06 KNOWLEDGE BASE DESIGN Same chat
    Continue in this same conversation. Everything below builds on Turns 1 to 5; do not restart or re-brief yourself.
    
    The original automation stored this in a vector database. Design that layer.
    
    1. Specify the ingestion design: document types to ingest, the chunking strategy, and the chunk size with your reasoning. Justify the chunk size against the question set from Turn 3 - do not give a default.
    2. Specify what metadata each chunk carries beyond its text, and what each metadata field is used for at retrieval time.
    3. Write the retrieval design: the query transformation, the top-k, whether a reranker is needed and of what kind, and how you would cite back to source.
    4. Write the actual system prompt the retrieval agent would run on, as a complete copy-pasteable block.
    5. Write five test questions - one easy, three normal, one that should legitimately fail - and the expected answer shape for each.
    
    Output: ingestion spec, retrieval spec, the system prompt block, and the test set. The system prompt must be complete and usable as-is.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  7. 07 INTEGRATE AND CHECK Same chat
    Everything is produced. This turn is about making it one coherent thing rather than a pile of parts.
    
    1. List every artefact produced so far in this conversation, by the name we agreed in the checklist. Flag anything from the checklist that is missing or thin.
    2. Cross-check the parts against each other and report the inconsistencies you find. Be specific: which artefact says one thing and which says another. Fix them, and show the fix.
    3. Rewrite the pieces that depend on each other so they use one consistent vocabulary, one consistent naming scheme, and one consistent tone. Show the corrected versions of anything you changed.
    4. Identify the three weakest parts of the work and tell me honestly what would improve them. If you think something should be cut rather than polished, say so.
    5. Produce a short READ ME FIRST section for the final deliverable: what this is, who it is for, how to use it, and what to do first.
    
    Keep the README under 300 words.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.

  8. 08 FINAL DELIVERABLE Same chat
    Now assemble the finished a cited research dossier plus the knowledge-base schema it would be stored in.
    
    1. Produce the complete deliverable in the format you committed to in Turn 1. Use every artefact from this conversation - do not start over, and do not leave anything as a note to self. This is the version I keep.
    2. Run a self-check before you send it, and show the check as a short table at the end:
        Is every checklist item from Turn 2 actually covered? List any that are not.
        Does anything still contain a placeholder, a TODO, or an unverified claim?
        Is the thing internally consistent - numbers, names, dates, cross-references?
        If a real person acted on this on Monday morning, what would they trip over? Fix it.
    3. Give me a NEXT 3 ACTIONS list: the three concrete things to do next, each with an owner and a timeframe. Not a wishlist - three things I can start.
    4. If any part of this deliverable should be regenerated weekly or monthly, say which part and give me the single prompt that would do it, so I can reuse it.
    
    Output the deliverable first, then the self-check table, then NEXT 3 ACTIONS.

    Before you continue: The assistant produces this stage. Read it, answer anything it asks, then paste the next turn in the same chat.