Prompting technique

PromptPRF (Rank-aware Prompting)

Pseudo Relevance Feedback is Enough to Close the Gap Between Small and Large Dense Retrieval Models, arXiv:2503.14887 (2025) · read the paper

What it does

A two-stage method for improving LLM responses through pseudo-feedback. First, an initial request is made, then key facts and entities are extracted from the response, ranked by importance, and added to a refinement query. Allows small models to achieve the quality of large models.

Task typemulti step
Shapeiterative
Efforttwo or three steps
Addressesinvented facts and citations; answers that are close but wrong; the model losing what was agreed earlier
Published2025-03-19
AuthorsHang Li, Xiao Wang, Bevan Koopman et al.

When it helps

Use PromptPRF when working with small language models and want to achieve answer quality comparable to large models without additional costs. The method is particularly effective for information retrieval tasks, research, and knowledge work, where accuracy and relevance are important. Apply when you need to improve answer quality with limited computational resources, or when the model's initial answer lacks sufficient accuracy. Suitable for creating RAG systems and improving existing search solutions.

A prompt you can paste

Generic by design: it applies the technique without knowing your task. Adapt the marked parts.

Prompt
You are an expert prompt engineer specializing in applying the PromptPRF (Rank-aware Prompting) technique. Your task is to guide a user through a two-step process to improve their LLM queries, especially for complex tasks requiring high accuracy.

**This prompt is designed to be used in two stages:**

---

### Stage 1: Initial Query (Exploration)

**Objective:** Gather raw material (facts, entities, ideas) from the LLM.

**Instructions:**
1.  Define your initial, possibly broad, query related to your task.
2.  Paste this query into the LLM.
3.  Once you receive the LLM's response, carefully analyze it.
4.  Identify and extract the most important and relevant information:
    *   **Key keywords or entities** (names, locations, brands).
    *   **Key facts or theses.**
    *   **Brief conclusions or summaries.**
5.  **Crucially, rank this extracted information by importance.** Assign `Rank 1` to the most vital pieces of information, `Rank 2` to the next most important, and so on.

**Example of your Stage 1 Query (replace with your own):**
"Provide an overview of the main challenges and recent advancements in renewable energy storage solutions."

---

### Stage 2: Refined Query (Attack)

**Objective:** Use the extracted and ranked information from Stage 1 to create a highly specific and effective prompt.

**Instructions:**
1.  Copy the structure below.
2.  Replace the placeholder text in the `### Context for Response (in order of importance):` section with the ranked information you extracted in Stage 1. Ensure you use the `Rank X:` format.
3.  Replace the placeholder text in the `### Requirements:` section with your specific output needs.
4.  Paste the complete refined prompt into the LLM.

---

**Refined Prompt Structure:**

You are an expert assistant tasked with [**Describe your overall goal or role here, e.g., "analyzing complex documents," "generating creative content," "solving technical problems"**].

**My goal:** [**State your specific objective for this refined query, e.g., "to generate a detailed report on X," "to brainstorm Y," "to find a solution for Z"**].

Utilize the following information as the foundation for your response. This context has been pre-analyzed and ranked by importance to ensure the most critical elements are prioritized.

### Context for Response (in order of importance):

- **Rank 1:** [**Insert your most important extracted fact/entity/idea here**]
- **Rank 2:** [**Insert your second most important extracted fact/entity/idea here**]
- **Rank 3:** [**Insert your third most important extracted fact/entity/idea here**]
    *   [Continue adding ranked items as needed]

### Requirements:

[**Clearly define the desired output format, style, and any constraints. Be specific.**
*   **Example 1:** "Present the information as a structured report with sections for 'Challenges' and 'Advancements'. Each section should include at least 3 bullet points."
*   **Example 2:** "Generate 5 creative marketing slogans. Each slogan should be under 10 words and evoke a sense of innovation."
*   **Example 3:** "Provide a step-by-step guide for troubleshooting the issue. Ensure each step is actionable and includes potential error messages."]

---

If this one does not fit, the two closest alternatives in the corpus are Debugging Prompts Framework and Dynamic Enhancement Chain (DEC), which target the same failure from a different angle.

Worked example

The same technique applied to a concrete job: answer questions strictly from a supplied document set. Use it as the pattern for your own case rather than as a finished artefact.

Worked example
You are an expert in information retrieval and prompt engineering, specializing in optimizing dense retrieval models. Your task is to answer questions strictly based on a provided set of documents using the PromptPRF (Rank-aware Prompting) technique.

**Process:**

1.  **Initial Query (Exploration):** You will first receive a general query related to the document set. Your goal is to generate a preliminary answer that captures key facts, entities, or summaries relevant to the query from the provided documents. This answer serves as the basis for refinement.

2.  **Context Extraction (Analysis):** After generating the initial answer, you must meticulously analyze it. Extract the most critical and relevant pieces of information. This extraction should prioritize:
    *   **Key facts or core theses.**
    *   **Specific entities (names, locations, brands, technical terms).**
    *   **Concise summaries of main points.**

3.  **Ranked Context Formulation:** Organize the extracted information into a structured context block, explicitly ranking it by importance using `Rank 1`, `Rank 2`, `Rank 3`, etc. `Rank 1` should contain the most crucial information, `Rank 2` the next most important, and so on.

4.  **Refined Query (Attack):** Formulate a new, refined query. This query will combine the original user question with the newly created ranked context block. The aim is to guide the LLM to produce a highly accurate and contextually relevant final answer, leveraging the insights from the initial exploration.

**Your Output Structure:**

You will present your response in two distinct phases:

**Phase 1: Initial Response & Context Extraction**

*   **Initial Answer:** Provide the first answer to the user's query based on the document set.
*   **Extracted Context:** Present the extracted and ranked information clearly.
    ```
    ### Extracted and Ranked Context:
    - Rank 1: [Most important fact/entity/summary]
    - Rank 2: [Next most important fact/entity/summary]
    - Rank 3: [Further relevant information]
    ...
    ```

**Phase 2: Final Refined Answer**

*   **Refined Query:** State the final query incorporating the original question and the ranked context.
    ```
    ### Refined Query:
    [Original User Question]

    Based on the following ranked context:
    ### Context for Refined Query:
    - Rank 1: [Most important fact/entity/summary]
    - Rank 2: [Next most important fact/entity/summary]
    - Rank 3: [Further relevant information]
    ...
    ```
*   **Final Answer:** Provide the definitive answer, strictly adhering to the information provided in the document set and guided by the refined query and ranked context.

**Constraint:** All answers must be derived *solely* from the provided document set. Do not introduce external knowledge.

**Task:**
Answer the following question strictly from the supplied document set, following the two-phase PromptPRF process outlined above.

**User Question:** [User's question here]

**Document Set:** [Content of the document set will be provided here]

Get this written for your actual task

Paste what you are trying to do and the corpus will be matched against it directly. Free, no account, about ten seconds.

Free · no signup · ~10s
0.00match confidence
single retrieval pass
Prompt for your task

      

That number is low on purpose, and it is real. It is the raw similarity of one retrieval pass: no specialist read the paper, no judge compared anything, the first plausible match won.

6,235techniques in the corpus
one of which is this page

Picking the right one for a specific task is the work, and it is the work GetDecision does.

This pageone technique, generic prompt
What you just ranone technique matched to your wording, nothing verified
Full runten specialists read the papers in full, a judge ranks the top three for your task and shows its reasoning, generation on the model you pick, saved to your history

See the top three for your taskTen specialists, a judge, and the reasoning shown. Free account, first run included.

Run the full analysis

Related techniques

Debugging Prompts FrameworkA systematic framework for diagnosing and preventing typical errors of language models in instruction understa…Dynamic Enhancement Chain (DEC)A method that breaks down a complex question into a chain of simple sub-questions solved sequentially. Each st…Structured Prompting with External Tooling (SPET)A method of structured prompting with external tools: the LLM receives the role of an analyst who processes pr…Multi-Stage Information Search (ISP)A three-stage method for working with LLM for in-depth research of complex topics. Begins with broad topic exp…

All techniques · Failure modes and fixes