-
Notifications
You must be signed in to change notification settings - Fork 12.2k
docs: add practical RAG troubleshooting checklist #2487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
monkeyjack123
wants to merge
1
commit into
openai:main
Choose a base branch
from
monkeyjack123:kerry/rag-troubleshooting-checklist
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+39
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # RAG Troubleshooting Checklist | ||
|
|
||
| Use this quick checklist when a retrieval pipeline underperforms in production. | ||
|
|
||
| ## 1) Confirm retrieval quality before tuning prompts | ||
| - Check whether relevant chunks are returned in top-k for a small labeled test set. | ||
| - Inspect chunk boundaries (too small loses context, too large lowers precision). | ||
| - Verify embedding model and index settings match your content type. | ||
|
|
||
| ## 2) Verify context assembly | ||
| - Ensure reranking/order is deterministic and sensible. | ||
| - Remove duplicate or near-duplicate chunks from final context. | ||
| - Include source metadata (doc id, section, timestamp) to aid debugging. | ||
|
|
||
| ## 3) Control stale or conflicting data | ||
| - Validate that index refresh jobs run as expected. | ||
| - Add recency or version filters when sources evolve frequently. | ||
| - Prefer authoritative sources when conflicts are detected. | ||
|
|
||
| ## 4) Reduce hallucination risk | ||
| - Instruct the model to abstain when evidence is insufficient. | ||
| - Require citations to provided context where possible. | ||
| - Evaluate with adversarial/no-answer test cases. | ||
|
|
||
| ## 5) Instrument and evaluate continuously | ||
| - Track retrieval recall@k and answer quality separately. | ||
| - Log failures by category (retrieval miss, grounding miss, synthesis miss). | ||
| - Re-test after each change to retrieval, ranking, or prompting. | ||
|
|
||
| ## Related Cookbook examples | ||
| - [Evaluate RAG with LlamaIndex](../examples/evaluation/Evaluate_RAG_with_LlamaIndex.ipynb) | ||
| - [RAG with graph DB](../examples/RAG_with_graph_db.ipynb) | ||
| - [How to call functions for knowledge retrieval](../examples/How_to_call_functions_for_knowledge_retrieval.ipynb) | ||
| - [Parse PDF docs for RAG](../examples/Parse_PDF_docs_for_RAG.ipynb) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit adds
articles/rag_troubleshooting_checklist.mdbut does not add a matchingregistry.yamlrecord, and this repo’s publication workflow requires new content to be registered for static-site inclusion; without that entry, the checklist will be present in the repo but omitted from cookbook.openai.com. Please add a registry item for this path (including its metadata) in the same change.Useful? React with 👍 / 👎.