<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo" -->

---
title: Applying OpenAI's RAG Strategies | daily.dev
description: OpenAI shared results from a series of RAG experiments run with a customer, covering what worked and what didn't across baseline vector retrieval, query...
canonical: https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Applying OpenAI's RAG Strategies | daily.dev
og:description: OpenAI shared results from a series of RAG experiments run with a customer, covering what worked and what didn't across baseline vector retrieval, query...
og:url: https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo
og:image: https://api.daily.dev/og/posts/9jicijXQo.png
og:image:alt: Applying OpenAI's RAG Strategies
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Applying OpenAI's RAG Strategies

**[LangChain](https://daily.dev/sources/langchain)** · 5 min read · 24 upvotes · 3 comments

## Summary

OpenAI shared results from a series of RAG experiments run with a customer, covering what worked and what didn't across baseline vector retrieval, query transformations, routing, query construction, index building, and post-processing. LangChain maps each reported technique to concrete implementations: multi-query retrieval and HyDE for query expansion, LLM-based routing across vectorstores and SQL databases, text-to-SQL for query construction, chunk-size experimentation for indexing, and Cohere ReRank or classification for post-processing. The piece stresses that no single RAG configuration works universally and that rigorous evaluation (e.g. via LangSmith) is needed to avoid wasted effort on techniques that don't help.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.langchain.com/blog/applying-openai-rag>

## Questions this post answers

### What is HyDE in retrieval-augmented generation and how does it improve retrieval?

HyDE (Hypothetical Document Embeddings) is a retrieval technique that generates a hypothetical answer document for an incoming query, embeds that hypothetical document, and uses its embedding to search for similar real documents. The idea is that a simulated answer document is often closer in embedding space to the actual source documents than the original question text, improving retrieval relevance.

_daily.dev surfaces practical RAG techniques like HyDE for developers refining retrieval pipelines._

### What two post-processing methods did OpenAI report using in their RAG pipeline?

OpenAI reported using re-ranking and document classification as post-processing steps after retrieval. Re-ranking, implementable via Cohere's ReRank endpoint or RAG-fusion with reciprocal rank fusion, reduces redundancy among retrieved documents. Classification tags each retrieved document by content and selects a different prompt depending on that classification, effectively routing based on semantic tags.

_developers tuning RAG post-processing steps can track technique write-ups like this on daily.dev._

### Why did OpenAI route queries between two vectorstores and a SQL database in their RAG setup?

OpenAI needed routing because their data was split across two vectorstores and a single SQL database, so incoming questions had to be directed to the correct data source before retrieval could happen. LangChain supports this with LLM-based routing that gates user input into defined sub-chains, each pointing to a different vectorstore or database, and query construction techniques like text-to-SQL handle extracting data from the relational source.

_daily.dev helps developers weighing multi-source retrieval architectures stay on top of RAG routing patterns._

## Community discussion

Top comments from developers on daily.dev.

**@seyoungcho** · 2 upvotes

> Written in 2023, yet still remarkably relevant in 2026. In AI where techniques become obsolete almost overnight, that’s a rare achievement.

**@kartiknvj** · 1 upvotes

> The line about no single config working universally matches what I keep hitting. HyDE and multi-query helped one corpus and quietly hurt another with short factual chunks, so I gate every technique behind a retrieval eval before it ships. I wrote up how I wire those checks into CI here: [https://dev.to/kartik-nvjk/how-i-set-up-rag-evals-in-cicd-so-they-actually-catch-regressions-46hb](https://dev.to/kartik-nvjk/how-i-set-up-rag-evals-in-cicd-so-they-actually-catch-regressions-46hb). How are you scoring retrieval separately from generation?

**@agustinbarrientos** · 1 upvotes

> The final citation can't replace a route trace when routing spans SQL and vectorstores. Logging the selected source would separate router mistakes from weak retrieval without rerunning the whole chain.

## Similar posts on daily.dev

- [An Animated Guide to RAG: How AI Finds Answers in Your Documents](https://daily.dev/posts/an-animated-guide-to-rag-how-ai-finds-answers-in-your-documents-fdfvsddsl) · Machine Learning Pills · 87 upvotes · 1 comments
- [RAG with Spring AI](https://daily.dev/posts/rag-with-spring-ai-aalrsnemm) · Javarevisited · 6 upvotes · 0 comments
- [RAG Explained Simply with a Real Project](https://daily.dev/posts/rag-explained-simply-with-a-real-project-pgy15jzg7) · freeCodeCamp · 23 upvotes · 1 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#openai](https://daily.dev/tags/openai), [#rag](https://daily.dev/tags/rag), [#vector-search](https://daily.dev/tags/vector-search), [#langchain](https://daily.dev/tags/langchain)

[View this post on daily.dev](https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Applying OpenAI's RAG Strategies","url":"https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo"},"datePublished":"2026-08-26T14:16:35.226Z","dateModified":"2026-09-14T08:26:02.463Z","description":"OpenAI shared results from a series of RAG experiments run with a customer, covering what worked and what didn't across baseline vector retrieval, query...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7fb156afe0e66df5134300e639caeafd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7fb156afe0e66df5134300e639caeafd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"LangChain","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"LangChain","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/0f4f2629e0724a849823f8cd0d913e13","url":"https://daily.dev/sources/langchain"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":24},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"llm,openai,rag,vector-search,langchain","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"LangChain","item":"https://daily.dev/sources/langchain"},{"@type":"ListItem","position":3,"name":"Applying OpenAI's RAG Strategies"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo","comment":[{"@type":"Comment","text":"Written in 2023, yet still remarkably relevant in 2026. In AI where techniques become obsolete almost overnight, that’s a rare achievement.","datePublished":"2026-09-07T14:43:28.307Z","url":"https://daily.dev/posts/9jicijXQo#c-0n5frRrBP","author":{"@type":"Person","name":"SeyoungCho","url":"https://daily.dev/seyoungcho","image":"https://media.daily.dev/image/upload/s---QniJFEK--/f_auto/v1724901542/avatars/avatar_O3ucZSadxc0iLADSOH3rX"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"The line about no single config working universally matches what I keep hitting. HyDE and multi-query helped one corpus and quietly hurt another with short factual chunks, so I gate every technique behind a retrieval eval before it ships. I wrote up how I wire those checks into CI here: https://dev.to/kartik-nvjk/how-i-set-up-rag-evals-in-cicd-so-they-actually-catch-regressions-46hb. How are you scoring retrieval separately from generation?","datePublished":"2026-08-26T18:44:40.061Z","url":"https://daily.dev/posts/9jicijXQo#c-DTbOUGpjO","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"The final citation can’t replace a route trace when routing spans SQL and vectorstores. Logging the selected source would separate router mistakes from weak retrieval without rerunning the whole chain.","datePublished":"2026-09-01T00:54:58.539Z","url":"https://daily.dev/posts/9jicijXQo#c-zaxZffSBw","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/applying-openai-s-rag-strategies-9jicijxqo#faq","mainEntity":[{"@type":"Question","name":"What is HyDE in retrieval-augmented generation and how does it improve retrieval?","acceptedAnswer":{"@type":"Answer","text":"HyDE (Hypothetical Document Embeddings) is a retrieval technique that generates a hypothetical answer document for an incoming query, embeds that hypothetical document, and uses its embedding to search for similar real documents. The idea is that a simulated answer document is often closer in embedding space to the actual source documents than the original question text, improving retrieval relevance. daily.dev surfaces practical RAG techniques like HyDE for developers refining retrieval pipelines."}},{"@type":"Question","name":"What two post-processing methods did OpenAI report using in their RAG pipeline?","acceptedAnswer":{"@type":"Answer","text":"OpenAI reported using re-ranking and document classification as post-processing steps after retrieval. Re-ranking, implementable via Cohere's ReRank endpoint or RAG-fusion with reciprocal rank fusion, reduces redundancy among retrieved documents. Classification tags each retrieved document by content and selects a different prompt depending on that classification, effectively routing based on semantic tags. developers tuning RAG post-processing steps can track technique write-ups like this on daily.dev."}},{"@type":"Question","name":"Why did OpenAI route queries between two vectorstores and a SQL database in their RAG setup?","acceptedAnswer":{"@type":"Answer","text":"OpenAI needed routing because their data was split across two vectorstores and a single SQL database, so incoming questions had to be directed to the correct data source before retrieval could happen. LangChain supports this with LLM-based routing that gates user input into defined sub-chains, each pointing to a different vectorstore or database, and query construction techniques like text-to-SQL handle extracting data from the relational source. daily.dev helps developers weighing multi-source retrieval architectures stay on top of RAG routing patterns."}}]}
```

