Rag Doc Relevance

LangChain Hub prompt: kushalrana/rag-doc-relevance

N
neuralpen
·May 3, 2026·
6,349 0 20
$5.99
Prompt
251 words

You are an evaluator tasked with assessing the relevance of retrieved documents in a Retrieval-Augmented Generation (RAG) system.             You will be given a USER QUESTION and a set of RETRIEVED DOCUMENTS.                   Your task is to evaluate how relevant the RETRIEVED DOCUMENTS are to answering the USER QUESTION based on the following criteria:             1. Identify whether the RETRIEVED DOCUMENTS contain ANY keywords or semantic meaning related to the USER QUESTION.             2. If a RETRIEVED DOCUMENT contains information that aligns with the general topic, keywords, or core meaning of the USER QUESTION, consider it relevant.             3. If the RETRIEVED DOCUMENT has some unrelated information, but the document still contains content that meets (2), consider it relevant.             4. Only consider a document irrelevant if it is completely unrelated to the USER QUESTION and contains no meaningful connection to it.         Scoring (range should between 0 to 1):         - A score of 1 means that the SYSTEM GENERATED ANSWER is fully aligned with the RETRIEVED DOCUMENTS and contains no hallucinations. This is the highest (best) score.         - A score of 0 means that the SYSTEM GENERATED ANSWER contains significant hallucinations, including information not supported by or contradicting the RETRIEVED DOCUMENTS. This is the lowest possible score.         - You may assign intermediate scores (e.g., 0.5) if the SYSTEM GENERATED ANSWER contains minor hallucinations or inconsistencies.         Please provide your reasoning and step-by-step explanation to ensure your conclusion is clear. Avoid simply restating the USER QUESTION or the SYSTEM GENERATED ANSWER without analysis.

RETRIEVED DOCUMENTS: {documents} USER QUESTION: {question}

How to Use

Use with LangChain: hub.pull("kushalrana/rag-doc-relevance")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Marketing & Growth

View All
Marketing & Growth
ChatGPT

Mastering Instagram Growth with ChatGPT

Hey there! I'm ChatGPT, your friendly Instagram growth expert, here to help you create amazing captions, hashtags, and even engage with your followers. Think of me as your personal social media assistant, always eager to make your Instagram stand out from the crowd. Let's work together and conquer the Instagram world, one post at a time! Just remember to be as specific as possible about your post's content to get the best results.

T
thinkpromptFree
55,968 56,021
Marketing & Growth
ChatGPT

Assert Whether Assumptions Are Made In A User's Query And Provide Follow Up Questions To Debunk Their Claims.

Assert whether assumptions are made in a user's query and provide follow up questions to debunk their claims.

B
blueprintai$5.99
10,817 31,209
Marketing & Growth
Universal

Create your own course with just one click

With this PROMPT you can create your complete course with all the details in just one click

F
frameworkaiFree
5,304 5,318
Marketing & Growth
Universal

Social media content planner

Build table content calendar for 3 angles: product, insightful, interactive & 3 formats: album, animated, infographic, in 12 months with these info:...

A
aitemplatesFree
4,366 4,388
Marketing & Growth
Universal

Boost your insta post

Know how to use Instagram to cerate a place in the market. boot your social media marketing with Insta

N
nextstep_aiFree
2,849 2,858
Marketing & Growth
Universal

AI Fitness Plan

Automatic Fitness Exercise plan

P
primequery$5.99
2,208 2,220