<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Langchain on Naresh Mehta</title><link>https://naresh.se/en/tags/langchain/</link><description>Recent content in Langchain on Naresh Mehta</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>naresh.mehta@gmail.com (Naresh Mehta)</managingEditor><webMaster>naresh.mehta@gmail.com (Naresh Mehta)</webMaster><copyright>&amp;copy;{year}, All Rights Reserved</copyright><lastBuildDate>Fri, 28 Nov 2025 00:00:00 +0000</lastBuildDate><sy:updatePeriod>weekly</sy:updatePeriod><atom:link href="https://naresh.se/en/tags/langchain/index.xml" rel="self" type="application/rss+xml"/><item><title>Integrate Tavily Search with Langchain</title><link>https://naresh.se/en/posts/202425/2025-11-28_langchain_tavilysearch/</link><pubDate>Fri, 28 Nov 2025 00:00:00 +0000</pubDate><author>naresh.mehta@gmail.com (Naresh Mehta)</author><atom:modified>Fri, 28 Nov 2025 15:02:08 +0100</atom:modified><guid>https://naresh.se/en/posts/202425/2025-11-28_langchain_tavilysearch/</guid><description>&lt;p&gt;Something amazingly simple turned out to be amazingly weird! I was trying to create a react agent that uses tavily search to fetch relevant articles and then uses openai (on localai server) to generate a response based on the articles. I was following the &lt;a href="https://js.langchain.com/docs/integrations/tools/tavily_search"&gt;Langchain docs&lt;/a&gt; and the &lt;a href="https://tavily.ai/docs"&gt;tavily search docs&lt;/a&gt; to create the agent.&lt;/p&gt;
&lt;p&gt;The code is available on &lt;a href="https://github.com/learn-ai-101/code-langchain/commit/fe40dffdf1b867a94434556662ca17ef57d263dc"&gt;github&lt;/a&gt;. If I use the TavilyClient directly as a tool in my agent, it works fine. But if I use the TavilySearch tool, it truncates the query in a weird way and sends the result back. The LLM (gpt-oss) then goes into an infinite loop trying to get the correct information from the tool. The tool in turn gives back invalid responses which do not match the query and the whole cycle is repeated again.&lt;/p&gt;</description><dc:creator>Naresh Mehta</dc:creator><category>LLMs</category><category>AIDE</category><category>Artificial</category><category>Intelligence</category><category>LocalAI</category><category>Langchain</category><category>Tavily</category><category>OpenAI</category><category>general</category><category>AI</category></item><item><title>Integrate LangSmith with Langchain</title><link>https://naresh.se/en/posts/202425/2025-11-27_integratelangsmith_trace/</link><pubDate>Thu, 27 Nov 2025 00:00:00 +0000</pubDate><author>naresh.mehta@gmail.com (Naresh Mehta)</author><atom:modified>Thu, 27 Nov 2025 15:26:28 +0100</atom:modified><guid>https://naresh.se/en/posts/202425/2025-11-27_integratelangsmith_trace/</guid><description>&lt;p&gt;LangSmith is a platform that allows you to track and analyze the performance of your LLMs. It provides a lot of features like tracing, debugging, etc. LangSmith is available as a python package and can be installed using pip and also as a docker image. But the best way to start using LangSmith is pretty simple.&lt;/p&gt;
&lt;p&gt;If you have followed my previous article on &lt;a href="https://naresh.se/en/posts/202425/2025-11-26_use_localai_server_langchain/"&gt;Use LocalAI server with Langchain&lt;/a&gt;, you should have a localAI server running and a langchain setup to interact with it. You can download the example code that I have pasted in the previous article and run it to interact with the localAI server.&lt;/p&gt;</description><dc:creator>Naresh Mehta</dc:creator><category>LLMs</category><category>AIDE</category><category>Artificial</category><category>Intelligence</category><category>LocalAI</category><category>Langchain</category><category>LangSmith</category><category>OpenAI</category><category>LMStudio</category><category>Ollama</category><category>GPT4All</category><category>Huggingface</category><category>server</category><category>general</category><category>AI</category></item><item><title>Use LocalAI server with Langchain</title><link>https://naresh.se/en/posts/202425/2025-11-26_use_localai_server_langchain/</link><pubDate>Wed, 26 Nov 2025 00:00:00 +0000</pubDate><author>naresh.mehta@gmail.com (Naresh Mehta)</author><atom:modified>Wed, 26 Nov 2025 16:57:16 +0100</atom:modified><guid>https://naresh.se/en/posts/202425/2025-11-26_use_localai_server_langchain/</guid><description>&lt;p&gt;Now you might have used gemini, chatgpt, deepseek, claude, etc. for your daily activities or asking a question here and there. And most of these services ask for a subscription to use their services. And if you are not tech sauvy, you might not be aware that it is very easy to run local AI servers on your local machine. No need to have a subscription or pay for cloud services. The best part is that your normal PC/Mac will work just fine. Of course depending on your HW, there will be limits on the type of models that can be used. But running an SLM (Small Language Model) or a smaller LLM (Large Language Model) is a piece of cake.&lt;/p&gt;</description><dc:creator>Naresh Mehta</dc:creator><category>LLMs</category><category>AIDE</category><category>Artificial</category><category>Intelligence</category><category>LocalAI</category><category>Langchain</category><category>OpenAI</category><category>LMStudio</category><category>Ollama</category><category>GPT4All</category><category>Huggingface</category><category>server</category><category>general</category><category>AI</category></item></channel></rss>