<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Langchaingo on Tony老师的博客</title><link>https://blog.tanteng.space/tags/langchaingo/</link><description>Recent content in Langchaingo on Tony老师的博客</description><generator>Hugo</generator><language>zh</language><lastBuildDate>Mon, 25 Dec 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.tanteng.space/tags/langchaingo/index.xml" rel="self" type="application/rss+xml"/><item><title>基于 LangChain 的结构化输出实践</title><link>https://blog.tanteng.space/posts/prompt-template-structured-output/</link><pubDate>Mon, 25 Dec 2023 00:00:00 +0000</pubDate><guid>https://blog.tanteng.space/posts/prompt-template-structured-output/</guid><description>&lt;p>在 AI 应用开发中，让大模型稳定地输出我们想要的格式是一个常见需求。本文介绍如何使用 LangChain 的 Golang 版本 &lt;a href="https://github.com/tmc/langchaingo">langchaingo&lt;/a> 实现 Prompt Template，并结合主流 LLM 的 JSON Mode 实现可靠的结构化输出。&lt;/p>
&lt;h2 id="什么是-prompt-template">什么是 Prompt Template&lt;/h2>
&lt;p>Prompt Template 是将提示词模板化的技术，通过占位符动态注入变量，让同一套提示词可以处理不同输入。类似于 Web 开发中的模板引擎。&lt;/p></description></item></channel></rss>