How dameerahmed/langchain_practice works
This repository is a collection of standalone LangChain learning scripts, not one integrated application. Its examples cover Gemini models and embeddings, prompts and structured output, runnable composition, document loading and splitting, vector stores and retrieval, YouTube transcript question-answering, and tool calling. Each script runs its own demonstration; there is no documented shared user workflow or orchestration across examples. Several ingestion, model, and tool examples are represented as capability nodes because their implementations were not excerpted.
Main entry points: 28_langchain_faiss_vdb_alternative.py FAISS vector store · 29_langchain_through_yt_transcript.py Transcript Q&A · 27_langchain_chroma_vdb.py Chroma vector store · 10_langchain_str_outputparser.py String parsing
Components 33
Models and prompts
- Gemini model
1_langchain_gemini_model.py - Embedding model
02_langchain_gemini_emb_model.py - Document embeddings
03_langchain_gemini_emb_doc.py - Embedding search
04_langchain_gemini_emb_serach.py - Chat messages
05_langchain_messages.py - Prompt placeholders
06_langchain_message_placeholder.py - Structured outputs
07_langchain_with_structure_output_dic.py - Pydantic output
08_langchain_with_structure_output_pydantic.py - JSON schema output
09_langchain_with_structure_output_json_schema.py - String parsing
10_langchain_str_outputparser.py - JSON parsing
11_langchain_json_outputparser.py
Runnable patterns
- Simple chains
12_langchain_simple_chain.py - Two-model chain
13_langchain_simple_2llm_chain.py - Runnable sequence
14_langchain_runnable_sequence.py - Parallel runnables
15_langchain_runnable_parallel.py - Passthrough runnable
16_langchain_runnable_passthrough.py - Lambda runnable
17_langchain_runnable_lambda.py - Conditional branch
18_langchain_runnable_branch.py
Document processing
- Text loading
19_langchain_text_loader.py - PDF loading
20_langchain_pdf_loader.py - Directory loading
21_langchain_directory_loader.py - Web loading
22_langchain_webbase_loader.py - Length splitting
23_langchain_text_splitter_length_based.py - Structure splitting
24_langchain_text_splitter_structure_based.py - Code splitting
25_langchain_text_splitter_python_code.py - Markdown splitting
26_langchain_text_splitter_markdown.py
Vector retrieval
- Chroma vector store
27_langchain_chroma_vdb.py - FAISS vector store
28_langchain_faiss_vdb_alternative.py
Applied examples
- Transcript Q&A
29_langchain_through_yt_transcript.py - Tool calling
30_langchain_tools_call.py
Other components
- Google AI
- Groq
- YouTube transcripts
Connections 21
- String parsing → Gemini model: invokes model
10_langchain_str_outputparser.py - String parsing → Groq: invokes model
- JSON parsing → Groq: invokes model
11_langchain_json_outputparser.py - Two-model chain → Groq: generates story
13_langchain_simple_2llm_chain.py - Two-model chain → Google AI: returns review
13_langchain_simple_2llm_chain.py - Runnable sequence → Groq: generates story
14_langchain_runnable_sequence.py - Runnable sequence → Google AI: returns review
14_langchain_runnable_sequence.py - Parallel runnables → Groq: generates joke
15_langchain_runnable_parallel.py - Parallel runnables → Google AI: generates joke
15_langchain_runnable_parallel.py - Passthrough runnable → Groq: generates story
16_langchain_runnable_passthrough.py - Passthrough runnable → Google AI: structures review
16_langchain_runnable_passthrough.py - Lambda runnable → Groq: generates story
17_langchain_runnable_lambda.py - Conditional branch → Groq: classifies feedback
18_langchain_runnable_branch.py - Conditional branch → Groq: writes response
18_langchain_runnable_branch.py - Chroma vector store → Google AI: embeds documents
27_langchain_chroma_vdb.py - Chroma vector store → Chroma vector store: stores and searches
27_langchain_chroma_vdb.py - FAISS vector store → Google AI: embeds documents
28_langchain_faiss_vdb_alternative.py - FAISS vector store → FAISS vector store: stores and retrieves
28_langchain_faiss_vdb_alternative.py - Transcript Q&A → YouTube transcripts: fetches transcript
29_langchain_through_yt_transcript.py - Transcript Q&A → FAISS vector store: indexes chunks
29_langchain_through_yt_transcript.py - Transcript Q&A → Google AI: embeds and answers
29_langchain_through_yt_transcript.py