This repository documents my hands-on exploration of LLM systems, tool calling, and agent design using LangChain.
Instead of relying on high-level abstractions, this repo focuses on understanding how things work under the hood — building components manually and then layering applications on top.
- 🔧 Manual LLM tool-calling orchestration (agent internals)
- 🌐 Integration with external tools (Wikipedia, Tavily Search)
- 💬 Stateful conversational apps using Streamlit
- ⚙️ Azure OpenAI integration via LangChain
- 🧩 Prompt pipelines using LCEL (
prompt | model | parser) - 🧪 Debuggable message-driven workflows
Gen-AI/
│
├── Langchain/
│ ├── QA-ChatBot.py
│ └── manual_tool_calling_agent.ipynb
│
├── main.py
├── pyproject.toml
├── requirements.txt
├── .gitignore
└── README.md
A simple conversational chatbot built using:
- Streamlit UI
- Azure OpenAI (GPT-4o / GPT-4.1-mini)
- LangChain LCEL pipeline
- Model selection from UI
- Streaming responses (token-by-token)
- Persistent conversation using
session_state - Prompt → Model → Parser pipeline
- Environment-based configuration via
.env
User Input → Prompt Template → AzureChatOpenAI → Output Parser → UI
File: manual_tool_calling_agent.ipynb
This is the core learning component where the full agent loop is implemented manually:
- User query sent to LLM
- LLM returns
tool_calls - Tools executed manually in Python
- Results returned via
ToolMessage - Loop continues until final answer
User → LLM → Tool Calls → Tool Execution → LLM → Final Answer
- Custom tools (
add,multiply) - External tools (Wikipedia, Tavily)
- Dynamic tool routing
- Multi-step reasoning
- Error handling
- Full message trace for debugging
- Python 3.12
- LangChain
- Azure OpenAI
- Streamlit
- Tavily API
- Wikipedia API
- uv (package manager)
git clone https://github.com/BrainTeaser1/Gen-AI.git
cd Gen-AI
uv sync
or
uv pip install -r requirements.txt
AZURE_OPENAI_API_KEY=your_key_here
AZURE_OPENAI_ENDPOINT=your_endpoint_here
TAVILY_API_KEY=your_key_here
streamlit run Langchain/QA-ChatBot.py
.envis ignored via.gitignore- No secrets are stored in the repository
- API keys must be configured locally
- ✅ Manual tool-calling agent implemented
- ✅ Multi-tool reasoning loop working
- ✅ Streamlit chatbot UI built
- ✅ Azure OpenAI integration complete
- LangGraph-based orchestration
- Memory (short + long term)
- RAG integration
- Observability (logging, token tracking)
- Tool reliability improvements
Krishna Shukla
Exploring:
- LLM Systems
- Agent Architectures
- GenAI Infrastructure
This repository focuses on understanding before abstraction.
Instead of relying on built-in agents, I implemented the core loop manually — making it easier to debug, extend, and reason about system behavior.