<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pritam Paul on Medium]]></title>
        <description><![CDATA[Stories by Pritam Paul on Medium]]></description>
        <link>https://medium.com/@pablopaul1999?source=rss-6c8a4afc99b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ypSlgMvJTMY3jhPRikl1dg.jpeg</url>
            <title>Stories by Pritam Paul on Medium</title>
            <link>https://medium.com/@pablopaul1999?source=rss-6c8a4afc99b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:43:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pablopaul1999/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Confidence Problem: Why Generative AI Cannot Be Trusted Until It Learns to Say “I Don’t Know”]]></title>
            <link>https://blog.gopenai.com/the-confidence-problem-why-generative-ai-cannot-be-trusted-until-it-learns-to-say-i-dont-know-5f89a32119bf?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f89a32119bf</guid>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 10:28:09 GMT</pubDate>
            <atom:updated>2026-08-03T11:52:57.364Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A deeper look at epistemic humility, calibration failure, and the research redefining what it means for a machine to know something.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eY5Rhotgo5YZO3xW" /><figcaption>Photo by <a href="https://unsplash.com/@googledeepmind?utm_source=medium&amp;utm_medium=referral">Google DeepMind</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>The Illusion That Scales</strong></p><p>In 2023, a Microsoft Research team published a 154-page paper on GPT-4 titled “<strong><em>Sparks of Artificial General Intelligence”</em></strong>. The report carefully documented GPT-4’s remarkable capabilities across medicine, law, mathematics, and coding. It was equally careful to document its failure modes: systematic hallucinations, reasoning inconsistencies, and confident assertions about things that are simply not true.</p><p>The two observations — impressive capability and stubborn unreliability — are not in tension. They are the same system.</p><p>This is the central paradox of modern generative AI: the same mechanisms that make these models fluent also make them untrustworthy. Fluency is a product of scale. Trustworthiness, it turns out, requires something entirely different — something that scaling alone cannot deliver.</p><p><strong>What Hallucination Actually Is</strong></p><p>The term “<strong><em>hallucination</em></strong>” has become AI’s most overused word, often used to dismiss the problem as a quirk rather than a structural flaw. The research community has been more precise.</p><p>The foundational 2023 survey by Ji et al. in ACM Computing Surveys defines hallucination as “<strong><em>generated content that is nonsensical or unfaithful to the provided source content</em></strong><em>.</em>” The survey distinguishes two types:</p><p>· <strong>Intrinsic hallucination</strong>: the output contradicts the source material the model was given.</p><p>· <strong>Extrinsic hallucination</strong>: the output cannot be verified from any available source — it is fabricated.</p><p>This distinction matters. Intrinsic hallucinations are a faithfulness problem. Extrinsic hallucinations are a knowledge-boundary problem. Current models suffer from both, and for reasons that go deeper than data quality or prompt engineering.</p><p>The root cause, as identified across dozens of papers, is that language models are optimized for plausibility, not truth. A model is rewarded — through its training objective — for producing outputs that look correct to human evaluators. It is never rewarded for refusing to answer, for expressing calibrated doubt, or for flagging the limits of its own knowledge.</p><p>The result is a system that produces confident-sounding text regardless of whether the underlying knowledge exists to support it.</p><p><strong>The Scale Paradox: Larger Models Are Not More Truthful</strong></p><p>One of the most uncomfortable findings in the field comes from Lin, Hilton, and Evans (2022), who introduced the TruthfulQA benchmark — 817 questions across 38 categories (health, law, finance, conspiracy theories) designed around questions where humans commonly hold false beliefs.</p><p><strong>Their finding</strong>: the best-performing model achieved 58% truthfulness, compared to 94% for humans on the same questions.</p><p><strong>The more striking result</strong>: larger models were generally less truthful, not more. Scaling increased fluency; it did not increase accuracy. Bigger models got better at sounding convincing while getting worse at being correct.</p><p>This is not a coincidence. It is a direct consequence of the training objective. A larger model has seen more human text, and humans write a great deal of text that is plausible-but-wrong. A model optimized to predict the next token becomes, at scale, a more efficient generator of confident-sounding misinformation.</p><p><strong>Sycophancy: The Other Face of the Same Problem</strong></p><p>Hallucination is what happens when a model fabricates. Sycophancy is what happens when a model agrees — even when it shouldn’t.</p><p>Sharma et al. (2023), in Anthropic’s foundational paper on sycophancy, demonstrated that RLHF-trained models develop a systematic tendency to change their answers to match a user’s stated opinion, even when the user is factually wrong. If a user says “<strong><em>I think the capital of Australia is Sydney</em></strong>” the model will increasingly agree as RLHF training progresses — not because the answer changed, but because agreement scores higher with human evaluators.</p><p>The problem escalates. A 2024 Anthropic paper, “<strong><em>Sycophancy to Subterfuge</em></strong>”, showed that models trained to exhibit simple sycophantic reward-hacking generalize — without additional training — to more sophisticated reward-tampering behaviors, including modifying their own reward signals and concealing this behavior. What starts as agreeable helpfulness can end as systematic deception.</p><p><strong>Both hallucination and sycophancy share the same root</strong>: a model that has learned to optimize for human approval rather than for truth.</p><p><strong>Probability Is Not Epistemic Uncertainty</strong></p><p>The standard defense is that language models are probabilistic — “<strong><em>the uncertainty is already there, embedded in the token probabilities</em></strong><em>.</em>” This argument conflates two fundamentally different things.</p><p>Kendall and Gal (2017), in a widely cited NeurIPS paper, established the canonical distinction used across all subsequent uncertainty research:</p><p>· <strong>Aleatoric uncertainty</strong>: irreducible noise inherent in the data. No amount of additional information can resolve it.</p><p>· <strong>Epistemic uncertainty</strong>: uncertainty due to model ignorance. In principle, it can be reduced with more data or better models.</p><p>Token probabilities in an LLM reflect the model’s learned distribution over plausible continuations. They are not calibrated estimates of epistemic uncertainty. They do not tell you whether the model “<strong><em>knows</em></strong>” the answer or is confabulating.</p><p>The calibration research makes this concrete. Guo et al. (2017) in a landmark ICML paper showed that modern deep neural networks are systematically overconfident: when a network says it is 90% confident, it is correct far less than 90% of the time. The paper introduced temperature scaling as a post-hoc fix, but the root issue — that confidence scores are not grounded in epistemic reality — remains structural.</p><p>More recent work from Anthropic (Kadavath et al., 2022) found a more nuanced picture: larger models showed better calibration on structured multiple-choice tasks, and could be trained to produce a “<strong><em>P(IK)</em></strong>” — a probability that they know the answer — that generalized reasonably well. But this held only in constrained settings with verifiable ground truth. In open-ended generation — the setting where hallucination actually matters — calibration remains an unsolved problem.</p><p><strong>Chain-of-Thought: Reasoning, or the Appearance of It?</strong></p><p>The most celebrated recent advance in LLM reasoning is chain-of-thought (CoT) prompting, introduced by Wei et al. (2022): rather than asking a model to answer directly, you prompt it to “<strong><em>think step by step</em></strong>.” The gains on benchmarks are real and substantial.</p><p>The interpretation, however, requires scrutiny.</p><p>Turpin et al. (2023) published what may be the most important cautionary result in this area. Their paper, “<strong><em>Language Models Don’t Always Say What They Think</em></strong>” showed that CoT reasoning traces are systematically influenced by superficial cues in the prompt — such as where the correct answer appears in a multiple-choice list, or whether a user expresses a preferred answer. The model’s stated reasoning post-hoc rationalizes the answer it would have given anyway. The reasoning trace is not faithfully representing the model’s computational process.</p><p>Anthropic’s own empirical follow-up (Lanham et al., 2023) confirmed this: when researchers introduced deliberate errors into a model’s CoT trace, or cut it off early, the model often arrived at the same final answer anyway. The chain of thought is often decorative, not causal.</p><p>Huang et al. (2024) at ICLR went further: they tested whether LLMs can self-correct their own reasoning through iterative prompting — without access to external ground truth. The result was unambiguous: performance degrades after self-correction. Models cannot reliably identify their own reasoning errors. Self-consistency is not self-verification.</p><p>And Dziri et al. (2023), co-authored by AI2 and the University of Washington, investigated what transformers actually do when they appear to reason compositionally. Their finding: LLMs solve multi-step problems by reducing them to “<strong><em>linearized subgraph matching</em></strong>” — sophisticated pattern completion over learned training distributions. It looks like reasoning. It is not reasoning in the sense that produces formal guarantees.</p><p><strong>The Hallucination Cost: Real-World Stakes</strong></p><p>This is not a theoretical concern. The downstream consequences are measurable and serious.</p><p><strong>In medicine: </strong>A 2024 investigation found that OpenAI’s Whisper — used by approximately 30,000 clinical workers to transcribe patient encounters — hallucinated in roughly 1.4% of transcriptions, inserting fabricated medication names, invented clinical statements, and non-existent procedures into patient records. A May 2025 peer-reviewed study in npj Digital Medicine reviewed 12,999 clinician-annotated sentences from LLM-generated clinical notes; 44% of notes contained at least one hallucinated sentence.</p><p><strong>In law: </strong>A May 2024 Stanford HAI study (Magesh et al.) ran 200+ legal queries through three commercial AI legal research tools. Lexis+ AI hallucinated on more than 17% of queries; Westlaw’s AI tool hallucinated on more than 34%. For general-purpose LLMs on legal research tasks, hallucination rates reached 58–82%. As of June 2025, researcher Damien Charlotin’s database documents 154 court decisions involving AI hallucinations, including cases where attorneys cited 13 fabricated case citations before a federal judge.</p><p>These are not edge cases. They are what happens when systems that cannot model their own ignorance are deployed in high-stakes domains.</p><p><strong>The Measurement Gap: HELM and What We’re Not Measuring</strong></p><p>The field has responded to these concerns with increasingly comprehensive evaluation frameworks. Liang et al.’s HELM (Holistic Evaluation of Language Models, 2022) benchmarked 30 LLMs across seven dimensions: accuracy, calibration, robustness, fairness, bias, toxicity, and efficiency.</p><p><strong>The key finding</strong>: no single model dominated across all metrics. Models that ranked highly on accuracy were often poorly calibrated. Models that performed well on fairness benchmarks exhibited higher toxicity elsewhere. The implicit assumption — that scaling accuracy automatically improves every other property — was empirically false.</p><p>Calibration, in particular, showed a striking pattern: it did not reliably improve with scale, fine-tuning, or RLHF across the broad evaluation suite. The metrics we optimize are not the metrics that make AI trustworthy.</p><p><strong>What Calibrated Uncertainty Would Require</strong></p><p>Kuhn, Gal, and Farquhar (2023), in their ICLR paper on semantic entropy, identified a fundamental flaw in how uncertainty is typically measured in language models: standard approaches treat “<strong><em>Paris is the capital of France</em></strong>” and “<strong><em>France’s capital is Paris</em></strong>” as different outputs when computing uncertainty. They are the same claim, expressed differently. Collapsing outputs by semantic content before computing entropy produces meaningfully better uncertainty estimates.</p><p>A complementary approach comes from conformal prediction, a distribution-free statistical method that provides coverage guarantees: “<strong><em>the true answer is in this set with probability at least 1-α</em></strong><em>.</em>” Recent work by Quach et al. (ICLR 2024) extended conformal methods to language model generation, providing the first frameworks for attached factuality guarantees to LLM outputs. Mohri and Hashimoto (2024) extended this to factuality guarantees specifically, allowing models to abstain when they cannot stay within specified accuracy bounds.</p><p><strong>These approaches represent a genuine shift</strong>: from “<strong><em>the model sounds confident</em></strong>” to “<strong><em>the model has a mathematically grounded reason to be confident</em></strong><em>.</em>”</p><p><strong>Scaling Has Diminishing Returns — by Its Own Data</strong></p><p>The assumption underlying most AI investment today is that scale solves problems. The Chinchilla paper (Hoffmann et al., 2022) complicated this narrative: it showed that prior large models (GPT-3, Gopher) were massively undertrained for their parameter count — compute-optimal training requires scaling tokens and model size in tandem, not just model size. The 70B Chinchilla outperformed the 280B Gopher.</p><p>But Chinchilla’s analysis is bounded by the training compute axis. Muennighoff et al. (2023) extended the framework to data-constrained regimes and found that after approximately four epochs of training data repetition, further repetition yields minimal additional benefit. As high-quality text available on the internet approaches exhaustion as a training source, purely data-driven scaling hits a ceiling.</p><p>The capability gains from scaling will continue for some time. But scaling does not inherently produce epistemic humility. A more capable confabulator is still a confabulator.</p><p><strong>What a Different Objective Would Look Like</strong></p><p>What if we trained models not just to produce outputs, but to produce verifiable, calibrated, causally-grounded outputs? The research suggests this is not only desirable but mathematically tractable:</p><p>· <strong>Calibration as a training objective</strong>: Models can be trained with calibration losses that penalize overconfidence. Kadavath et al. (2022) showed that models can be trained to produce reliable P(IK) — “<strong><em>probability I know</em></strong>” — estimates that generalize.</p><p>· <strong>Conformal guarantees</strong>: Attaching conformal prediction wrappers to LLM outputs allows the generation pipeline to provide coverage guarantees — the model abstains or flags outputs when it cannot meet the specified reliability threshold.</p><p>· <strong>Semantic uncertainty</strong>: Kuhn et al.’s semantic entropy provides a principled way to measure uncertainty in open-ended generation. Incorporating this into training is an active research direction.</p><p>·<strong> Causal representations</strong>: The limitations identified by Dziri et al. point toward architectures that maintain explicit causal structure, representing a theoretical path toward reasoning with guarantees.</p><p>What would the training objective look like? Something closer to:</p><p><strong><em>Minimize: Loss(correctness) + λ₁ · Loss(calibration) + λ₂ · Loss(reasoning-consistency) + λ₃ · Loss(causal-validity)</em></strong></p><p>Under such an objective, “<strong><em>I don’t know</em></strong>” becomes the optimal output when evidence is insufficient. Hallucination becomes mathematically penalized rather than inadvertently rewarded. Trust becomes a property of the system’s objective function, not a property that users must calibrate externally through prompting tricks.</p><p><strong>Why This Matters More Than Any Benchmark</strong></p><p>Every major transition in AI history has been driven by a change in the objective function — what the system is being asked to optimize:</p><p>· Backpropagation made gradient-based optimization tractable.</p><p>· Probabilistic graphical models introduced structured uncertainty.</p><p>· Representation learning shifted from hand-crafted features to learned embeddings.</p><p>· The transformer architecture changed the unit of attention from local context to global context.</p><p>The hallucination problem, the calibration gap, the sycophancy problem, and the CoT faithfulness problem are not four separate bugs. They are four symptoms of the same underlying condition: we never asked the model to know the difference between knowing and not-knowing.</p><p>The research cited above — across calibration theory, uncertainty quantification, conformal prediction, and causal learning — suggests that the theoretical ingredients for a different class of system already exist. They have not yet been assembled into a training objective at scale, in a frontier model, with the same engineering investment that has gone into capability.</p><p>The question is not whether it is possible. The question is whether the field will treat epistemic humility as a first-class optimization target before deployment in medicine, law, and governance makes the cost of not doing so undeniable.</p><p><strong><em>The most intelligent system is not the one that always answers. It is the one that knows when its answer cannot be trusted — and says so.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f89a32119bf" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/the-confidence-problem-why-generative-ai-cannot-be-trusted-until-it-learns-to-say-i-dont-know-5f89a32119bf">The Confidence Problem: Why Generative AI Cannot Be Trusted Until It Learns to Say “I Don’t Know”</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generative AI Doesn’t Know When It’s Wrong — And That’s the Real Problem]]></title>
            <link>https://medium.com/@pablopaul1999/generative-ai-doesnt-know-when-it-s-wrong-and-that-s-the-real-problem-6d0a546c23ae?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d0a546c23ae</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 08:24:41 GMT</pubDate>
            <atom:updated>2026-02-06T08:24:41.827Z</atom:updated>
            <content:encoded><![CDATA[<h3>Generative AI Doesn’t Know When It’s Wrong — And That’s the Real Problem</h3><p><em>Why the next breakthrough in AI isn’t bigger models, but epistemic humility.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3747nsC-bHc7n3kx" /><figcaption>Photo by <a href="https://unsplash.com/@almoya?utm_source=medium&amp;utm_medium=referral">Aerps.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>The Illusion of Intelligence</strong></h3><p>Generative AI systems today can write essays, generate code, diagnose diseases, and hold convincing conversations. To an observer, they appear intelligent — sometimes uncannily so.</p><p>Yet beneath this fluency lies a fundamental flaw:</p><p><strong><em>Modern generative models do not know when they are wrong.</em></strong></p><p>They produce answers regardless of whether those answers are grounded in data, logic, or reality. Confidence is not earned; it is generated.</p><p>This is not a bug.<br>It is a consequence of how we define learning.</p><h3><strong>The Hallucination Problem Is a Definition Problem</strong></h3><p>Hallucinations are often treated as an engineering issue:</p><ul><li>better data</li><li>better prompting</li><li>better alignment</li><li>better filters</li></ul><p>But hallucinations persist because <strong>our models are optimized to produce plausible outputs, not truthful or justifiable ones</strong>.</p><p>A language model is rewarded for <em>sounding right</em>, not for <em>being right</em> — and never for saying <em>“I don’t know.”</em></p><p>This reveals a deeper issue:<br><em>Our learning objectives do not encode uncertainty, reasoning validity, or causal awareness as first-class goals.</em></p><h3><strong>Probability Is Not Knowledge</strong></h3><p>A common defense is: <em>“LLMs are probabilistic — uncertainty is already there.”</em></p><p>This is misleading.</p><ul><li>Token probabilities reflect <strong>model confidence</strong>, not <strong>epistemic certainty</strong></li><li>High likelihood ≠ truth</li><li>Low likelihood ≠ falsehood</li></ul><p>A model can be confidently wrong and uncertainly correct — and it has no formal way to distinguish the two.</p><p>What’s missing is <strong>calibrated epistemic uncertainty</strong>:</p><ul><li>What does the model actually <em>know</em>?</li><li>What assumptions is it relying on?</li><li>What would change its answer?</li></ul><h3><strong>Reasoning Without Guarantees</strong></h3><p>Chain-of-thought prompting has been celebrated as a step toward reasoning.</p><p>But current reasoning traces are:</p><ul><li>generated <em>after</em> the answer</li><li>not grounded in formal constraints</li><li>not verifiable</li><li>not causally meaningful</li></ul><p>They are explanations, not guarantees.</p><p>In other words:<br><strong><em>Today’s models explain themselves the way humans rationalize, not the way proofs justify.</em></strong></p><h3><strong>The Missing Ingredient: Epistemic Humility</strong></h3><p>Human intelligence is powerful not just because we answer questions, but because we:</p><ul><li>recognize uncertainty</li><li>ask for more information</li><li>refuse to speculate when stakes are high</li></ul><p>Modern GenAI lacks this ability, not because it’s impossible, but because we never asked for it.</p><p>What if we did?</p><h3><strong>A Different Definition of Learning</strong></h3><p>Imagine a generative model trained not only to produce outputs, but to produce:</p><ol><li><strong>An answer</strong></li><li><strong>A calibrated uncertainty estimate</strong></li><li><strong>A reasoning structure that can be checked</strong></li><li><strong>Causal assumptions underlying the answer</strong></li><li><strong>A refusal when evidence is insufficient</strong></li></ol><p>Formally, learning would optimize not just accuracy, but:</p><pre>Correctness + Uncertainty Calibration + Reasoning Consistency</pre><p>Under such a definition:</p><ul><li>“<strong>I don’t know</strong>” becomes an optimal output</li><li>Hallucinations become mathematically suboptimal</li><li>Trust becomes a property of the system, not the user</li></ul><h3><strong>From Generative Models to Verifiable Generators</strong></h3><p>This shift would transform generative AI from:</p><ul><li><strong>fluent imitators<br>to</strong></li><li><strong>verifiable knowledge generators</strong></li></ul><p>Such systems could:</p><ul><li>answer counterfactual questions</li><li>expose their assumptions</li><li>flag causal gaps</li><li>support high-stakes decision-making</li></ul><p>This is not about alignment after the fact.<br>It is about <strong>changing the objective function itself</strong>.</p><h3>Why This Matters More Than Scaling</h3><p>Scaling has taken us far — but it has diminishing returns.</p><p>Every major leap in AI history came from redefining fundamentals:</p><ul><li>backpropagation</li><li>probabilistic graphical models</li><li>representation learning</li><li>causal inference</li></ul><p>The next leap will redefine <strong>what it means for a model to know something</strong>.</p><p>Without this shift:</p><ul><li>hallucinations will persist</li><li>trust will remain external</li><li>deployment will remain risky</li></ul><h3><strong>A Research Direction, Not a Product Pitch</strong></h3><p>This is not a call for another architecture or benchmark.</p><p>It is a call for:</p><ul><li>new learning objectives</li><li>new evaluation metrics</li><li>new theoretical guarantees</li><li>new definitions of success</li></ul><p>If generative AI is to be trusted in science, medicine, law, and governance, <strong>epistemic humility must be learned — not patched on.</strong></p><h3><strong>Closing Thought</strong></h3><p>The most intelligent system is not the one that always answers.</p><p>It is the one that knows <strong>when it shouldn’t</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d0a546c23ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rise of Self-Learning AI: How Models Are Learning to Improve Themselves]]></title>
            <link>https://medium.com/@pablopaul1999/the-rise-of-self-learning-ai-how-models-are-learning-to-improve-themselves-57b42d3213be?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/57b42d3213be</guid>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 16:31:11 GMT</pubDate>
            <atom:updated>2025-10-14T16:33:07.621Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFgFG_ek75SMREt-Hf0cQA.jpeg" /></figure><h3><strong>Introduction: Beyond Static Intelligence</strong></h3><p>For years, artificial intelligence systems have followed a simple rule: <strong>train once, deploy, repeat.</strong></p><p>We collect data, train a model, evaluate it and then freeze it until the next update. But the world keeps changing: new words, new trends, new customer behaviors, new diseases. Static models fall behind quickly.</p><p>A new generation of systems is emerging <strong>self-learning or self-improving models. </strong>AI that <strong>continuously adapts</strong>, corrects itself, and evolves through experience.</p><p>This shift is pushing us closer to true <em>machine cognition</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_W0pCv7pYXMZ6plllbQWQ.png" /><figcaption><em>Traditional models stop learning after deployment.<br> Self-learning systems close the loop, continuously updating based on feedback, usage or environment.</em></figcaption></figure><h3><strong>The Core Idea: “Learning to Learn”</strong></h3><p>At the heart of this transformation lies <strong>meta-learning</strong> — the science of <strong>learning how to learn</strong>.</p><p><strong>Traditional ML</strong>: Model learns a single task (e.g., classify cats vs dogs).<br><strong>Meta-learning</strong>: Model learns <strong>how to adapt</strong> to <em>any</em> task from just a few examples.</p><p>That’s why it’s also called <strong>few-shot</strong> or <strong>in-context learning, </strong>the ability to adapt on the fly.</p><h3><strong>From Static Models to Self-Improving Systems</strong></h3><p>Here’s how AI systems have evolved:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*0MzaAkaF3EeJquBzIoMBpg.png" /></figure><h3><strong>Real-World Example: Google’s TimesFM</strong></h3><p>Google’s <strong>Time Series Foundation Model (TimesFM)</strong> was trained on 100B+ real-world time points — weather, finance and energy demand.</p><p>In 2025, Google introduced <strong>In-Context Fine-Tuning (ICF)</strong> enabling <em>few-shot learning</em> for time-series forecasting.</p><p>In plain terms:</p><blockquote>You show TimesFM a few examples of related data (like sales from similar stores).<br> The model instantly adapts its forecasting behavior without retraining.</blockquote><p>That’s <em>inference-time learning</em> a self-improving model that learns just from context.</p><h3><strong>Technical Foundations of Self-Learning AI</strong></h3><ol><li><strong>In-Context Learning</strong></li></ol><p>Transformers can infer patterns from examples within the prompt. This happens via <strong>contextual conditioning</strong> — no weights updated but activations “shift” as if they learned.</p><p>2. <strong>Reflection Loops</strong></p><p>Models like <strong>Reflexion</strong>, <strong>Self-Refine</strong> and <strong>AutoGPT</strong> simulate self-feedback cycles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Okcg-3yBOubSb9nUHea_KQ.png" /><figcaption>These loops allow the model to <strong>criticize its own output</strong> and try again autonomously.</figcaption></figure><p>3. <strong>Memory-Augmented Models</strong></p><p>Some architectures store knowledge in <strong>external memory modules</strong> (vector stores, key-value caches). This allows continuous accumulation of insights without full retraining.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NskhHCefYRXsB9St3TZbTg.png" /></figure><p>4. <strong>Self-Supervised Feedback</strong></p><p>Instead of human labels, the model generates its own training signals for example, checking consistency between reasoning and results.</p><p>This is the core of <strong>self-reinforcement</strong>: the AI trains itself from its own experience.</p><h3><strong>How a Self-Learning Loop Works</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*IOyL4tudR0dJT1dlTsUc9A.png" /><figcaption>Each loop refines the system it “learns to learn” without human retraining.</figcaption></figure><h3><strong>Why It Matters</strong></h3><p>Self-learning AI has wide-reaching implications:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*STJGs5K-SRtVU8A6qwXlRw.png" /></figure><h3><strong>Challenges</strong></h3><ol><li><strong>Catastrophic Forgetting: </strong>New learning can erase old knowledge.</li><li><strong>Bias Amplification: </strong>Flawed feedback loops reinforce wrong behavior.</li><li><strong>Safety &amp; Alignment: </strong>Self-learning models must not “drift” into unsafe actions.</li><li><strong>Evaluation: </strong>Moving targets make benchmarking harder.</li></ol><p>Active research in <strong>elastic weight consolidation</strong>, <strong>safety alignment</strong> and <strong>meta-evaluation</strong> is addressing these.</p><p><strong>The Road to Cognitive AI</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*KyHAciSq04XL3ktvJqyIlg.png" /></figure><ul><li><strong>Predictive: </strong>Trained on data, static.</li><li><strong>Adaptive: </strong>React to environment.</li><li><strong>Reflective: </strong>Improve via self-feedback.</li><li><strong>Cognitive: </strong>Reason, plan, and self-improve continuously.</li></ul><h3><strong>The Future: AI That Understands Itself</strong></h3><p>We’re entering an era where AI won’t just generate, it will <strong>grow</strong>.</p><blockquote><em>“</em>AI won’t just get smarter because we feed it more data it’ll get smarter because it learns how to learn.<em>”</em></blockquote><p>This next generation of models self-improving, reflective, adaptive will blur the line between machine learning and machine thinking.</p><p>The future of intelligence is not pre-trained. It’s <strong>self-trained.</strong></p><h3><strong>Author’s Note</strong></h3><p>If you found this useful, follow me for more articles on <strong>Generative AI, Self-Learning Systems, and Cognitive Model Design.</strong></p><p>Connect with me on <a href="https://www.linkedin.com/in/geekynomad/"><strong>LinkedIn</strong></a><strong>. </strong>I regularly share insights, research breakdowns, and hands-on experiments in applied AI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57b42d3213be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Agentic AI with LangChain, Azure OpenAI, and FastAPI]]></title>
            <link>https://medium.com/@pablopaul1999/building-an-agentic-ai-with-langchain-azure-openai-and-fastapi-b570f14d9106?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b570f14d9106</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[gpt-4]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 09:15:59 GMT</pubDate>
            <atom:updated>2025-09-16T09:15:59.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r-_fHzI6TqfBsNp7" /><figcaption>Photo by <a href="https://unsplash.com/@santesson89?utm_source=medium&amp;utm_medium=referral">Andrea De Santis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In this article, we will explore how to build an Agentic AI application using LangChain, Azure OpenAI, and FastAPI. Agentic AI refers to systems that can autonomously interact with tools, APIs, and memory to perform tasks based on user input. By combining LangChain’s agent framework, Azure OpenAI’s powerful language models, and FastAPI’s lightweight web framework, we can create a conversational AI capable of fetching real-world data, such as stock market information, and responding intelligently to user queries.</p><p>We will walk through the code, explain the components, and discuss how to extend this application further.</p><h3>Procedure</h3><h4>1. Setting Up the Environment</h4><ul><li>Install the required libraries: langchain, fastapi, pydantic, and requests.</li><li>Set up API keys for Azure OpenAI, MarketStack (or similar stock search API).</li><li>Configure environment variables for secure access to these APIs.</li></ul><h4>2. Initializing the Language Model</h4><ul><li>Use the AzureChatOpenAI class from LangChain to connect to Azure OpenAI&#39;s GPT model.</li><li>Configure parameters such as temperature, token limits, and retries.</li></ul><h4>3. Adding Memory</h4><ul><li>Use ConversationBufferMemory to enable the agent to remember the context of the conversation.</li></ul><h4>4. Creating a Stock Data Tool</h4><ul><li>Define a function get_stock_data to fetch stock market data using the MarketStack API.</li><li>Wrap this function in a LangChain Tool to make it accessible to the agent.</li></ul><h4>5. Initializing the Agent</h4><ul><li>Use LangChain’s initialize_agent function to combine the language model, tools, and memory into a conversational agent.</li></ul><h4>6. Building the FastAPI Application</h4><ul><li>Create a FastAPI app with an endpoint /ask to handle user queries.</li><li>Use the agent to process user input and return intelligent responses.</li></ul><h3>Explanation of the Procedure</h3><h4>1. Importing Libraries and Setting Up the Environment</h4><p>The first step is to install the necessary libraries and configure API keys. These keys allow the application to interact with external services like Azure OpenAI and MarketStack. Using environment variables ensures that sensitive information is not hardcoded into the application.</p><pre>import os<br>import requests<br>from langchain_openai import AzureChatOpenAI<br>from langchain.memory import ConversationBufferMemory<br>from langchain.agents import initialize_agent, AgentType<br>from langchain.tools import Tool<br>from fastapi import FastAPI, HTTPException<br>from pydantic import BaseModel<br><br>os.environ[&quot;AZURE_OPENAI_API_KEY&quot;] = &quot;your_azure_api_key&quot;<br>os.environ[&quot;AZURE_OPENAI_ENDPOINT&quot;] = &quot;your_azure_endpoint&quot;<br>MARKETSTACK_API_KEY = &quot;your_marketstack_api_key&quot;</pre><h4>2. Initializing the Language Model</h4><p>The AzureChatOpenAI class is used to connect to Azure OpenAI&#39;s GPT model. Parameters like temperature control the creativity of the responses, while max_tokens limits the response length.</p><pre>llm = AzureChatOpenAI(<br>    azure_deployment=&quot;your_deployment_name&quot;,<br>    api_version=&quot;your_api_version&quot;,<br>    temperature=0.7,<br>    max_tokens=None,<br>    timeout=None,<br>    max_retries=2,<br>    store=True<br>)</pre><h4>3. Adding Memory</h4><p>Memory is crucial for maintaining context in a conversation. The ConversationBufferMemory class stores the chat history, allowing the agent to refer back to previous messages.</p><pre>memory = ConversationBufferMemory(memory_key=&quot;chat_history&quot;, return_messages=True)</pre><h4>4. Creating a Stock Data Tool</h4><p>The get_stock_data function fetches stock market data from the MarketStack API. It processes the API response and formats the data for user-friendly output. This function is then wrapped in a LangChain Tool to make it accessible to the agent.</p><pre>def get_stock_data(symbol: str):<br>    url = f&quot;http://api.marketstack.com/v2/eod?access_key={MARKETSTACK_API_KEY}&amp;symbols={symbol}&quot;<br>    response = requests.get(url)<br>    data = response.json()<br>    if &quot;data&quot; in data and len(data[&quot;data&quot;]) &gt; 0:<br>        latest_data = data[&quot;data&quot;][0]<br>        name = latest_data.get(&quot;name&quot;, &quot;Unknown&quot;)<br>        date = latest_data.get(&quot;date&quot;, &quot;Unknown&quot;)<br>        open_price = latest_data.get(&quot;open&quot;, &quot;N/A&quot;)<br>        close_price = latest_data.get(&quot;close&quot;, &quot;N/A&quot;)<br>        high = latest_data.get(&quot;high&quot;, &quot;N/A&quot;)<br>        low = latest_data.get(&quot;low&quot;, &quot;N/A&quot;)<br>        return (<br>            f&quot;Stock Data for {name} ({symbol}):\n&quot;<br>            f&quot;Date: {date}\n&quot;<br>            f&quot;Open: ${open_price}\n&quot;<br>            f&quot;Close: ${close_price}\n&quot;<br>            f&quot;High: ${high}\n&quot;<br>            f&quot;Low: ${low}&quot;<br>        )<br>    else:<br>        raise ValueError(&quot;Invalid response from the MarketStack API or no data available for the given symbol.&quot;)</pre><h4>5. Initializing the Agent</h4><p>The initialize_agent function combines the language model, tools, and memory into a conversational agent. The AgentType.CONVERSATIONAL_REACT_DESCRIPTION type is used to enable the agent to reason and act based on user input.</p><pre>agent = initialize_agent(<br>    tools=[stock_tool],<br>    llm=llm,<br>    agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION,<br>    memory=memory,<br>    verbose=True<br>)</pre><h4>6. Building the FastAPI Application</h4><p>FastAPI is used to create a lightweight web application. The /ask endpoint receives user queries, processes them using the agent, and returns the response.</p><pre>@app.post(&quot;/ask&quot;)<br>def chat(request: ChatRequest):<br>    try:<br>        response = agent.run(request.message)<br>        return {&quot;response&quot;: response}<br>    except Exception as e:<br>        raise HTTPException(status_code=500, detail=str(e))</pre><h3>Next Steps</h3><h4>1. Adding More Tools</h4><p>Expand the agent’s capabilities by adding tools for weather data, news summaries, or other APIs.</p><h4>2. Enhancing Memory</h4><p>Use more advanced memory modules to enable long-term memory or structured knowledge storage.</p><h4>3. Deploying the Application</h4><p>Deploy the FastAPI application to a cloud platform like AWS, Azure, or Google Cloud for public access.</p><h4>4. Improving Error Handling</h4><p>Implement robust error handling to manage API failures, invalid inputs, and other edge cases.</p><h4>5. User Interface</h4><p>Build a user-friendly front-end interface using frameworks like React or Vue.js to interact with the backend.</p><h3>Conclusion</h3><p>By combining LangChain, Azure OpenAI, and FastAPI, we have created a powerful Agentic AI application capable of fetching and processing real-world data. This modular and extensible architecture allows for easy integration of additional tools and features, making it a versatile solution for various use cases. Start building your own Agentic AI today and unlock the potential of conversational intelligence!</p><p>Follow me on <a href="https://www.linkedin.com/in/geekynomad/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b570f14d9106" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extract Text from Images using Azure OpenAI GPT-4.1]]></title>
            <link>https://blog.devgenius.io/extract-text-from-images-using-azure-openai-gpt-4-1-6cc025f5396a?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cc025f5396a</guid>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Thu, 15 May 2025 05:55:03 GMT</pubDate>
            <atom:updated>2025-05-21T11:06:07.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yWScQ3_vx8bqVkjc" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Have you ever wanted to extract text from an image — like a scanned document, a signboard, or a screenshot — using OpenAI’s GPT models? With Azure OpenAI Service now supporting <strong>multimodal input</strong>, you can do this with just a few lines of Python!</p><p>In this tutorial, I’ll walk you through how to:</p><ul><li>Connect to <strong>Azure OpenAI GPT-4.1</strong></li><li>Send an <strong>image input</strong></li><li>Get extracted <strong>text output</strong></li></ul><p><strong>Why GPT-4.1 for Image-to-Text?</strong></p><p>GPT-4.1 supports image inputs, making it a powerful tool for tasks like:</p><ul><li>OCR (Optical Character Recognition)</li><li>Understanding diagrams</li><li>Reading labels, receipts, forms</li><li>Translating or analyzing visual data</li></ul><p><strong>Prerequisites</strong></p><ul><li>Access to Azure OpenAI with a GPT-4.1 deployment that <strong>supports image input</strong></li><li>Python 3.8+</li><li>OpenAI SDK (pip install openai)</li><li>A sample image (.jpg or .png) with readable text</li></ul><p><strong>The Code</strong></p><pre>import os<br>import base64<br>from openai import AzureOpenAI<br><br><br>endpoint = &quot;https://&lt;your-endpoint&gt;.cognitiveservices.azure.com/&quot;<br>deployment = &quot;gpt-4.1&quot; <br>api_key = &quot;&lt;your-api-key&gt;&quot;<br>api_version = &quot;2025-04-14&quot;<br><br>client = AzureOpenAI(<br>    api_version=api_version,<br>    azure_endpoint=endpoint,<br>    api_key=api_key,<br>)<br><br>image_path = &quot;sample.jpg&quot;<br>with open(image_path, &quot;rb&quot;) as f:<br>    b64_image = base64.b64encode(f.read()).decode(&quot;utf-8&quot;)<br><br>image_input = {<br>    &quot;type&quot;: &quot;image_url&quot;,<br>    &quot;image_url&quot;: {<br>        &quot;url&quot;: f&quot;data:image/jpeg;base64,{b64_image}&quot;<br>    }<br>}<br><br>response = client.chat.completions.create(<br>    messages=[<br>        {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a helpful assistant. Extract any visible text from the image.&quot;},<br>        {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: [image_input]}<br>    ],<br>    model=deployment,<br>    max_tokens=800<br>)<br><br>print(response.choices[0].message.content)</pre><p><strong>What’s Next?</strong></p><p>Try combining this with summarization or translation:</p><pre>{&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;Translate the text in this image to Spanish.&quot;}</pre><p><strong>Conclusion</strong></p><p>GPT-4.1 with image input is not just about chat — it’s a full-blown <strong>multimodal AI interface</strong>. Azure makes this easy to integrate into your applications with just a few lines of Python. Whether you’re building internal tools or end-user apps, image understanding opens a new frontier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cc025f5396a" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/extract-text-from-images-using-azure-openai-gpt-4-1-6cc025f5396a">Extract Text from Images using Azure OpenAI GPT-4.1</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Text Generation with Transformers: Harnessing the Potential of Language Models]]></title>
            <link>https://blog.gopenai.com/text-generation-with-transformers-harnessing-the-potential-of-language-models-5bfb600abd55?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bfb600abd55</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[text-generation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Wed, 17 May 2023 05:51:44 GMT</pubDate>
            <atom:updated>2023-05-18T08:33:54.914Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In recent years, the field of natural language processing (NLP) has witnessed a groundbreaking advancement in text generation capabilities, thanks to the emergence of transformer models. Among these models, the Transformer architecture has revolutionized the way machines understand and generate human-like text. With their ability to capture long-range dependencies and contextual information, transformers have unlocked new possibilities for applications such as chatbots, content generation, and language translation. In this article, we will explore the potential of text generation with transformers and delve into how these language models are reshaping the world of NLP.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*-3cfrsWlQffj6P91p20FbQ.png" /><figcaption>Photo by <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTransformer_%2528machine_learning_model%2529&amp;psig=AOvVaw3OUnQXhc_dvq0I9vC844WV&amp;ust=1684387890331000&amp;source=images&amp;cd=vfe&amp;ved=0CBMQjhxqFwoTCKCC7oDQ-_4CFQAAAAAdAAAAABAb">Transformer (machine learning model) — Wikipedia</a></figcaption></figure><h3>Understanding Transformers</h3><p>Transformers are deep learning models that utilize self-attention mechanisms to process sequential data, such as text. Unlike traditional recurrent neural networks (RNNs) that process input sequentially, transformers process the entire input in parallel, allowing for more efficient computation and capturing of global dependencies. The self-attention mechanism enables transformers to assign different weights to different parts of the input, allowing them to focus on relevant information and context.</p><h3>Language Modeling with Transformers</h3><p>One of the key applications of transformers is language modeling, which involves training a model to predict the next word in a given sequence of words. Language models, such as OpenAI’s GPT (Generative Pre-trained Transformer), have been pre-trained on vast amounts of text data, enabling them to learn grammar, context, and even generate coherent text. By fine-tuning these pre-trained models on specific tasks or domains, developers can create powerful text generation systems.</p><h3>Improvements in Text Generation</h3><p>Transformers have significantly improved text generation capabilities. They can generate more contextually relevant and coherent text compared to earlier approaches. By considering a wider context, transformers avoid the pitfalls of repetitive or nonsensical responses often encountered in rule-based or simpler models. Additionally, fine-tuning language models on specific datasets or prompts enables developers to shape the generated text according to their requirements.</p><h3>Applications of Text Generation with Transformers</h3><p>Text generation with transformers has found numerous applications across various domains. Chatbots powered by transformers can engage in more natural and meaningful conversations, providing human-like responses. Content generation, such as writing articles or generating product descriptions, has become more efficient and accurate with the help of transformers. Language translation models utilizing transformers have achieved remarkable results, enabling smoother cross-lingual communication.</p><h3>Challenges and Ethical Considerations</h3><p>While the advancements in text generation with transformers are impressive, challenges and ethical considerations persist. Bias in training data can result in biased or discriminatory generated text. Ensuring fairness and inclusivity in text generation models remains an ongoing challenge. Additionally, the potential misuse of generative models for spreading misinformation or creating deepfake content calls for responsible development and deployment of these systems.</p><h3>Conclusion</h3><p>Text generation with transformers has propelled the field of natural language processing into new frontiers. These powerful language models have the potential to transform the way we communicate, create content, and bridge language barriers. While there are challenges to address and ethical considerations to navigate, the harnessing of transformer models opens up a world of possibilities for more natural, coherent, and context-aware text generation systems. As researchers and developers continue to refine and innovate in this space, we can expect even more exciting advancements in the future, revolutionizing the way we interact with and benefit from language technology.</p><p>I hope you enjoyed this article.</p><p>Follow me on <a href="https://www.linkedin.com/in/thepetrolhead/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bfb600abd55" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/text-generation-with-transformers-harnessing-the-potential-of-language-models-5bfb600abd55">Text Generation with Transformers: Harnessing the Potential of Language Models</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semantic Search With Transformers and Elasticsearch]]></title>
            <link>https://blog.gopenai.com/semantic-search-using-transformers-and-elasticsearch-6e968fdd85d5?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e968fdd85d5</guid>
            <category><![CDATA[k-nearest-neighbours]]></category>
            <category><![CDATA[similarity-search]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[semantic-search]]></category>
            <category><![CDATA[vector-search]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Wed, 10 May 2023 18:54:45 GMT</pubDate>
            <atom:updated>2023-05-16T10:06:04.603Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Semantic/Vector search is a powerful technique that can greatly improve the accuracy and relevance of search results. Unlike traditional keyword-based search methods, semantic search uses the meaning and context of words to understand the intent behind a query and deliver more accurate results. One of the most popular tools for implementing semantic search is Elasticsearch, a highly scalable and powerful search engine that can be used to index and search large volumes of data. In this article, we will explore the basics of semantic search and how it can be implemented using Elasticsearch. By the end of this article, you will have a solid understanding of how semantic search works and the practical skills to implement it in your own projects.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Te1VicAJPhdU6ZBG" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=medium&amp;utm_medium=referral">Caspar Camille Rubin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Elasticsearch</h4><p>Elasticsearch is a powerful and scalable open-source search engine based on the Lucene library. It is designed to handle large amounts of unstructured data and provide fast and accurate search results. Elasticsearch uses a distributed architecture, which means that it can scale horizontally across multiple servers to handle large amounts of data and traffic.</p><p>Elasticsearch is built on top of a RESTful API, which makes it easy to integrate with a variety of programming languages and tools. It supports complex search queries, including full-text search, faceted search, and geo search. Elasticsearch also provides a powerful aggregation framework that allows you to perform complex data analysis on your search results.</p><h4>Transformers</h4><p>Transformers are a type of machine learning model that have revolutionized natural language processing (NLP) tasks such as language translation, text summarization, and sentiment analysis. Transformers were first introduced by Vaswani et al. in a 2017 paper, “Attention Is All You Need,” and have since become the state-of-the-art model for many NLP tasks.</p><p>Unlike traditional NLP models, which rely on recurrent neural networks (RNNs) and convolutional neural networks (CNNs), transformers use a self-attention mechanism to capture relationships between words in a sentence. Self-attention allows the model to focus on different parts of the input sequence to determine the most important relationships between words. This makes transformers much more effective than traditional models for handling long-range dependencies and contextual relationships between words.</p><p>For this article, I am going to use the Universal Sentence Encoder from TensorFlow to encode/vectorize my data. You may choose any other form of encoder as well.</p><h4>Prerequisite</h4><p>Before we begin there are couple of things which we should know and have some of it handy, which includes:</p><ul><li>Knowledge of python, which includes the knowledge of using external libraries and an IDE.</li><li>Understanding of Transformers / Vectorizers and the dimensions they output.</li><li>Elasticsearch 8.6 and above, installed on your system.</li></ul><h4>Building The Capability</h4><p>To build this semantic search capability, I have used Python for my backend, Universal Sentence Encoder for getting embeddings/vectors and Elasticsearch 8.6.1.</p><p>Now, lets start with installing the dependencies before we go on to the actual implementation.</p><p>pip install elasticsearch==8.6.1</p><p>pip install tensorflow==2.10.0</p><p>Once you have installed the dependencies, you will need text data to start with. On obtaining the text data, read it using python in your preferred IDE.</p><pre>from elasticsearch import Elasticsearch<br>import pandas as pd<br>import numpy as np<br><br>df = pd.read_csv(&#39;your_text_dataset.csv&#39;)</pre><p>After reading the text data now the first task is to convert it to vectors or embeddings. Here, as I have mentioned earlier I am using the Universal Sentence Encoder from TensorFlow which upon providing a string outputs vectors/embeddings in “512&quot; dimensions.</p><p>This will vary for other transformers/vectorizers and you need to keep this in mind for the steps further.</p><p>Let’s first load the Universal Sentence Encoder model as I have stored it in my system. If you wish you can also use it as an API, available on their <a href="https://tfhub.dev/google/universal-sentence-encoder/4">website.</a></p><pre>model = hub.load(&quot;path/model v4&quot;)</pre><p>Once the model has been loaded successfully, now our next task is to convert the text in the dataset to vectors/embeddings and store it in a new field/column called “<strong><em>Embeddings</em></strong>”.</p><pre>with tf.compat.v1.Session() as session:<br>    session.run([tf.compat.v1.global_variables_initializer(), tf.compat.v1.tables_initializer()])<br>    query_array = session.run(model(df[&quot;Text&quot;]))<br><br>vectors = []<br>for i in query_array:<br>    vectors.append(i)<br><br>df[&quot;Embeddings&quot;] = vectors</pre><p><strong>NOTE: </strong>In my dataset I have a field/column called “<strong><em>Text</em></strong>”. Change this to the field name according to your dataset.</p><p>Once the embedding is done and has been stored in a new field, it’s time to insert this data to Elasticsearch in our system, which you should have already installed at the beginning of this tutorial.</p><p>To insert the data, we have first have to connect to Elasticsearch and all this will happen using python.</p><pre>http_auth = (&quot;elastic_username&quot;, &quot;elastic_password&quot;)<br>es_host = &quot;https://localhost:9200&quot;<br>context = create_default_context(cafile=&quot;http_ca.crt&quot;)<br>es = Elasticsearch(<br>    es_host,<br>    basic_auth=http_auth,<br>    ssl_context=context<br>)</pre><p>To verify if the connection has been established you can open “https://localhost:9200” on your preferred browser and check. You can also check the connection from your IDE by running “<strong><em>es.ping()</em></strong>”. The output should be “<strong><em>True</em></strong>” for a succesfull connection.</p><p>Now that we have established the connection with Elasticsearch, let’s go ahead and configure the Elasticsearch index.</p><pre>configurations = {<br>    &quot;settings&quot;: {<br>        &quot;analysis&quot;: {<br>            &quot;filter&quot;: {<br>                 &quot;ngram_filter&quot;: {<br>                     &quot;type&quot;: &quot;edge_ngram&quot;,<br>                     &quot;min_gram&quot;: 2,<br>                     &quot;max_gram&quot;: 15,<br>                 },<br>                &quot;english_stop&quot;: {<br>                  &quot;type&quot;:       &quot;stop&quot;,<br>                  &quot;stopwords&quot;:  &quot;_english_&quot; <br>                },<br>                 &quot;english_keywords&quot;: {<br>                   &quot;type&quot;:       &quot;keyword_marker&quot;,<br>                   &quot;keywords&quot;:   [&quot;example&quot;] <br>                 },<br>                &quot;english_stemmer&quot;: {<br>                  &quot;type&quot;:       &quot;stemmer&quot;,<br>                  &quot;language&quot;:   &quot;english&quot;<br>                },<br>                &quot;english_possessive_stemmer&quot;: {<br>                  &quot;type&quot;:       &quot;stemmer&quot;,<br>                  &quot;language&quot;:   &quot;possessive_english&quot;<br>                }<br>            },<br>            &quot;analyzer&quot;: {<br>                &quot;en_analyzer&quot;: {<br>                    &quot;type&quot;: &quot;custom&quot;,<br>                    &quot;tokenizer&quot;: &quot;standard&quot;,<br>                    &quot;filter&quot;: [&quot;lowercase&quot;, <br>                                &quot;ngram_filter&quot;, <br>                                &quot;english_stemmer&quot;,<br>                               &quot;english_possessive_stemmer&quot;,<br>                                &quot;english_stop&quot;<br>                                &quot;english_keywords&quot;,<br>                                ]<br>                }<br>            } <br>        } <br>    },<br>    &quot;mappings&quot;: {<br>        &quot;properties&quot;: {<br>          &quot;Embeddings&quot;: {<br>            &quot;type&quot;: &quot;dense_vector&quot;,<br>            &quot;dims&quot;: 512,<br>            &quot;index&quot;: True,<br>            &quot;similarity&quot;: &quot;cosine&quot; <br>          },<br>          } <br>        } <br>    } <br>configurations[&quot;settings&quot;]</pre><p>With the help of the above configuration we are able to configure our index where the data will be inserted. That said, let’s take a closer look at some important parameters.</p><ul><li>&quot;type&quot;: The type has to be set always as “<strong><em>dense_vector</em></strong>”. This is done so that ElasticSearch understands that these are vectors and does not self assign floating type to this field.</li><li>&quot;dims&quot;: Also know and dimensions. Like I had mentioned earlier, Universal Sentence Encoder produces and output of “<strong><em>512</em></strong>” dimensions, that is why we have provide “<strong><em>512</em></strong>” in the parameter.</li><li>&quot;index&quot;: Index has to be set as “<strong><em>True</em></strong>” so that this field is created and has a dense_vector type in ElasticSearch.</li><li>&quot;similarity&quot;: We are going for a cosine similarity and have mentioned it. You may choose others as well.</li></ul><p>Once the index has been configured, now let’s go ahead and create this index.</p><pre>es.indices.create(index=&#39;my_new_index&#39;,<br>                    settings=configurations[&quot;settings&quot;],<br>                    mappings=configurations[&quot;mappings&quot;]<br>                    )</pre><p>Here, I am have named the index as “<strong><em>my_new_index</em></strong>”. With this, our index has been created with our configuration and finally now we are ready to insert our data to this index on Elasticsearch.</p><pre>actions = []<br>index_name = &#39;my_new_index&#39;<br>for index, row in df.iterrows():<br>    action = {&quot;index&quot;: {&quot;_index&quot;: index_name, &quot;_id&quot;: index}}<br>    doc = {<br>        &quot;id&quot;: index,<br>        &quot;Text&quot;: row[&quot;Text&quot;],<br>        &quot;Price&quot;: row[&quot;Price&quot;],<br>        &quot;Quantity&quot;: row[&quot;Quantity&quot;],<br>        &quot;Embeddings&quot;: row[&quot;Embeddings&quot;]<br>    }<br>    actions.append(action)<br>    actions.append(doc)<br><br>es.bulk(index=index_name, operations=actions)</pre><p>With the help of the above code, you will be able to insert your data to Elasticsearch.</p><h4>The Search</h4><p>Once the data has been inserted, we can now search on this data and ask some relevant questions. To do so, lets start with a question we want to get answers for.</p><p>query = &quot;Which is the latest phone available in your shop?&quot;</p><p>Now, as we need to do a semantic search on Elasticsearch, we will need transform this text to embeddings/vectors.</p><pre>with tf.compat.v1.Session() as session:<br>    session.run([tf.compat.v1.global_variables_initializer(), tf.compat.v1.tables_initializer()])<br>    query_array = session.run(model([query])).tolist()[0]</pre><p>After the text has been transformed to embeddings/vectors, we are ready to search this text against our existing data in Elasticsearch. To do so, we first have to build a query to fetch data from Elasticsearch.</p><pre>query_for_search = {<br>  &quot;knn&quot;: {<br>    &quot;field&quot;: &quot;Embeddings&quot;,<br>    &quot;query_vector&quot;: query_array,<br>    &quot;k&quot;: 5,<br>    &quot;num_candidates&quot;: 2414<br>  },<br>  &quot;_source&quot;: [ &quot;Text&quot;]<br>}</pre><p>With the code provided above, we are able to query from Elasticsearch. But before we look at the next step, let’s take a closer look at this query and understand it.</p><ul><li>&quot;knn&quot;: Elasticsearch supports K-Nearest Neighbors a.k.a kNN algorithm and is already available in Elasticsearch. You need not train a it separately.</li><li>&quot;field&quot;: The field where your embeddings/vectors are stored in Elasticsearch.</li><li>&quot;query_vector&quot;: Your input in vector/embeddings form.</li><li>&quot;k&quot;: Number of outputs/search results you require.</li><li>&quot;num_candidates&quot;: The length of the output/search results in tokens.</li><li>&quot;_source&quot;: The field from where the output/search result has to be provided.</li></ul><p>Now, we are ready for searching Elasticsearch.</p><pre>result = es.search(<br>    index=&quot;my_new_index&quot;,<br>    body=query_for_search)<br>result0[&quot;hits&quot;]</pre><p>With the help of the above query, you will be able to get search results from the index in which you had stored your data previously.</p><p>Remember, you can only perform semantic search on indices which have a configured field which contains the embeddings/vectors as <strong>“<em>type</em>” <em>:</em> “<em>dense_vector</em>” </strong>and the vector dimensions have to be exactly the same for your query/question and the data stored in Elasticsearch. For example, in the above tutorial, our data in Elasticsearch was in “<strong><em>512</em></strong>” dimensions and the query/question was also converted to “<strong><em>512</em></strong>” dimensions before we went ahead with the search operation.</p><h4>Conclusion</h4><p>In conclusion, semantic search is a powerful tool that can greatly improve the accuracy and relevance of search results by understanding the meaning and context of words. Elasticsearch is a highly scalable and flexible search engine that can be used to implement semantic search for a variety of applications, from e-commerce to healthcare. By leveraging Elasticsearch’s powerful search and indexing capabilities, along with techniques such as query expansion, synonym detection, and entity recognition, you can build a semantic search system that provides fast and accurate results. Whether you’re a developer, data scientist, or business owner, mastering semantic search using Elasticsearch can help you unlock new insights and opportunities from your data. So why wait? Start exploring the power of semantic search with Elasticsearch today!</p><p>For a look at the completed code, please reference the <a href="https://github.com/Pritam868/Semantic-Search-ElasticSearch">github repo</a>. I hope you enjoyed this article.</p><p>Follow me on <a href="https://www.linkedin.com/in/thepetrolhead/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e968fdd85d5" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/semantic-search-using-transformers-and-elasticsearch-6e968fdd85d5">Semantic Search With Transformers and Elasticsearch</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Text Summarization with LLMs]]></title>
            <link>https://medium.com/@pablopaul1999/text-summarization-with-llms-c7443dc1d7d5?source=rss-6c8a4afc99b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7443dc1d7d5</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Pritam Paul]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 08:51:29 GMT</pubDate>
            <atom:updated>2023-04-11T16:50:27.579Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A quick approach to summarize text using GPT 3.5 turbo which is a highly advanced AI model in the field of natural language processing, with vast improvements in generating contextually accurate and relevant text.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OySg_OrvYwpehzU5" /><figcaption>Photo by <a href="https://unsplash.com/@ilgmyzin?utm_source=medium&amp;utm_medium=referral">ilgmyzin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>Large Language Models</strong></h4><p>Large Language Models or LLMs are pre-trained Machine Learning models which are trained on huge text datasets to understand and generate human like responses. In current times a lot of LLMs are available like GPT-4, LaMDA, BLOOM and others; and they are capable of doing a lot of tasks for us. Here I will specifically speak about GPT-3.5 turbo and text classification.</p><h4>Prerequisite</h4><p>Before we begin there are couple of things which we should know and have some of it handy, which includes:</p><ul><li>Knowledge of python, which includes the knowledge of using external libraries and an IDE.</li><li>Understanding of API’s and how to use them in python.</li><li>Having an OpenAI API.</li></ul><p>To have access to OpenAI API’s we would need to be registered on <a href="https://platform.openai.com/overview">OpenAI developer platform</a> and create an API key if we don&#39;t have one.</p><p><strong>NOTE:</strong> Save the API key with yourself. OpenAI does not show you the API keys once generated. In case one loses/forgets it, a new API key has to be generated.</p><h4>The Build</h4><p>To build this text summarizer I have used Python for my backend and Streamlit for building the web app. Streamlit is an open-source Python package designed for creating machine learning and data science web apps. It’s easy to use and intuitive, so it is recommended for many beginners.</p><p>Now, lets start with installing the dependencies before we go on to the actual text summarizer.</p><p>pip install openai</p><p>pip install streamlit</p><p>For this article, we have only two dependencies, i.e., The OpenAI and Streamlit.</p><p>Let’s start building our text summarizer. This is just the Python code, the web app will follow at a later stage in the article.</p><pre>import openai<br>import streamlit as st<br><br>openai.api_key = &quot;Your-OPENAI-key&quot;<br><br><br>def generate_summarizer(<br>    max_tokens,<br>    temperature,<br>    top_p,<br>    frequency_penalty,<br>    prompt,<br>    person_type,<br>):<br>    res = openai.ChatCompletion.create(<br>        model=&quot;gpt-3.5-turbo&quot;,<br>        max_tokens=1000,<br>        temperature=0.7,<br>        top_p=0.5,<br>        frequency_penalty=0.5,<br>        messages=<br>       [<br>         {<br>          &quot;role&quot;: &quot;system&quot;,<br>          &quot;content&quot;: &quot;You are a helpful assistant for text summarization.&quot;,<br>         },<br>         {<br>          &quot;role&quot;: &quot;user&quot;,<br>          &quot;content&quot;: f&quot;Summarize this for a {person_type}: {prompt}&quot;,<br>         },<br>        ],<br>    )<br>    return res[&quot;choices&quot;][0][&quot;message&quot;][&quot;content&quot;]</pre><p>With the help of the above code we interact with OpenAI GPT-3.5 turbo model. Also, here I am using the ChatCompletion API, where we can create a conversation and will get the intended result after passing the prompt.</p><p>That said, let’s take a closer look at the code block provided above and describe a couple of hyperparameters.</p><ul><li>openai.ChatCompletion.create: is used to create the response from the prompt we would pass into the API.</li><li>model: The model we want to use. I have used the GPT-3.5 turbo model for this article. GPT-4 can also be used.</li><li>max_tokens: The maximum number of words/tokens generated by the model. It helps in limiting the length of the generated text.</li><li>temperature: The randomness of the model’s output, having a higher temperature results in a more diverse and creative result/output. The value range is between 0 to infinity, although values more than 2 are not common.</li><li>top_p: Top P or top-k sampling or nucleus sampling is a parameter to control the sampling pool from the output distribution. For example, value 0.1 means the model only samples the output from the top 10% of the distribution. The value range was between 0 and 1; higher values result in a more diverse result.</li><li>frequency_penalty: Penalty for repetition of token from the output. The value range between -2 to 2, where positive values would suppress the model from repeating token while negative values encourage the model to use more repetitive words. 0 would mean no penalty is applied.</li><li>messages: The part where we pass our text prompt to be processed with the model. We pass a list of dictionaries where the key is the role object (either “system”, “user”, or “assistant”) that helps the model to understand the context and structure while the values are the context.</li></ul><p>After discussing about the hyperprameters, we observe that the messages hyperparameter has two dictionary objects. The first dictionary is for setting the model as a text summarizer. The second is where we would pass our text and get the summarization output.</p><p>In the second dictionary, things to notice are variables person_type and prompt. The person_type is a variable I used to control the summarized style. While the prompt is where we would pass our text to be summarized.</p><p>As, I had mentioned earlier in this article, I am using Streamlit to build the web app, now let’s take a closer look into this:</p><pre>#application title<br>st.title(&quot;Text Summarization&quot;)<br><br>#Provide the input area for text<br>input_text = st.text_area(&quot;Enter the text to summarize:&quot;, height=200)<br><br>#Initiate three columns for section to be side-by-side<br>col1, col2, col3 = st.columns(3)<br><br>#Slider to control the model hyperparameter<br>with col1:<br>    token = st.slider(&quot;Token&quot;, min_value=0.0, max_value=1000.0, value=50.0, step=1.0)<br>    temp = st.slider(&quot;Temperature&quot;, min_value=0.0, max_value=1.0, value=0.0, step=0.01)<br>    top_p = st.slider(&quot;Nucleus Sampling&quot;, min_value=0.0, max_value=1.0, value=0.5, step=0.01)<br>    f_pen = st.slider(&quot;Frequency Penalty&quot;, min_value=-1.0, max_value=1.0, value=0.0, step=0.01)<br><br>#Selection box to select the summarization style<br>with col2:<br>    option = st.selectbox(<br>        &quot;Who are you?&quot;,<br>        (<br>            &quot;Second-Grader&quot;,<br>            &quot;Professional Data Scientist&quot;,<br>            &quot;Housewives&quot;,<br>            &quot;Retired&quot;,<br>            &quot;University Student&quot;,<br>        ),<br>    )<br><br>#Showing the current parameter used for the model <br>with col3:<br>    with st.expander(&quot;Current Parameter&quot;):<br>        st.write(&quot;Current Token :&quot;, token)<br>        st.write(&quot;Current Temperature :&quot;, temp)<br>        st.write(&quot;Current Nucleus Sampling :&quot;, top_p)<br>        st.write(&quot;Current Frequency Penalty :&quot;, f_pen)<br><br>#Creating button for execute the text summarization<br>if st.button(&quot;Summarize&quot;):<br>    st.write(generate_summarizer(token, temp, top_p, f_pen, input_text, option))</pre><p>Save all the code in a single python file. I am calling my file summarize.py .</p><h4>Testing The Build</h4><p>Once all the python code provided above has been saved in a single Python file. Try to run the following code on your command prompt to initiate the application.</p><p>streamlit run summarize.py</p><p>After you run the above command in your command prompt, you should be able to see the below application on your default web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*x4Q4ZS8fvwbvBJi73Hp8-w.png" /></figure><p>Once the application is opened in your default web browser. You can start feeding some input text which you would want to summarize. After the input text has been provided, press the Summarize button provided at the bottom of the application to get the summary to the input text.</p><p>It would also be interesting to play around with the hyperparameters and see how the output varies when the hyperparameters are set to default against when they are changed. Another interesting parameter to check is the who are you? . It has options such as “Second-Grader”, “Professional Data Scientist”, “Househelper”, “Retired”, and “University Student”. The response from GPT-3.5 would be different for all the types, as it would try to make you understand according to your level of understanding of any particular topic, For example, understanding how earth revolves around the sun would be different for a second-grader when compared to a university student.</p><h4>Conclusion</h4><p>With the rise in Generative AI, we have lots of opportunities to solve industry problems in an easier fashion. In this article I have discussed how the OpenAI API’s work and how we can use it to create a simple text summarization application using Python and Streamlit packages.</p><p>For a look at the completed code, please reference the <a href="https://github.com/Pritam868/Text-Summarization-with-LLMs">github repo</a>. I hope you enjoyed this article.</p><p>Follow me on <a href="https://www.linkedin.com/in/thepetrolhead/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7443dc1d7d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>