Prompt LibraryEngineering
RAG Citation & Source Formatter Prompt
Format grounded answers with inline citations.
The prompt
Rewrite the answer below with inline citations to the source chunks.
Format: [1], [2] after the claim, with a Sources list at the end mapping each number to the chunk title and URL.
If a claim has no supporting chunk, remove it and note "[unsourced, removed]".
Do not cite a chunk for a claim it doesn't actually support.
Answer:
{{answer}}
Source chunks (with IDs and URLs):
{{chunks}}Replace the {{fields}} with your own context and tighten the rules to match your domain.
More Engineering prompts
RAG Answer Grounding Checker Prompt
Verify a generated answer is grounded in retrieved chunks.
LLM Reranking Prompt for RAG Retrieval
Use a model as a cross-encoder-style reranker for retrieved chunks.
RAG Chunking Strategy Design Prompt
Design a structure-aware chunking plan for a specific document type.



