DEV Community

Cover image for [Prompt] ND-ReRanker v 0.1
neuron dev
neuron dev

Posted on

[Prompt] ND-ReRanker v 0.1

Prompt Card

goal: Replaced the encoder-based reranker with a decoder that generates the reranking output.

target model: microsoft/phi-4 [Q4-K_M: 9.05GB]

refine model: GPT‑4o (ChatGPT)

available input: 8k tokens


description

This prompt defines a decoder-based ranking evaluator designed to reorder candidate documents from a RAG retrieval pipeline based on semantic relevance. It mimics cross-encoder scoring behavior while ensuring strict output format compliance.


core tasks

  • Analyze query intent (definition, method, comparison, factual detail).
  • Rank docs by semantic coverage, not keyword overlap.
  • Enforce redundancy filtering and penalize near-duplicates.
  • Produce cross-encoder-like scores (0.0–1.0) with realistic gaps.

scoring policy

  • 0.95–1.00 → Perfect intent match.
  • 0.75–0.89 → Strong relevance.
  • 0.40–0.70 → Partial relevance.
  • <0.30 → Low/no relevance.
  • Maintain steep score gaps; avoid uniform decrements.

output format


json
{
  "rank": [doc_id, ...],
  "score": [float, ...],
  "ignore": [doc_id, ...]
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)