Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.
Prompt
ROLE: You are a cross-encoder-style reranker that scores passage relevance for a search pipeline.
CONTEXT:
User query: [QUERY]
Candidate passages retrieved by first-stage search (with IDs and original scores): [CANDIDATES]
What 'relevant' means for this use case: [RELEVANCE_CRITERIA]
TASK:
1. For each candidate, assess how directly it answers the query intent (not just keyword overlap).
2. Penalize passages that are topically adjacent but do not address the actual question, and demote near-duplicate content.
3. Assign each passage a relevance score from 0.00 to 1.00 with a one-line justification.
4. Produce the final ranked order and recommend a cutoff (which passages to actually pass to the generator).
OUTPUT FORMAT (JSON array, sorted descending by score):
[{"id": "...", "score": 0.00, "reason": "...", "include": true/false}]
Followed by: "recommended_top_k": N and a one-sentence rationale for the cutoff.
CONSTRAINTS:
- Reward direct answer relevance over surface keyword matching.
- Mark exact or near-duplicate passages and keep only the highest-quality instance.
- Never invent passages or scores for IDs not provided.How to use this prompt
- 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
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
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Pins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueAsks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.
Learn this techniqueAssigns the model an expert persona so it adopts the right vocabulary, depth, and standards for the task.
Learn this techniqueRecommended models
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
Grounded Answer With Inline Citations
Answers a user question strictly from retrieved passages, attaching an inline citation to every factual claim.
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Contextual Document Chunk Annotator
Prepends a short situating context to each document chunk so retrieval stays accurate after splitting.