<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AI &#8211; wqh博客</title>
	<atom:link href="https://wangqianhong.com/tag/ai/feed/" rel="self" type="application/rss+xml" />
	<link>https://wangqianhong.com</link>
	<description>和而不同</description>
	<lastBuildDate>Sun, 12 Oct 2025 13:23:56 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://wangqianhong.com/wp-content/uploads/2020/09/cropped-1-1-1-32x32.png</url>
	<title>AI &#8211; wqh博客</title>
	<link>https://wangqianhong.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>如何开发一个AI应用</title>
		<link>https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/</link>
					<comments>https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/#respond</comments>
		
		<dc:creator><![CDATA[wqh_work]]></dc:creator>
		<pubDate>Mon, 08 Apr 2024 06:10:17 +0000</pubDate>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[AI]]></category>
		<guid isPermaLink="false">https://wangqianhong.com/?p=3836</guid>

					<description><![CDATA[<p>开发一个完整的AI应用需要系统化的知识体系，以下是构成AI应用核心能力的四个关键环节及其技术细节与关&#8230; <a href="https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">如何开发一个AI应用</span><i class="fa fa-arrow-right"></i></a></p>
<p><a rel="nofollow" href="https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/">如何开发一个AI应用</a>最先出现在<a rel="nofollow" href="https://wangqianhong.com">wqh博客</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>开发一个完整的AI应用需要系统化的知识体系，以下是构成AI应用核心能力的四个关键环节及其技术细节与关联关系的详细说明：</p>



<h3>大语言模型（Large Language Model, LLM）</h3>



<p><strong>核心价值</strong>：作为AI应用的认知中枢，承担核心推理与内容生成任务</p>



<p><strong>技术要点</strong>：</p>



<ol start="1"><li><strong>模型架构</strong>：</li></ol>



<ul><li>Transformer架构：基于自注意力机制的编码器-解码器结构</li><li>参数规模：从70亿到1.8万亿参数不等（如Llama-2到GPT-4架构）</li><li>预训练范式：自监督学习（掩码语言建模、下一句预测等）</li></ul>



<ol start="2"><li><strong>关键技术演进</strong>：</li></ol>



<pre class="wp-block-code"><code>   graph LR
     BERT-->RoBERTa-->DeBERTa
     GPT-2-->GPT-3-->GPT-4
     T5-->FLAN-T5-->PaLM</code></pre>



<ol start="3"><li><strong>应用场景</strong>：</li></ol>



<ul><li>文本生成（代码/文案/故事）</li><li>问答系统</li><li>多模态理解（文本+图像/视频）</li></ul>



<ol start="4"><li><strong>优化方向</strong>：</li></ol>



<ul><li>量化压缩（4-bit/8-bit量化）</li><li>微调方法（LoRA/P-Tuning）</li><li>推理加速（vLLM/TensorRT-LLM）</li></ul>



<p></p>



<h3>Embedding技术</h3>



<p><strong>核心价值</strong>：实现语义到向量空间的映射，构建AI认知的数学基础</p>



<p><strong>技术解析</strong>：</p>



<ol><li><strong>特征表示方法</strong>：</li></ol>



<ul><li>静态嵌入：Word2Vec/GloVe</li><li>动态嵌入：BERT/ELMo</li><li>多模态嵌入：CLIP/ImageBind</li></ul>



<ol start="2"><li><strong>数学特性</strong>：</li></ol>



<ul><li>维度：主流模型输出768-4096维向量</li><li>相似度计算：余弦相似度/欧氏距离</li><li>空间性质：保持语义拓扑结构（king &#8211; man + woman = queen）</li></ul>



<ol start="3"><li><strong>性能指标</strong>：</li></ol>



<pre class="wp-block-code"><code>   # 相似度计算示例
   from sklearn.metrics.pairwise import cosine_similarity
   similarity = cosine_similarity(query_embedding, doc_embeddings)</code></pre>



<ol start="4"><li><strong>优化策略</strong>：</li></ol>



<ul><li>领域自适应训练</li><li>降维处理（PCA/t-SNE）</li><li>混合嵌入融合</li></ul>



<p></p>



<h3>向量数据库（Vector Database）</h3>



<p><strong>核心价值</strong>：构建AI应用的长期记忆系统，实现高效语义检索</p>



<p><strong>架构设计</strong>：</p>



<pre class="wp-block-code"><code>graph TD
    A&#91;数据输入] --> B&#91;Embedding模型]
    B --> C&#91;向量化处理]
    C --> D&#91;索引构建]
    D --> E&#91;存储优化]
    E --> F&#91;查询接口]</code></pre>



<p><strong>核心技术要素</strong>：</p>



<ol start="1"><li><strong>索引算法</strong>：</li></ol>



<ul><li>树状结构：ANNOY</li><li>图结构：HNSW</li><li>量化方法：PQ(Product Quantization)</li></ul>



<ol start="2"><li><strong>性能对比</strong>： 数据库类型 查询速度 内存占用 精度 FAISS 10ms 低 高 Milvus 15ms 中 极高 Pinecone 20ms 高 极高</li><li><strong>关键技术</strong>：</li></ol>



<ul><li>混合检索（向量+标量）</li><li>动态更新（增量索引）</li><li>分布式架构</li></ul>



<p></p>



<h3>提示工程（Prompt Engineering）</h3>



<p><strong>核心价值</strong>：构建人机交互的语义桥梁，释放LLM最大潜能</p>



<p><strong>方法论体系</strong>：</p>



<ol start="1"><li><strong>核心范式</strong>：</li></ol>



<ul><li>Zero-shot提示</li><li>Few-shot提示</li><li>Chain-of-Thought</li></ul>



<ol start="2"><li><strong>设计模式</strong>：</li></ol>



<pre class="wp-block-code"><code>   # 结构化提示模板
   prompt_template = """
   &#91;系统指令] 你是一个资深金融分析师
   &#91;背景知识] 当前市场处于牛市阶段
   &#91;输入数据] {user_input}
   &#91;输出要求] 用Markdown格式输出分析报告
   """</code></pre>



<ol start="3"><li><strong>优化技术</strong>：</li></ol>



<ul><li>自动提示生成（AutoPrompt）</li><li>梯度引导优化（ProGen）</li><li>多模态提示设计</li></ul>



<ol start="4"><li><strong>评估指标</strong>：</li></ol>



<ul><li>任务完成度（0-1）</li><li>输出相关性（BLEU/ROUGE）</li><li>事实准确性（FactScore）</li></ul>



<p></p>



<h3>系统集成</h3>



<p><strong>典型架构</strong>：</p>



<pre class="wp-block-code"><code>sequenceDiagram
    用户->>前端: 输入查询
    前端->>API网关: 转发请求
    API网关->>LLM: 生成初步响应
    LLM->>向量数据库: 检索相关知识
    向量数据库-->>LLM: 返回相关文档
    LLM->>提示引擎: 优化输出格式
    提示引擎-->>用户: 返回最终响应</code></pre>



<p><strong>性能优化点</strong>：</p>



<ol><li>端到端延迟控制（&lt;2s）</li><li>缓存策略（请求/响应缓存）</li><li>负载均衡（模型并行/流水线并行）</li></ol>



<p></p>



<h3>典型应用场景</h3>



<ol start="1"><li><strong>智能客服系统</strong>：</li></ol>



<ul><li>意图识别（Embedding）</li><li>知识检索（向量数据库）</li><li>对话生成（LLM+Prompt）</li></ul>



<ol start="2"><li><strong>企业知识库</strong>：</li></ol>



<ul><li>文档向量化（Embedding）</li><li>语义搜索（向量数据库）</li><li>摘要生成（LLM）</li></ul>



<ol start="3"><li><strong>推荐系统</strong>：</li></ol>



<ul><li>用户画像嵌入</li><li>内容相似度匹配</li><li>个性化生成</li></ul>



<p>这四个核心环节构成了现代AI应用的基石，实际开发中需要根据具体场景进行深度优化和定制。例如在医疗领域，可能需要使用领域专用的BioBERT模型，配合医学知识图谱的向量化存储，并通过严谨的提示工程确保输出的专业性。技术选型时需要平衡计算资源、响应延迟和准确率等关键指标，最终构建出高效可靠的AI应用系统。</p>
<p><a rel="nofollow" href="https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/">如何开发一个AI应用</a>最先出现在<a rel="nofollow" href="https://wangqianhong.com">wqh博客</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wangqianhong.com/2024/04/%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aaai%e5%ba%94%e7%94%a8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
