<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Langchain on Simple Enough Blog</title><link>https://blog-dev.simpleenough.net/tags/langchain/</link><description>Recent content in Langchain on Simple Enough Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 18 Apr 2025 11:02:00 +0100</lastBuildDate><atom:link href="https://blog-dev.simpleenough.net/tags/langchain/index.xml" rel="self" type="application/rss+xml"/><item><title>Writing a Prompt: Technical Guide</title><link>https://blog-dev.simpleenough.net/blog/prompt/</link><pubDate>Fri, 18 Apr 2025 11:02:00 +0100</pubDate><guid>https://blog-dev.simpleenough.net/blog/prompt/</guid><description>&lt;h2 id="i-understanding-what-a-prompt-is-in-langchain" class="heading">I. Understanding What a Prompt Is in LangChain&lt;a href="#i-understanding-what-a-prompt-is-in-langchain" aria-labelledby="i-understanding-what-a-prompt-is-in-langchain">
&lt;!-- &lt;i class="fas fa-link anchor">&lt;/i> -->
 &lt;svg class="svg-inline--fa fas fa-link anchor" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 640 512">&lt;use href="#fas-link">&lt;/use>&lt;/svg>&amp;nbsp;
 &lt;/a>
&lt;/h2>
&lt;p>In LangChain, a &lt;em>prompt&lt;/em> is a textual structure designed to guide a language model. A well-constructed prompt includes several key components:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Instruction&lt;/strong>: What you explicitly ask the model to do.&lt;/li>
&lt;li>&lt;strong>Context&lt;/strong>: Additional information to frame the answer.&lt;/li>
&lt;li>&lt;strong>Input Data&lt;/strong>: The specific input provided at runtime.&lt;/li>
&lt;li>&lt;strong>Output Indicator&lt;/strong>: What kind of output is expected.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>This format enables clear, framed, and reproducible queries.&lt;br>
Here’s another example using &lt;code>LangChain&lt;/code> in Python with this structure:&lt;/p></description></item><item><title>Hallucinating with LangChain</title><link>https://blog-dev.simpleenough.net/blog/hallucination/</link><pubDate>Mon, 07 Apr 2025 09:22:00 +0100</pubDate><guid>https://blog-dev.simpleenough.net/blog/hallucination/</guid><description>&lt;h2 id="i-what-is-a-hallucination" class="heading">I What is a hallucination?&lt;a href="#i-what-is-a-hallucination" aria-labelledby="i-what-is-a-hallucination">
&lt;!-- &lt;i class="fas fa-link anchor">&lt;/i> -->
 &lt;svg class="svg-inline--fa fas fa-link anchor" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 640 512">&lt;use href="#fas-link">&lt;/use>&lt;/svg>&amp;nbsp;
 &lt;/a>
&lt;/h2>
&lt;p>A hallucination refers to a response generated by a language model that is factually incorrect, invented, or misinterprets reality. It can range from a minor inaccuracy to a completely fabricated citation or even a made-up technical or historical claim.&lt;/p>
&lt;p>Example:&lt;/p>





 &lt;blockquote class="blockquote">
 &lt;p>“Einstein discovered general relativity in 1975.”&lt;/p>
 &lt;/blockquote>
&lt;p>That’s incorrect (it was in 1915), but the model might produce this kind of statement if it lacks the proper context or is too confident in its reasoning.&lt;/p></description></item></channel></rss>