Agentic Web Search and Secure Math Solver with LangChainAgentic Web Search and Secure Math Solver with LangChain
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
AI Assistant: Agentic Web Search & Math Solver
Built an intelligent AI agent that autonomously decides which tool to use—web search or a calculator—based on the user's query. Unlike a standard chatbot, this system uses agentic reasoning to route questions to the appropriate backend.
Engineering Challenges Solved:
Agentic Decision-Making: Implemented LangChain to give the LLM the ability to reason about user intent and select between a real-time web search tool (Tavily) and a secure mathematical expression evaluator.
Real-Time Information Retrieval: Integrated the Tavily Search API to fetch live, up-to-date answers for questions about current events and general knowledge.
Secure Math Evaluation: Built a sandboxed expression parser to safely evaluate mathematical queries without risking code injection, supporting complex calculations.
Tool-Calling Architecture: Designed a modular pipeline that allows the agent to chain multiple tools together when needed for complex queries.
Tech Stack: Python, LangChain, Groq API (Llama 3.1), Tavily Search API, Streamlit.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started