[GH-ISSUE #3122] [langchain]: Improve beginner experience in RAG guide by adding explicit embedding/LLM reminders #2710

Open
opened 2026-06-05 17:26:24 -04:00 by yindo · 1 comment
Owner

Originally created by @SabarinathK on GitHub (Mar 14, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/3122

Type of issue

request for content

Language

Python

Description

Page affected: https://docs.langchain.com/oss/python/langchain/rag#expand-for-full-code-snippet

Current situation:

  • The tutorial separates embeddings, LLM (model), and vector store selection into "Components" blocks.
  • Sections like "Storing documents", retrieval, and the full code snippet assume these are already set up (e.g., vector_store.add_documents(...) is used without showing embeddings = ... or model = ...).
  • This makes the flow feel incomplete for readers who jump around or try to copy-paste directly.
  • The variable model is used for the chat LLM, which can confuse people looking for the embedding model.

Proposed improvement:

  • Add a short prerequisite note/warning before "Storing documents".
  • In the full code snippet, include an optional minimal setup block at the top (e.g., choosing OpenAI embeddings + Chroma + ChatOpenAI).
  • Or add inline comments explaining the assumptions.

Example addition I have in mind:

# Make sure to run one of the embeddings / vector store setups from Components first!
# Example minimal setup:
from langchain_openai import OpenAIEmbeddings, ChatOpenAI
from langchain_chroma import Chroma

embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
vector_store = Chroma.from_documents(
    documents=all_splits,
    embedding=embeddings,
    collection_name="rag_example"
)

model = ChatOpenAI(model="gpt-4o-mini")  # or init_chat_model(...)

Happy to submit a PR implementing this if approved!

Why this helps: Reduces confusion for beginners, makes the tutorial more self-contained without lengthening it much.

I'd be happy to submit a PR for this improvement.

Please assign this issue to me so I can start working on it and prevent duplicates.

(You can find me as the issue author — happy to provide my username if needed!)

Originally created by @SabarinathK on GitHub (Mar 14, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/3122 ### Type of issue request for content ### Language Python ### Description **Page affected**: https://docs.langchain.com/oss/python/langchain/rag#expand-for-full-code-snippet **Current situation**: - The tutorial separates embeddings, LLM (`model`), and vector store selection into "Components" blocks. - Sections like "Storing documents", retrieval, and the full code snippet assume these are already set up (e.g., `vector_store.add_documents(...)` is used without showing `embeddings = ...` or `model = ...`). - This makes the flow feel incomplete for readers who jump around or try to copy-paste directly. - The variable `model` is used for the chat LLM, which can confuse people looking for the embedding model. **Proposed improvement**: - Add a short prerequisite note/warning before "Storing documents". - In the full code snippet, include an optional minimal setup block at the top (e.g., choosing OpenAI embeddings + Chroma + ChatOpenAI). - Or add inline comments explaining the assumptions. Example addition I have in mind: ```python # Make sure to run one of the embeddings / vector store setups from Components first! # Example minimal setup: from langchain_openai import OpenAIEmbeddings, ChatOpenAI from langchain_chroma import Chroma embeddings = OpenAIEmbeddings(model="text-embedding-3-small") vector_store = Chroma.from_documents( documents=all_splits, embedding=embeddings, collection_name="rag_example" ) model = ChatOpenAI(model="gpt-4o-mini") # or init_chat_model(...) ``` Happy to submit a PR implementing this if approved! Why this helps: Reduces confusion for beginners, makes the tutorial more self-contained without lengthening it much. I'd be happy to submit a PR for this improvement. Please assign this issue to me so I can start working on it and prevent duplicates. (You can find me as the issue author — happy to provide my username if needed!)
yindo added the langchainexternal labels 2026-06-05 17:26:24 -04:00
Author
Owner

@jvsfrancisco commented on GitHub (Apr 8, 2026):

Hi! I’d like to help with this issue.

I noticed there was a previous commit referencing it — is this still open for contributions or is anything still missing that I could help with?

<!-- gh-comment-id:4211196793 --> @jvsfrancisco commented on GitHub (Apr 8, 2026): Hi! I’d like to help with this issue. I noticed there was a previous commit referencing it — is this still open for contributions or is anything still missing that I could help with?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2710