How soumadip-dev/genai-playground works
GenAI-Playground is an educational collection of independent Python and TypeScript examples, rather than one integrated runtime. Its recurring workflows take user input through prompting, model or agent execution, optional retrieval/tool use, and a generated result; the JavaScript applications add web interfaces and API layers. The graph groups the README’s major capability areas and preserves the Light RAG, web-search, and YouTube RAG flows supported by sampled source. Other branches are documented in the README or represented by their tree paths; their internal wiring is not inferred.
Main entry points: 04_rag RAG examples · webPipeline.ts Web search pipeline · knowledge-base.routes.ts Knowledge base routes · routeStrategy.ts Search strategy
Components 34
Agents and workflows
- Agent examples
python/01_llm_api_and_agents - Agent patterns
python/01_llm_api_and_agents/09_react_agent.py
Prompt engineering
- Prompt examples
python/02_prompt_engineering - Prompt strategies
python/02_prompt_engineering/04_chain_of_thought.py
LangChain and LCEL
- LangChain building blocks
python/03_langchain - Conversation context
python/03_langchain/06_context_management/main.py
Retrieval augmented generation
- RAG examples
python/04_rag - Document loading
python/04_rag/01_document_loaders/main.py - Text splitting
python/04_rag/02_text_splitters - Vector stores
python/04_rag/03_vector_stores/main.py - Advanced retrieval
python/04_rag/04_retrievers - YouTube RAG
python/04_rag/youtube-rag-chatbot/main.py - YouTube chat UI
python/04_rag/youtube-rag-chatbot/streamlit_app.py
Full-stack applications
- Structured output UI
javascript/02_structured_output/client/src/app/page.tsx - Structured output API
javascript/02_structured_output/client/src/app/api/ask/route.ts - Structured answer core
javascript/02_structured_output/server/src/ask-core.ts - Search app UI
javascript/03_search_tool_langchain/client/src/app/page.tsx - Search app API
javascript/03_search_tool_langchain/client/src/app/api/search/route.ts - Search routes
javascript/03_search_tool_langchain/agent/src/routes/search_lcel.ts - Search strategy
javascript/03_search_tool_langchain/agent/src/search_tool/routeStrategy.ts - Direct answering
javascript/03_search_tool_langchain/agent/src/search_tool/directPipeline.ts - Web search pipeline
javascript/03_search_tool_langchain/agent/src/search_tool/webPipeline.ts - Web search service
javascript/03_search_tool_langchain/agent/src/utils/search-web.utils.ts - Page extraction
javascript/03_search_tool_langchain/agent/src/utils/fetch-page-content.utils.ts - Page summaries
javascript/03_search_tool_langchain/agent/src/utils/summarize.utils.ts - Light RAG UI
javascript/04_light_rag/client/app/page.tsx - Light RAG API proxy
javascript/04_light_rag/client/app/api/ingest/route.ts - Knowledge base routes
javascript/04_light_rag/agent/src/routes/knowledge-base.routes.ts - Text indexer
javascript/04_light_rag/agent/src/knowledge/indexer.ts - Text chunker
javascript/04_light_rag/agent/src/knowledge/chunker.ts - In-memory vector store
javascript/04_light_rag/agent/src/knowledge/vector-store.ts - Knowledge query service
javascript/04_light_rag/agent/src/knowledge/query-service.ts
Other components
- Learner
- LLM provider
Connections 39
- Learner → Agent examples: explores examples
- Learner → Prompt examples: tries prompts
- Learner → LangChain building blocks: explores abstractions
- Learner → RAG examples: explores retrieval
- Agent examples → LLM provider: calls models
- Agent patterns → LLM provider: calls models
- Prompt examples → Prompt strategies: demonstrates strategies
- Conversation context → LLM provider: invokes model
- RAG examples → Document loading: demonstrates loading
- RAG examples → Text splitting: demonstrates splitting
- RAG examples → Vector stores: demonstrates storage
- RAG examples → Advanced retrieval: demonstrates retrieval
- YouTube chat UI → YouTube RAG: submits questions
- YouTube RAG → LLM provider: embeds and generates
- Learner → Structured output UI: asks question
- Structured output UI → Structured output API: posts request
- Structured output API → Structured answer core: forwards request
- Structured answer core → LLM provider: requests answer
- Learner → Search app UI: searches
- Search app UI → Search app API: posts query
- Search app API → Search routes: forwards query
- Search routes → Search strategy: selects mode
- Search strategy → Direct answering: dispatches direct
- Search strategy → Web search pipeline: dispatches web
- Direct answering → LLM provider: invokes model
- Web search pipeline → Web search service: searches web
- Web search pipeline → Page extraction: opens pages
- Web search pipeline → Page summaries: summarizes content
- Web search pipeline → LLM provider: composes answer
- Learner → Light RAG UI: ingests or queries
- Light RAG UI → Light RAG API proxy: calls API
- Light RAG API proxy → Knowledge base routes: forwards request
- Knowledge base routes → Text indexer: dispatches ingestion
- Text indexer → Text chunker: splits text
- Text indexer → In-memory vector store: stores vectors
- Knowledge base routes → Knowledge query service: dispatches query
- Knowledge query service → In-memory vector store: retrieves chunks
- Knowledge query service → LLM provider: compresses and answers
- Knowledge base routes → In-memory vector store: resets store