<rss version="2.0">
  <channel>
    <title>Technology Article</title>
    <link>http://neari.cn/technology-article</link>
    <description><![CDATA[]]></description>
    <item>
      <title>Semantic routing</title>
      <link>http://neari.cn/technology-article/semantic-routing</link>
      <description><![CDATA[<p>It sounds like you are working through a highly detailed, practical course on building AI agents using Python and LangChain. The instructor rightly points out that the concepts—especially the interaction between the LLM and local tools—can be quite tricky to wrap your head around at first.</p>
<p>Here is a comprehensive summary of the transcripts, followed by advanced recommendations to take your agent development to the next level.</p>
<hr>
<h3><strong>Course Summary: Building Python Agents with LangChain</strong></h3>
<p>The lectures focus on moving from simple LLM API calls to building autonomous, production-ready AI agents using LangChain.</p>
<h4><strong>1. The Three-Tier Agent Architecture</strong></h4>
<p>To build scalable and maintainable agents, the instructor emphasizes "separation of concerns" through a three-layer architecture:</p>
<ul>
<li><strong>Presentation Layer (Top):</strong> The user interface (CLI, Web UI, Slack/Feishu bot). It should be extremely "thin," handling only input/output translation without any core business logic.</li>
<li><strong>Business Layer (Middle):</strong> The "Brain" of the agent. It handles intent recognition, task planning, and result integration. This is where the ReAct (Reason, Act, Observe) loop lives, orchestrating what to do next based on user prompts.</li>
<li><strong>Capability Layer (Bottom):</strong> The "Hands and Memory." It houses model adapters (abstracting specific LLMs like OpenAI or Qwen), the tool library (calculators, web search, custom functions), and memory modules (vector stores, conversation buffers).</li>
</ul>
<h4><strong>2. How Tool Calling Actually Works</strong></h4>
<p>A major point of confusion addressed in the lesson is the division of labor between the LLM and the Agent:</p>
<ul>
<li><strong>The LLM does NOT execute tools.</strong> Giving an LLM direct access to local execution is a security risk. Instead, the LLM acts as an "advisor."</li>
<li><strong>The Workflow:</strong> 1. The Agent sends the user's prompt alongside a JSON-formatted list of available tools to the LLM.
2. The LLM decides if a tool is needed. If yes, it returns a JSON command dictating which tool to use and with what parameters.
3. The <em>Agent</em> executes the local Python function.
4. The Agent sends the execution result back to the LLM.
5. The LLM formats the final human-readable response.</li>
<li><strong>The <code>@tool</code> Decorator:</strong> LangChain uses this decorator to automatically convert standard Python functions and their docstrings into the JSON schemas that the LLM reads to understand the tool's capabilities.</li>
</ul>
<h4><strong>3. Engineering &amp; Production Best Practices</strong></h4>
<p>The instructor stresses that building a "demo" is easy, but building a production agent requires discipline:</p>
<ul>
<li><strong>Environment Management:</strong> Always use isolated virtual environments (<code>venv</code>, <code>conda</code>) to manage dependencies.</li>
<li><strong>Security:</strong> Never hardcode API keys. Use <code>.env</code> files and the <code>python-dotenv</code> library to load credentials securely.</li>
<li><strong>Observability:</strong> AI agents are "black boxes." Use LangSmith or robust Python logging to trace every step of the ReAct loop, tool calls, and latency.</li>
<li><strong>Exception Handling:</strong> APIs timeout and LLMs hallucinate. Implement retry mechanisms (e.g., the <code>tenacity</code> library) to ensure the agent fails gracefully rather than crashing violently.</li>
<li><strong>Cost Control:</strong> Agent loops can become infinite if the LLM gets confused. Always set a <code>max_iterations</code> limit and monitor token usage to prevent massive API bills.</li>
</ul>
<hr>
<h3><strong>Advanced Advice for Agent Development</strong></h3>
<p>If you have mastered the foundational concepts in these transcripts, here is some advanced advice to elevate your AI engineering:</p>
<h4><strong>1. Transition from LangChain to LangGraph for Complex Workflows</strong></h4>
<p>The ReAct loop (<code>create_agent</code>) is great for simple, linear tasks. However, in real-world enterprise scenarios, you often need loops, conditional branching, and human-in-the-loop approvals. As the instructor briefly mentioned, <strong>LangGraph</strong> (or similar frameworks) allows you to model your agent as a state machine. This gives you deterministic control over complex, multi-step processes where standard LangChain agents might get lost or loop endlessly.</p>
<h4><strong>2. Implement Semantic Routing</strong></h4>
<p>Instead of giving a single agent a massive toolkit (which confuses the LLM and burns tokens), implement a "Router" pattern. Use a lightweight, fast model to classify the user's intent first, and then route the query to a specialized, narrow-focus agent (e.g., a "Database Agent" vs. a "Customer Support Agent").</p>
<h4><strong>3. Fortify Your Tool Schemas</strong></h4>
<p>The instructor noted that the LLM relies entirely on your docstrings to know when to use a tool. To make this foolproof:</p>
<ul>
<li>Use libraries like <strong>Pydantic</strong> to enforce strict input schemas for your tools.</li>
<li>Write tool descriptions from the <em>LLM's perspective</em>, explicitly stating what the tool outputs and <em>when</em> not to use it (e.g., "Use this to get the current time. Do NOT use this to calculate dates.").</li>
</ul>
<h4><strong>4. Build "Guardrails" for Outputs</strong></h4>
<p>Because LLMs are probabilistic, their final output can sometimes ignore the tool's data or hallucinate. Implement output parsers or a secondary "Evaluation Agent" whose sole job is to verify that the final answer directly matches the raw data retrieved by the capability layer.</p>
<hr>
<p>What specific type of agent or use case are you planning to build with these concepts?</p>
]]></description>
      <pubDate>Thu, 30 Apr 2026 14:58:44 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/semantic-routing</guid>
    </item>
    <item>
      <title>Langgraph vs open claw and engineer thinking</title>
      <link>http://neari.cn/technology-article/langgraph-vs-open-claw-and-engineer-thinking</link>
      <description><![CDATA[<p>Here is a comprehensive summary of the voice transcripts you provided, along with key technical and professional advice extracted from the instructor’s lessons.</p>
<h3><strong>Summary of the Transcripts</strong></h3>
<p>The transcripts capture a detailed lecture on building AI agents, contrasting different frameworks, and navigating the evolving role of software engineers in the AI era.</p>
<p><strong>1. Technical Architecture &amp; Agent Building</strong></p>
<ul>
<li><strong>LangChain &amp; Tool Binding:</strong> The instructor demonstrates how to equip an AI agent with external tools (like a clock and a calculator) using LangChain's <code>@tool</code> decorator. The framework parses the Python function's signature and docstrings into a JSON format that the Large Language Model (LLM) uses to decide when and how to invoke the tool.</li>
<li><strong>Memory Management with LangGraph:</strong> To prevent the agent from acting like a "goldfish with a 7-second memory," the instructor introduces LangGraph. By utilizing <code>StateGraph</code> and an <code>in_memory_saver</code> checkpointer, developers can persist conversational context across multiple interactions by passing a <code>thread_id</code>.</li>
<li><strong>Under the Hood:</strong> A key technical takeaway is that a single user prompt requesting a tool actually triggers the LLM at least twice: once to decide which tool to use, and again to synthesize the tool's output into a natural language response.</li>
</ul>
<p><strong>2. Framework Comparison: LangChain vs. Open Cloud</strong></p>
<ul>
<li><strong>LangChain (The "Manual Transmission"):</strong> Described as a box of Lego bricks. It requires writing explicit code to manage state, memory, and routing. It has a steep learning curve but offers limitless flexibility for complex, custom workflows.</li>
<li><strong>Open Cloud (The "Automatic Transmission"):</strong> Represents fully autonomous, managed agents. It features out-of-the-box memory and uses Markdown/YAML files to define skills, making it much faster to prototype but less flexible for deep, customized enterprise integration.</li>
<li><strong>The Verdict:</strong> There is no "best" framework, only the right tool for the specific business scenario.</li>
</ul>
<p><strong>3. The Engineering Mindset in the AI Era</strong></p>
<ul>
<li>The instructor strongly emphasizes that as AI capabilities grow, pure technical coding skills are taking a back seat to "reliability" (靠谱).</li>
<li>Reliability is defined as a combination of <strong>service stability</strong> and <strong>emotional stability</strong>. Dealing with difficult clients, vague requirements, and the frustrations of debugging AI workflows requires developers to filter out their emotions and focus purely on problem-solving.</li>
</ul>
<hr>
<h3><strong>Actionable Advice &amp; Best Practices</strong></h3>
<p>Based on the instructor's warnings and real-world experience, here is the technical and professional advice you should take away from this text:</p>
<ul>
<li><strong>Write Crystal Clear Tool Descriptions:</strong> LLMs rely entirely on your function docstrings to understand what a tool does. If your descriptions are vague or copied-and-pasted incorrectly, the agent will fail to trigger the tool when needed.</li>
<li><strong>Implement Cost Controls:</strong> Autonomous agents can get stuck in infinite thought-action loops. Always set a maximum iteration limit (e.g., 15 steps) when creating an agent to prevent API costs from spiraling out of control.</li>
<li><strong>Beware of Code Execution Security:</strong> The lesson uses Python's <code>eval()</code> function to power a calculator tool for demonstration purposes, but the instructor explicitly warns against this in production. Executing raw strings from an LLM can lead to severe system vulnerabilities; always use secure sandboxes in real-world applications.</li>
<li><strong>Don't Forget the Checkpointer:</strong> When building memory into LangGraph, defining the graph structure isn't enough. You must explicitly pass the checkpointer during compilation and include the <code>thread_id</code> in your configuration, or the memory simply won't work.</li>
<li><strong>Practice "Knowledge-Action Unity" (知行合一):</strong> Reading about AI architectures will only induce anxiety. The instructor advises hand-coding these frameworks without relying heavily on IDE auto-completions to build true muscle memory and confidence.</li>
</ul>
<p>Are you currently trying to build a custom agent yourself, and if so, which of these frameworks (workflow-based vs. fully autonomous) are you leaning toward for your project?</p>
]]></description>
      <pubDate>Thu, 30 Apr 2026 14:45:13 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/langgraph-vs-open-claw-and-engineer-thinking</guid>
    </item>
    <item>
      <title>AI Agent architecture</title>
      <link>http://neari.cn/technology-article/ai-agent-architecture</link>
      <description><![CDATA[<p>This transcript provides a deep dive into the engineering principles behind building robust AI agent systems, transitioning from basic scripts to production-ready architectures. The instructor emphasizes that while AI is evolving rapidly, traditional software engineering rigor remains absolutely critical.</p>
<p>Here is a summary of the core concepts and actionable advice derived from the lesson.</p>
<h3><strong>Key Concepts Summarized</strong></h3>
<ul>
<li><strong>The Three-Layer Agent Architecture:</strong> To build maintainable and scalable agents, the instructor advocates for separating concerns into three distinct layers:
<ul>
<li><strong>Capability Layer (Bottom):</strong> Houses reusable tools, memory modules, and model adapters. It only cares about <em>what</em> it can do, not when to do it.</li>
<li><strong>Business Layer (Middle):</strong> The "brain" or decision center. It handles intent recognition, task planning, and result integration.</li>
<li><strong>Presentation Layer (Top):</strong> Kept as thin as possible, this layer handles user interaction and connects to platforms like WeChat, Slack, or terminal interfaces.</li>
</ul>
</li>
<li><strong>Evolution from Single to Multi-Agent Systems:</strong> * <strong>Single Agents</strong> are great for simple tasks but suffer from "logic breaks" and a lack of depth when handling complex, multi-step goals.
<ul>
<li><strong>Multi-Agent Systems</strong> act like a corporate team. They utilize a "Commander" (to break down tasks), various "Experts" (for specific domains like coding or design), and an "Auditor" (for quality control and compliance) to achieve much higher reliability.</li>
</ul>
</li>
<li><strong>Standardized Communication Protocols:</strong>
<ul>
<li><strong>MCP (Model Context Protocol):</strong> Acts like a universal USB port, allowing agents to standardize how they connect to external tools and databases.</li>
<li><strong>A2A (Agent-to-Agent):</strong> A standardized language that allows agents built on completely different frameworks (e.g., LangChain vs. AutoGen) to communicate and collaborate.</li>
</ul>
</li>
<li><strong>AI-Assisted Code Refactoring:</strong> The instructor warns heavily against letting AI blindly rewrite highly coupled legacy code. It requires a meticulous approach: creating backups, mandating step-by-step AI plans, ensuring comprehensive automated testing, and maintaining strict human review.</li>
</ul>
<hr>
<h3><strong>Strategic Advice for Implementation</strong></h3>
<p>Based on the instructor's philosophy and practical experience, here is the advice you should apply to your own AI projects:</p>
<ul>
<li><strong>Focus on Trends, Not Fads:</strong> The AI landscape moves incredibly fast. Don't waste energy mastering every new application layer tool that pops up. Instead, focus on the underlying architecture and standard protocols (like MCP and A2A), as these foundational elements are less likely to become obsolete quickly.</li>
<li><strong>Prioritize Local Deployment &amp; Privacy:</strong> For enterprise or production use, favor self-hosted frameworks (like the "OpenCloud" example discussed). This ensures your sensitive financial or business data remains secure and complies with corporate data governance.</li>
<li><strong>Always Provide Multiple Solutions:</strong> When presenting technical architectures to stakeholders or management, don't just offer one path. Provide two or three viable options (e.g., highlighting the trade-offs between a single-agent vs. multi-agent approach). This demonstrates strategic thinking and helps guide leadership toward the best choice.</li>
<li><strong>Embrace the "Engineering Mindset":</strong> Stop writing script "spaghetti." Treat AI agent development like traditional software engineering. If you don't build a solid foundation using the three-layer architecture, adding new tools or changing models later will require painful, full-scale rewrites.</li>
</ul>
<p>Given the emphasis on moving from simple single agents to complex multi-agent workflows, what specific use case or business problem are you hoping to solve with an agent architecture?</p>
]]></description>
      <pubDate>Mon, 27 Apr 2026 14:23:21 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ai-agent-architecture</guid>
    </item>
    <item>
      <title>Orchardcore sql Return Documents</title>
      <link>http://neari.cn/technology-article/orchardcore-sql-return-documents</link>
      <description><![CDATA[<p>As an AI and Orchard Core expert, I can spot exactly what is causing this issue. It is a classic gotcha when working with custom SQL Queries and Liquid in Orchard Core.</p>
<p>The discrepancy isn't in your SQL syntax or your Liquid template. The difference lies in a single configuration toggle within the Orchard Core admin UI: the <strong>Return Documents</strong> checkbox.</p>
<h3>Why This Happens</h3>
<p>Even though both SQL queries look nearly identical and query the exact same table (<code>ContentItemIndex</code>), they are configured differently in the dashboard.</p>
<ol>
<li><p><strong><code>RecentTecArticles</code> (Return Documents is ON):</strong> When the <strong>Return Documents</strong> option is checked on a query, Orchard Core takes the <code>DocumentId</code> returned by your SQL query and automatically fetches the full JSON <code>ContentItem</code> from the underlying document database. Because the <code>display_url</code> Liquid filter receives a complete <code>ContentItem</code> object, it can successfully read the <code>AutoroutePart</code> and generate the friendly URL (e.g., <code>/blog-technology-article/...</code>).</p>
</li>
<li><p><strong><code>AllBusinessPlans</code> (Return Documents is OFF):</strong> When the option is unchecked, Orchard Core returns the raw SQL row exactly as it exists in the database. You are passing a flat, dynamic SQL object (representing the columns of <code>ContentItemIndex</code>) to the <code>display_url</code> filter. Since it isn't a true <code>ContentItem</code>, the filter falls back to the default MVC route (<code>/Contents/ContentItems/{ContentItemId}</code>). Because it doesn't know how to extract just the ID from the dynamic object, it simply calls <code>.ToString()</code> on the entire row, resulting in the raw JSON payload being appended to your URL.</p>
</li>
</ol>
<hr>
<h3>How to Fix It (The Easy Way)</h3>
<p>To bring your <code>AllBusinessPlans</code> query in line with your technology articles, you just need to update the query settings:</p>
<ol>
<li>In your Orchard Core Admin Dashboard, go to <strong>Search</strong> -&gt; <strong>Queries</strong>.</li>
<li>Edit the <strong><code>AllBusinessPlans</code></strong> query.</li>
<li>Scroll down below the SQL editor and check the <strong>Return Documents</strong> checkbox.</li>
<li>Save the query.</li>
</ol>
<p>Your Liquid template will immediately start outputting the correct friendly URLs.</p>
<hr>
<h3>Pro-Tip: How to Fix It (The High-Performance Way)</h3>
<p>Checking "Return Documents" is the easiest fix, but it comes with a performance cost: Orchard Core has to deserialize the full JSON document for every row returned. If you are retrieving 50+ items and only need the URL, doing this is highly inefficient.</p>
<p>If you want to keep your application fast, leave <strong>Return Documents unchecked</strong> for both queries and modify your SQL to explicitly fetch the Autoroute path by joining the <code>AutoroutePartIndex</code> table:</p>
<p><strong>Updated SQL Query (<code>AllBusinessPlans</code>):</strong></p>
<pre><code class="language-sql">SELECT A.Path 
FROM ContentItemIndex C
INNER JOIN AutoroutePartIndex A ON C.ContentItemId = A.ContentItemId
WHERE C.ContentType = 'BusinessPlan' AND C.Published = true 
ORDER BY C.DisplayText
</code></pre>
<p><strong>Updated Liquid Template:</strong>
Since your query now returns just the string path rather than an object, you don't need the <code>display_url</code> filter. You can prepend the base URL directly:</p>
<pre><code class="language-liquid">{% assign businessPlans = Queries.AllBusinessPlans | query %}
{% for plan in businessPlans %}
  {{ '"' | append: plan.Path | href }}
{% endfor %}
</code></pre>
<p><em>(Note: Using the <code>href</code> filter or the <code>append_base_url</code> filter ensures it resolves correctly from the root of your domain).</em></p>
]]></description>
      <pubDate>Mon, 27 Apr 2026 14:22:36 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/orchardcore-sql-return-documents</guid>
    </item>
    <item>
      <title>Three Tier Agent Architecture</title>
      <link>http://neari.cn/technology-article/three-tier-agent-architecture</link>
      <description><![CDATA[<p>This transcript captures a detailed and highly practical lecture on building AI agents using the LangChain framework. The instructor emphasizes moving beyond simple API calls to building robust, production-ready systems by understanding the underlying architecture and adopting strict software engineering practices.</p>
<p>Here is a comprehensive summary of the core concepts, followed by actionable advice for your implementation.</p>
<h3><strong>1. The Three-Tier Agent Architecture</strong></h3>
<p>The lecture strongly advocates for a "separation of concerns" using a three-layer architecture to keep the project modular and maintainable:</p>
<ul>
<li><strong>Presentation Layer (Top):</strong> This layer handles user interaction (e.g., CLI, Web UI, Feishu/WeChat bots). It should be kept extremely thin and contain absolutely no business logic so it can be easily swapped out.</li>
<li><strong>Business Layer (Middle):</strong> Acting as the "brain," this layer handles intent recognition, task planning, and result integration. It executes the ReAct (Reason, Act, Observe) loop, often using LangChain's <code>create_agent</code> or LangGraph for complex workflows.</li>
<li><strong>Capability Layer (Bottom):</strong> This is the agent's "toolbox". It houses reusable components like model adapters (e.g., <code>ChatOpenAI</code>), memory storage, and specific tools (e.g., calculators, weather APIs, or custom Python functions wrapped in the <code>@tool</code> decorator).</li>
</ul>
<h3><strong>2. The ReAct Execution Loop</strong></h3>
<p>A major focus of the lesson is clarifying a common misconception: <strong>the LLM does not execute tools itself.</strong></p>
<p>Instead, the process works like this:</p>
<ol>
<li>The agent sends the user's prompt alongside a JSON description of available tools to the LLM.</li>
<li>The LLM acts as an "advisor," deciding if a tool is needed. If it is, the LLM returns a JSON-formatted command specifying which tool to use and with what parameters.</li>
<li>The <em>local agent</em> receives this command, executes the local Python function, and gets the result.</li>
<li>The agent sends the user's original query plus the tool's result back to the LLM so it can synthesize a final, human-readable answer.</li>
</ol>
<h3><strong>3. Production Engineering Best Practices</strong></h3>
<p>The instructor stresses that the difference between a "demo" and a "production agent" lies in basic engineering discipline:</p>
<ul>
<li><strong>Environment Management:</strong> Always use Python virtual environments (<code>venv</code> or <code>conda</code>) to isolate dependencies and prevent version conflicts.</li>
<li><strong>Security:</strong> Never hardcode API keys. Use <code>.env</code> files and libraries like <code>python-dotenv</code> to load environment variables locally.</li>
<li><strong>Observability:</strong> LLMs are "black boxes." Use tools like LangSmith or Python's <code>logging</code> module to track token usage, execution time, and tool invocations.</li>
<li><strong>Exception Handling:</strong> Implement retry mechanisms (e.g., using the <code>tenacity</code> library) to handle API timeouts gracefully instead of crashing the system.</li>
<li><strong>Cost Control:</strong> Prevent infinite loops by setting a <code>max_iterations</code> limit on the agent, monitor token consumption, and route simpler tasks to cheaper models.</li>
</ul>
<hr>
<h3><strong>Expert Advice for Your Implementation</strong></h3>
<p>Based on the transcript's engineering focus, here is my advice as you start building:</p>
<ol>
<li><strong>Write Crystal-Clear Tool Docstrings:</strong> When you use the <code>@tool</code> decorator, LangChain passes your Python docstring directly to the LLM. If your docstring is vague, the LLM won't know when to trigger the tool. Treat your function docstrings as prompt engineering.</li>
<li><strong>Start with the "Happy Path," Then Break It:</strong> Build your agent to handle a perfect user query first. Once that works, intentionally feed it bad inputs or disconnect your internet to test your exception handling and retry logic. An agent that fails elegantly is much better than one that loops endlessly and drains your API budget.</li>
<li><strong>Don't Skip LangSmith:</strong> The instructor highly recommended LangSmith for a reason. Debugging an agent via standard terminal print statements becomes nearly impossible once you have multiple tools and multi-step reasoning. Set up a tracing tool on day one.</li>
<li><strong>Enforce the Thin Presentation Layer:</strong> It is very tempting to put data-formatting logic in your user interface code (like a Discord or Feishu bot script). Resist this. Your bot script should only pass a string to the agent and print the string it gets back.</li>
</ol>
<p>Are you planning to build this agent for a specific use case (like data analysis, customer support, or personal productivity), or are you currently just experimenting with the LangChain framework to learn the ropes?</p>
]]></description>
      <pubDate>Mon, 27 Apr 2026 14:22:28 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/three-tier-agent-architecture</guid>
    </item>
    <item>
      <title>AI+教育讲座会议纪要</title>
      <link>http://neari.cn/technology-article/ai-%E6%95%99%E8%82%B2%E8%AE%B2%E5%BA%A7%E4%BC%9A%E8%AE%AE%E7%BA%AA%E8%A6%81</link>
      <description><![CDATA[<h1>🧾 AI+教育讲座会议纪要</h1>
<h2>一、会议基本信息</h2>
<ul>
<li><p><strong>主题</strong>：AI与教育及行业应用发展</p>
</li>
<li><p><strong>背景</strong>：公司成立16周年活动，回归“技术本身”与行业价值</p>
</li>
<li><p><strong>主讲内容方向</strong>：</p>
<ul>
<li>AI发展阶段</li>
<li>AI与教育结合</li>
<li>开源生态</li>
<li>行业应用趋势</li>
</ul>
</li>
</ul>
<hr>
<h2>二、公司与技术演进背景</h2>
<h3>1. 发展路径</h3>
<ul>
<li>初期：移动互联网（微信生态、SDK）</li>
<li>中期：物联网探索</li>
<li>当前：全面转向AI（2014年开始布局）</li>
</ul>
<h3>2. 技术路线关键点</h3>
<ul>
<li>早期AI：依赖数据分析 + 建模（算力不足）</li>
<li>2019后：以Transformer为核心路线统一</li>
<li>当前：模型能力趋于成熟，进入应用阶段</li>
</ul>
<hr>
<h2>三、核心观点总结</h2>
<h2>（一）AI本质：生产方式变革</h2>
<ul>
<li><p>AI不仅是工具，而是<strong>生产关系重构</strong></p>
</li>
<li><p>改变的是：</p>
<ul>
<li>人与机器的分工</li>
<li>软件开发模式</li>
<li>企业协作方式</li>
</ul>
</li>
</ul>
<p>👉 从“人完成任务” → “AI执行任务，人负责设计”</p>
<hr>
<h2>（二）开源的战略意义</h2>
<h3>核心结论：</h3>
<blockquote>
<p>开源是AI时代的基础协作机制，而非商业模式</p>
</blockquote>
<h3>价值体现：</h3>
<ul>
<li>跨组织协作</li>
<li>高效问题修复（用户直接贡献）</li>
<li>降低研发成本</li>
<li>提升信任机制</li>
</ul>
<p>👉 开源推动了：</p>
<ul>
<li>移动互联网</li>
<li>AI生态爆发</li>
</ul>
<hr>
<h2>（三）AI发展阶段判断</h2>
<h3>当前阶段：从“技术驱动”转向“应用驱动”</h3>
<p>表现：</p>
<ul>
<li><p>行业热度下降（回归理性）</p>
</li>
<li><p>新突破减少（模型趋于稳定）</p>
</li>
<li><p>关注点转向：</p>
<ul>
<li>落地场景</li>
<li>业务价值</li>
</ul>
</li>
</ul>
<p>👉 核心变化：</p>
<ul>
<li>去年：拼模型</li>
<li>今年：拼应用</li>
</ul>
<hr>
<h2>（四）关键技术趋势</h2>
<h3>1. 智能体（Agent）成为主流</h3>
<ul>
<li><p>AI从工具 → 自主执行系统</p>
</li>
<li><p>具备：</p>
<ul>
<li>任务理解</li>
<li>自动执行</li>
<li>持续运行</li>
</ul>
</li>
</ul>
<p>👉 预计：智能体应用将快速爆发</p>
<hr>
<h3>2. 数据整合趋势（全量数据托管）</h3>
<ul>
<li><p>AI不再“按需输入数据”</p>
</li>
<li><p>转为：</p>
<ul>
<li>全量数据预加载</li>
<li>持续理解用户行为</li>
</ul>
</li>
</ul>
<p>👉 AI角色变化：</p>
<ul>
<li>从“响应工具” → “主动助手”</li>
</ul>
<hr>
<h3>3. 应用深化（从80%到5%优化）</h3>
<ul>
<li><p>当前问题：</p>
<ul>
<li>大量重复开发（80%通用能力）</li>
</ul>
</li>
<li><p>未来重点：</p>
<ul>
<li>提升关键5%差异化能力</li>
</ul>
</li>
</ul>
<hr>
<h2>（五）AI在行业中的应用</h2>
<p>重点布局领域：</p>
<ul>
<li>医疗</li>
<li>教育</li>
<li>金融</li>
<li>智能制造</li>
<li>政务</li>
</ul>
<h3>典型能力：</h3>
<ul>
<li>加速实验（时间压缩）</li>
<li>自动分析</li>
<li>实时监控</li>
<li>提升决策效率</li>
</ul>
<hr>
<h2>（六）教育体系的本质与挑战</h2>
<h3>1. 传统教育本质</h3>
<ul>
<li>为“岗位需求”服务</li>
<li>工业化分工产物</li>
</ul>
<hr>
<h3>2. AI带来的冲击</h3>
<h4>（1）岗位结构变化</h4>
<ul>
<li>中间层岗位减少</li>
<li>两极分化明显</li>
</ul>
<h4>（2）技能失效风险</h4>
<ul>
<li>部分专业（如编程基础岗位）快速贬值</li>
<li>企业已减少相关岗位需求</li>
</ul>
<hr>
<h3>3. 教育结构重构</h3>
<p>提出关键区分：</p>
<h4>✔ 教（可被替代）</h4>
<ul>
<li>知识传授</li>
<li>技能训练</li>
</ul>
<h4>✘ 育（不可替代）</h4>
<ul>
<li>情感</li>
<li>价值观</li>
<li>人格培养</li>
</ul>
<hr>
<h3>4. 学习方式变化</h3>
<p>从：</p>
<ul>
<li>学习知识 → 人执行</li>
</ul>
<p>转为：</p>
<ul>
<li>选择知识 → AI执行</li>
</ul>
<hr>
<h2>四、重要结论</h2>
<h3>1. AI改变的核心</h3>
<ul>
<li>从“工具升级” → “社会结构变化”</li>
</ul>
<hr>
<h3>2. 教育必须转型</h3>
<ul>
<li>从“知识传授” → “能力与判断培养”</li>
</ul>
<hr>
<h3>3. 未来核心能力</h3>
<ul>
<li>AI协作能力</li>
<li>信息筛选能力</li>
<li>系统设计能力</li>
</ul>
<hr>
<h3>4. 技术发展方向</h3>
<ul>
<li>开源生态</li>
<li>智能体系统</li>
<li>行业深度应用</li>
</ul>
<hr>
<h2>五、会议建议（提炼）</h2>
<h3>（一）对个人</h3>
<ul>
<li>学习AI协作能力，而非单一技能</li>
<li>提升抽象与决策能力</li>
<li>参与开源生态</li>
</ul>
<hr>
<h3>（二）对教育机构</h3>
<ul>
<li>重构课程体系（减少工具教学）</li>
<li>增加AI实践与应用课程</li>
<li>强化“育人”属性</li>
</ul>
<hr>
<h3>（三）对企业</h3>
<ul>
<li>加快AI落地（而非仅研究模型）</li>
<li>投入智能体方向</li>
<li>利用开源提升研发效率</li>
</ul>
<hr>
<h2>六、一句话总结</h2>
<blockquote>
<p>AI正在从根本上改变“人如何工作、如何学习以及如何被培养”。</p>
</blockquote>
<hr>
]]></description>
      <pubDate>Tue, 21 Apr 2026 13:24:49 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ai-%E6%95%99%E8%82%B2%E8%AE%B2%E5%BA%A7%E4%BC%9A%E8%AE%AE%E7%BA%AA%E8%A6%81</guid>
    </item>
    <item>
      <title>Cleared_Ground</title>
      <link>http://neari.cn/technology-article/cleared_ground</link>
      <description><![CDATA[<p>Here is a detailed breakdown of the music and lyrics for "Cleared Ground," examining how they translate your philosophy of "Purpose-Driven Vibe Coding" into an Appalachian Folk anthem.</p>
<h3><strong>The Musical Composition: "Cleared Ground"</strong></h3>
<p><strong>Genre &amp; Instrumentation:</strong> The song is rooted in the <strong>Appalachian Folk A Cappella</strong> tradition. By intentionally stripping away all physical instruments (no guitars, no banjos, no percussion), the music mirrors your strict adherence to the "First Principle" MVP. Just as your current project has "zero UI" and relies solely on the raw interaction between Postman, a Python API, and a RAG response, the music relies entirely on the raw human voice and the natural acoustics of the room.</p>
<p><strong>Structural Progression:</strong></p>
<ul>
<li><strong>The Solitary Beginning (Verses):</strong> The song opens with a lone, mid-range male tenor singing in a minor key. The vocal delivery is slow, rubato (unstructured tempo), and features a natural "twang" and scooping between notes. This represents the isolation, friction, and "draining" feeling of rote memorization and endless documentation. The heavy reverb highlights the emptiness of learning without building.</li>
<li><strong>The Triumphant Swell (Choruses):</strong> When the chorus hits, the music transitions from a minor to a major key, and a three-part mixed ensemble joins in. This homophonic, thick harmony represents the "closed loop." The rhythm becomes steady and grounded, shifting the vibe from weary isolation to communal triumph and purposeful momentum.</li>
<li><strong>The Fade-Out (Outro):</strong> The song ends by stripping everything back down to a single hum and a resonant drone, reflecting the quiet satisfaction of achieving that bare-bones MVP.</li>
</ul>
<hr>
<h3><strong>Lyrical Analysis: Translating Your Philosophy</strong></h3>
<p>The lyrics serve as an allegory for your transition from passive learning to active, purpose-driven engineering.</p>
<p><strong>Verse 1: The Trap of Exhaustive Documentation</strong></p>
<blockquote>
<p><em>I have walked through the valley where the heavy books lie,</em>
<em>Reading lines from the pages 'til the sun left the sky.</em>
<em>My mind was a garden overgrown with the weeds,</em>
<em>Of a learning so broad that it choked out the seeds.</em></p>
</blockquote>
<ul>
<li><strong>Meaning:</strong> This verse directly addresses the trap of learning too broadly without producing anything. The "heavy books" and "pages" represent the boilerplate documentation that drains your energy. The "weeds" represent the clutter of trying to learn everything (like Coze UIs, WeChat login, Orchard Core) which ultimately suffocates the "seeds" of your actual, immediate product needs.</li>
</ul>
<p><strong>The Chorus: Embracing the MVP</strong></p>
<blockquote>
<p><em>So I’m building a loop where the work finds its home,</em>
<em>Not in scrolls or in writings or a golden-leafed tome.</em>
<em>Stripping the clutter from the path I must tread,</em>
<em>'Til the first simple principle is all that is said.</em></p>
</blockquote>
<ul>
<li><strong>Meaning:</strong> This is your new manifesto. The "loop" is your closed-loop system. Rejecting the "golden-leafed tome" means rejecting the need to know every piece of theory before you start. "Stripping the clutter" is your commitment to pausing the unnecessary UI work and strictly enforcing the "First Principle" MVP.</li>
</ul>
<p><strong>Verse 2: Accepting Engineering Friction</strong></p>
<blockquote>
<p><em>Through the friction and the errors, I will find my way through,</em>
<em>For the roadmap is written in the things that I do.</em>
<em>No facade and no fancy, just the bare-bones intent,</em>
<em>To see where the message and the answer are sent.</em></p>
</blockquote>
<ul>
<li><strong>Meaning:</strong> Here, you accept that roadblocks are unavoidable truths of engineering, not sources of anxiety. "The roadmap is written in the things that I do" weaponizes your motivation—you learn by doing, using AI to extract what you need and immediately applying it. "No facade and no fancy" is your zero-UI rule.</li>
</ul>
<p><strong>The Outro: The Core Objective</strong></p>
<blockquote>
<p><em>Just the message...</em>
<em>And the response.</em></p>
</blockquote>
<ul>
<li><strong>Meaning:</strong> This is the literal embodiment of your immediate goal: making sure Postman can hit your API (the message) and receive the streamed RAG output (the response). It distills your entire engineering effort down to its most vital, tangible interaction.</li>
</ul>
]]></description>
      <pubDate>Sun, 19 Apr 2026 03:14:24 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/cleared_ground</guid>
    </item>
    <item>
      <title>Claude extra usage setting</title>
      <link>http://neari.cn/technology-article/claude-extra-usage-setting</link>
      <description><![CDATA[<p>Here's a clear breakdown of what that "$0.41 / $15.00 spent" means:</p>
<hr>
<h2>What Is "Extra Usage"?</h2>
<p>Your subscription (Pro/Max) includes a <strong>fixed usage budget per 5-hour window</strong>. "Extra usage" is an <strong>opt-in pay-as-you-go overflow system</strong> that kicks in after you exhaust that included budget.</p>
<p>Extra usage is charged separately from your paid Claude subscription and appears as additional charges on your bill.</p>
<p>So: <strong>yes, it is an extra fee on top of your subscription.</strong></p>
<hr>
<h2>Why Does It Show a Spending Cap ($15.00)?</h2>
<p>You can click "Adjust limit" to control costs with a monthly spending cap, or select "Set to unlimited" if you prefer no spending restrictions.</p>
<p>The <code>$15.00</code> is a <strong>cap you (or Anthropic by default) set</strong> to limit how much extra you can be charged per month. The <code>$0.41</code> is how much of that cap you've consumed so far — meaning you went slightly over your plan's included limits and were billed for the overage.</p>
<hr>
<h2>What Rate Is Charged?</h2>
<p>Extra usage is billed at standard API rates. This means token-based pricing — for Sonnet it's $3/MTok input and $15/MTok output. It applies to <strong>both claude.ai conversations and Claude Code terminal usage combined.</strong></p>
<hr>
<h2>Why Does a Paid Subscriber Get Billed Extra?</h2>
<p>Because subscriptions include <strong>usage windows, not unlimited tokens.</strong> Both Pro and Max plans offer usage limits that are shared across Claude and Claude Code, meaning all activity in both tools counts against the same usage limits.</p>
<p>If you hit the limit mid-session and have extra usage enabled, Claude continues working — but bills you at API rates for the overflow.</p>
<hr>
<h2>How to Avoid Extra Usage / Fees</h2>
<p><strong>Option A — Disable it entirely (zero risk of extra charges):</strong>
Go to <strong>Settings → Usage</strong> and disable Extra Usage. Once disabled, you'll only have access to your plan's included usage. Claude will simply stop responding when the limit is hit, until the 5-hour window resets.</p>
<p><strong>Option B — Keep it enabled but control costs:</strong>
Use efficient models like Haiku 4.5 or Sonnet for most tasks. Start new conversations for new topics to minimize context window size. Store frequently referenced documents in project knowledge instead of re-uploading.</p>
<p><strong>Option C — Watch for the API key trap:</strong>
If you have an <code>ANTHROPIC_API_KEY</code> environment variable set on your system, Claude Code will use that API key for authentication instead of your subscription, resulting in API usage charges. This is a common surprise — check <code>echo $ANTHROPIC_API_KEY</code> in your terminal. If it's set, unset it to fall back to your subscription quota.</p>
<hr>
<h2>Summary</h2>
<table>
<thead>
<tr>
<th>Thing</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>$0.41</code></td>
<td>Amount you've been billed in extra usage this month</td>
</tr>
<tr>
<td><code>$15.00</code></td>
<td>Your self-set monthly cap on extra charges</td>
</tr>
<tr>
<td>Extra usage</td>
<td>Opt-in overflow billing at API rates, after plan limits hit</td>
</tr>
<tr>
<td>How to avoid</td>
<td>Disable extra usage in Settings, or unset <code>ANTHROPIC_API_KEY</code></td>
</tr>
</tbody>
</table>
<p>As a solo builder, the safest approach is: <strong>keep extra usage enabled with a low cap ($5–$15)</strong> so Claude Code doesn't cut off mid-task, but you're protected from runaway costs.</p>
]]></description>
      <pubDate>Thu, 16 Apr 2026 00:31:51 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/claude-extra-usage-setting</guid>
    </item>
    <item>
      <title>Sweeping_the_Street</title>
      <link>http://neari.cn/technology-article/sweeping_the_street</link>
      <description><![CDATA[<h1>Sweeping the Street: An Ambient Soundscape for Mindful Work</h1>
<h2>Overview</h2>
<p>"Sweeping the Street" is an immersive, generative ambient soundscape crafted to serve as an auditory anchor for mindful, focused work. Stripping away aggressive rhythms and demanding melodies, the track creates a safe, isolated acoustic environment that encourages the listener to detach from the pressure of outcomes and simply <em>be</em> in the process.</p>
<h2>Sonic Architecture</h2>
<h3>1. The Natural Foundation</h3>
<p>The piece is anchored by high-fidelity field recordings captured in a lush, dense forest. The constant, gentle flow of a nearby stream provides a natural, chaotic, yet soothing white noise that masks distracting environmental sounds. Distant bird song punctuates the air, grounding the listener in the physical world and mirroring the organic, step-by-step nature of simply doing the work.</p>
<h3>2. Synthesized Atmosphere</h3>
<p>Providing the harmonic bed are warm, minimalist analog synthesizer pads. These pads are heavily low-pass filtered with exceptionally long attack and decay times. They swell and recede like deep breaths, devoid of any aggressive high frequencies, ensuring the music remains entirely non-fatiguing over long periods.</p>
<h3>3. Ethereal Melodies</h3>
<p>Sparse, ethereal electric piano notes float above the synthesizer pads. Processed through massive hall reverb and a subtle vintage tape-loop effect, these notes form suspended melodic clusters using Major 7th and Add9 chords. The melodies are cyclical and non-linear, phasing in and out of alignment like light dancing on the surface of the stream. They do not demand attention; instead, they provide a gentle, sparkling texture.</p>
<h3>4. The Guiding Voice</h3>
<p>At the heart of the soundscape is a grounded, dry vocal performance by a female contralto. Her tone is airy yet intimate, delivering spoken-word guidance. Instead of singing traditional melodies, she speaks directly to the listener's center, offering gentle reminders to release tension and focus on the immediate task.</p>
<h2>The Philosophy of the Soundscape</h2>
<p>The structure of the track reflects a meditative journey:</p>
<ul>
<li><strong>The Illusion of the Catch:</strong> The opening movements address the mental trap of desire—the anxiety of <em>catching</em> an outcome. The wide, reverberant spaces encourage the listener to observe these thoughts without attachment.</li>
<li><strong>Step by Step:</strong> As the track progresses, the electric piano takes on a slightly more structured, walking pace. This mirrors the realization that work is just a sequence of present moments. Right time, right thing.</li>
<li><strong>Letting Go:</strong> The climax of the piece is an act of release. The sounds become a mantra of letting go of emotion and desire, fading slowly into the persistent rush of the stream until only the environment remains.</li>
</ul>
<h2>Lyrical Mantra</h2>
<blockquote>
<p>Do not be sad while working.
Watch your mind about the catch,
It's a kind of desire.
It's unhappy if you don't achieve,
Working is only working, just do it,
Step by step.
Right time, do the right thing.</p>
<p>Put down the desire,
Put down the emotion,
Let it go, let it go, let it go.
Relax...</p>
<p>It is simple like walking,
It is simple like sweeping the street,
Do not think about failure,
Do not think about desire,
Only do it in the moment.</p>
<p>Just do it.
Only do it.</p>
</blockquote>
]]></description>
      <pubDate>Wed, 15 Apr 2026 16:02:20 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/sweeping_the_street</guid>
    </item>
    <item>
      <title>Elasticsearch in Crestapps</title>
      <link>http://neari.cn/technology-article/elasticsearch-in-crestapps</link>
      <description><![CDATA[<p>Based on the architecture of both Orchard Core and the CrestApps AI project, there are a few specific reasons why you are encountering a 404 "Page Not Found" error for <code>/Admin/Elasticsearch/Index</code> even when you believe the feature is enabled.</p>
<p>Here is an analysis of why this is happening and how CrestApps implements Elasticsearch.</p>
<h3>1. Why are you getting a 404 on the Elasticsearch Indices page?</h3>
<p>There are three common reasons for this in the Orchard Core / CrestApps ecosystem:</p>
<ul>
<li><strong>You enabled the wrong Elasticsearch feature:</strong> There are actually <em>multiple</em> Elasticsearch features. You likely enabled the <strong>CrestApps AI Elasticsearch</strong> features (e.g., <code>CrestApps.OrchardCore.AI.Documents.Elasticsearch</code>) but did not enable the <strong>Native Orchard Core Elasticsearch</strong> module (<code>OrchardCore.Search.Elasticsearch</code>). The admin UI page you are looking for (<code>/Admin/Elasticsearch/Index</code>) belongs entirely to the native Orchard Core module. CrestApps relies on this native module for UI and connection management.</li>
<li><strong>Missing Elasticsearch Connection Settings:</strong> Even if the native Orchard Core Elasticsearch module is enabled, it will often fail to register its admin routes (resulting in a 404) if it cannot connect to an actual Elasticsearch cluster. You must define your Elasticsearch URL, Port, and Credentials in your <code>appsettings.json</code> or Environment Variables for the module to successfully boot up the admin pages.</li>
<li><strong>Missing Permissions:</strong> Ensure your current user role (even if Administrator) explicitly has the <code>ManageElasticsearchIndices</code> permission granted in <strong>Security &gt; Roles</strong>.</li>
</ul>
<h3>2. Is CrestApps implementing its own Elasticsearch from scratch?</h3>
<p><strong>No. CrestApps does not replace Orchard Core's native Elasticsearch; it extends it specifically for Artificial Intelligence (Vector Search).</strong></p>
<p>Here is exactly how the architecture works based on the CrestApps open-source codebase:</p>
<ol>
<li><p><strong>Standard Text Search (Native Orchard Core):</strong> Orchard Core has built-in Elasticsearch capabilities (<code>OrchardCore.Search.Elasticsearch</code>). This handles traditional keyword-based search for your blog posts, pages, etc. This is what provides the <code>Search &gt; Elasticsearch &gt; Indices</code> menu.</p>
</li>
<li><p><strong>Vector Search &amp; AI (CrestApps):</strong> Standard Elasticsearch in Orchard Core does not understand AI "Embeddings" (high-dimensional math vectors). CrestApps bridges this gap. If you look at the CrestApps source code, it includes specific modules like:</p>
<ul>
<li><code>CrestApps.OrchardCore.AI.Documents.Elasticsearch</code></li>
<li><code>CrestApps.OrchardCore.AI.DataSources.Elasticsearch</code></li>
<li><code>CrestApps.OrchardCore.AI.Memory.Elasticsearch</code></li>
</ul>
<p>Inside these modules, CrestApps implements custom services (like <code>ElasticsearchVectorSearchService.cs</code> and <code>ElasticsearchDataSourceContentManager.cs</code>).</p>
</li>
</ol>
<p><strong>How they work together:</strong>
When you upload your Markdown file, CrestApps intercepts it, chunks the text, converts it into vector embeddings using your AI Provider (like OpenAI), and then uses its <code>ElasticsearchVectorSearchService</code> to inject those mathematical vectors into the indices managed by the native Orchard Core Elasticsearch module.</p>
<h3>How to solve your issue right now:</h3>
<ol>
<li>Go to <strong>Configuration &gt; Features</strong>.</li>
<li>Search exactly for <code>OrchardCore.Search.Elasticsearch</code> (the description will say "Provides Elasticsearch capabilities"). Ensure this is enabled.</li>
<li>Search for <code>CrestApps.OrchardCore.AI.Documents.Elasticsearch</code> and ensure this is enabled as well.</li>
<li>Check your <code>appsettings.json</code> to ensure you have valid Elasticsearch connection strings configured. If the connection fails, Orchard Core suppresses the routing.</li>
<li>Once connected, the <code>Search &gt; Elasticsearch &gt; Indices</code> menu will magically appear, and the <code>/Admin/Elasticsearch/Index</code> route will stop returning a 404. From there, you can create your index and link it to the CrestApps AI settings as we discussed earlier!</li>
</ol>
]]></description>
      <pubDate>Wed, 15 Apr 2026 12:26:51 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/elasticsearch-in-crestapps</guid>
    </item>
    <item>
      <title>AI Profile for</title>
      <link>http://neari.cn/technology-article/ai-profile-for</link>
      <description><![CDATA[<p>In the CrestApps AI ecosystem for Orchard Core, an <strong>AI Profile</strong> is the central blueprint or "brain" configuration that defines exactly how a specific AI assistant should behave, what it knows, and what it is capable of doing.</p>
<p>Because AI requires many moving parts to work effectively—models, prompts, tools, and data—the AI Profile acts as the unifying wrapper that integrates all these functions into a single, reusable entity.</p>
<p>Here is a breakdown of what it is for, its relationships, and how you consume it based on the CrestApps architecture:</p>
<h3>1. What is an AI Profile for?</h3>
<p>An AI Profile's primary purpose is to configure a specific AI persona or agent. Instead of hardcoding AI settings every time you want to use AI, you create a Profile. It dictates:</p>
<ul>
<li><strong>Identity &amp; Behavior:</strong> Through System Prompts, Initial Messages, and generation parameters (Temperature, Top P).</li>
<li><strong>Type of Execution:</strong> Defining if it is a standard Chat, a background Utility, an Agent, or a Prompt Template.</li>
<li><strong>Capabilities:</strong> Determining what the AI is allowed to do.</li>
</ul>
<h3>2. What are its relationships with other components?</h3>
<p>The 4 big tabs you mentioned map perfectly to how the AI Profile acts as a central hub:</p>
<ul>
<li><strong>Deployments (The Engine):</strong> An AI Profile is bound to a specific Deployment (e.g., GPT-4o via Azure, Llama 3 via Ollama). The Profile doesn't care <em>how</em> the model is hosted; it just tells the system, "Use this deployment to generate text."</li>
<li><strong>The Orchestrator (The Manager):</strong> The AI Profile selects an Orchestrator. When a user sends a message, the Orchestrator takes over. It looks at the Profile's tools and documents, decides if the AI needs to use a tool, runs the tool, and loops the results back to the model.</li>
<li><strong>Data Sources &amp; Documents (The Memory):</strong> You can bind Data Sources (like an Azure AI Search index or Elasticsearch) and specific Documents (PDFs, Word docs) to a Profile. When the Orchestrator runs, it uses these to perform Retrieval-Augmented Generation (RAG), giving the AI context it wasn't originally trained on.</li>
<li><strong>Tools &amp; Capabilities (The Hands):</strong> A Profile can be granted access to internal Orchard Core tools (e.g., "List Content Items"), external MCP (Model Context Protocol) tools, or even Agent-to-Agent (A2A) connections to delegate tasks to other AI Profiles.</li>
</ul>
<h3>3. How do you consume or use an AI Profile?</h3>
<p>Once you have configured an AI Profile in the Admin dashboard, there are several ways to actually use it in Orchard Core:</p>
<p><strong>A. Using <code>AIProfilePart</code> on Content Items (As seen in your code snippet):</strong></p>
<pre><code class="language-csharp">public sealed class AIProfilePart : ContentPart
{
    public string ProfileId { get; set; }
    public int? TotalHistory { get; set; }
}
</code></pre>
<p>By attaching the <code>AIProfilePart</code> to any Orchard Core Content Type (e.g., a "Product" or "Landing Page"), you can link that specific piece of content to an AI Profile using the <code>ProfileId</code>. This allows you to easily drop an AI chat widget onto that page, automatically scoped to that Profile's rules and data.</p>
<p><strong>B. Through Chat Interactions:</strong>
In CrestApps, a <strong>Chat Interaction</strong> is the user-facing session. You create a Chat Interaction and map it to an AI Profile. The Interaction handles the UI, the chat history, and the user access permissions, while the AI Profile handles the actual AI logic in the background.</p>
<p><strong>C. Programmatically via Services:</strong>
As a developer, you can consume a profile in your own code using the CrestApps services. You can resolve the <code>IAIProfileManager</code> to fetch a profile by its name, and pass it to the <code>IAICompletionService</code> or <code>IOrchestrator</code> to generate text, summarize data, or extract JSON behind the scenes without any user interface.</p>
<p><strong>D. Workflows and Rules:</strong>
You can use AI Profiles within Orchard Core Workflows (e.g., "When a blog post is published, use the 'SEO Summarizer Profile' to generate a meta description").</p>
]]></description>
      <pubDate>Wed, 15 Apr 2026 06:04:06 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ai-profile-for</guid>
    </item>
    <item>
      <title>Orchestrator AI Execution and Tool Management</title>
      <link>http://neari.cn/technology-article/orchestrator-ai-execution-and-tool-management</link>
      <description><![CDATA[<p>In the context of the CrestApps AI module for Orchard Core, an <strong>Orchestrator</strong> acts as the "brain" or central coordinator for an AI Profile or Chat Interaction.</p>
<p>When the description says, <em>"The orchestrator controls how tools are selected and how the AI execution loop is managed,"</em> it is referring to the core engine that dictates how the AI behaves when trying to answer a user's prompt.</p>
<p>Here is a deeper breakdown of what it is for, how it works, and how you configure it:</p>
<h3>What is the Orchestrator for?</h3>
<p>When a user submits a prompt, the AI rarely just gives a static response if it has access to tools (like a search tool, a database lookup, or an image generator). The Orchestrator is responsible for managing this complex workflow.</p>
<p>Its primary responsibilities include:</p>
<ol>
<li><strong>Managing the AI Execution Loop:</strong> If the AI model decides it needs to use a tool to answer a question, the Orchestrator intercepts that request. It pauses the generation, runs the requested tool, takes the output of the tool, and feeds it back to the AI model. It loops this process until the AI has all the information it needs to construct a final response for the user.</li>
<li><strong>Tool Selection and Context:</strong> The orchestrator determines <em>which</em> tools (from the <code>IToolRegistry</code>) are injected into the prompt's context and makes them available to the Large Language Model (LLM) during that specific session.</li>
<li><strong>Behavioral Strategy:</strong> Different orchestrators can have different strategies. For example, a <code>DefaultOrchestrator</code> might handle standard back-and-forth conversational tool calling, while a specialized orchestrator (like an Agent Orchestrator or Copilot Orchestrator) might follow a more complex chain-of-thought or multi-agent routing strategy.</li>
</ol>
<h3>How to Configure and Use It</h3>
<p>Based on the <code>OrchestratorViewModel</code> and the CrestApps UI patterns, the orchestrator is configured at the <strong>Profile</strong> or <strong>Chat Interaction</strong> level.</p>
<p><strong>1. Configuration in the Admin Dashboard:</strong></p>
<ul>
<li>Navigate to the Orchard Core Admin dashboard and go to your <strong>AI Profiles</strong>, <strong>Chat Interactions</strong>, or <strong>Default Orchestrator Settings</strong>.</li>
<li>When editing a profile or interaction, you will see a setting or dropdown for the <strong>Orchestrator</strong>.</li>
<li>The <code>Orchestrators</code> property in the code (<code>IList&lt;SelectListItem&gt; Orchestrators</code>) populates this dropdown with all the registered orchestrators in your system (e.g., <code>Default</code>, <code>Copilot</code>, etc.).</li>
<li>By assigning the <code>OrchestratorName</code>, you are binding that specific AI Profile to use that orchestrator's logic.</li>
</ul>
<p><strong>2. Usage (Under the Hood):</strong></p>
<ul>
<li>As a user or admin, you don't typically interact with the orchestrator directly during a chat. You simply assign it.</li>
<li>Once assigned, whenever a chat session is initiated under that profile, the CrestApps module looks up the defined <code>OrchestratorName</code>.</li>
<li>It then routes the user's messages through that specific orchestrator's pipeline, ensuring that the selected AI model adheres to the exact tool-calling rules and execution loops defined by it.</li>
</ul>
<p>In short, the Orchestrator is the manager that bridges the gap between the raw LLM, the user's prompt, and the internal Orchard Core tools.</p>
]]></description>
      <pubDate>Wed, 15 Apr 2026 05:37:26 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/orchestrator-ai-execution-and-tool-management</guid>
    </item>
    <item>
      <title>Skill_Linux CLI C# DLL Inspection &amp; Decompilation</title>
      <link>http://neari.cn/technology-article/skill_linux-cli-c-dll-inspection-decompilation</link>
      <description><![CDATA[<h1>Skill: Linux CLI C# DLL Inspection &amp; Decompilation</h1>
<p><strong>Description:</strong> A comprehensive workflow for locating specific C# methods, classes, or strings inside compiled <code>.dll</code> binaries, tracing their origin to specific NuGet packages, and decompiling them into readable C# source code entirely within a Linux terminal environment, bypassing the need for a GUI IDE (like Visual Studio).</p>
<p><strong>Tags:</strong> <code>linux</code>, <code>csharp</code>, <code>dotnet</code>, <code>cli</code>, <code>reverse-engineering</code>, <code>debugging</code>, <code>nuget</code></p>
<hr>
<h2>⚙️ Prerequisites &amp; Environment Setup</h2>
<p>Before executing decompilation workflows, ensure the environment is equipped with the necessary .NET CLI tools. The binary search methods rely on standard POSIX utilities (<code>find</code>, <code>grep</code>, <code>strings</code>) which are pre-installed on virtually all Linux distributions.</p>
<p><strong>Install the CLI Decompiler (<code>ilspycmd</code>):</strong>
Requires the .NET SDK. Install globally using the <code>dotnet</code> toolchain:</p>
<pre><code class="language-bash">dotnet tool install -g ilspycmd
</code></pre>
<p><em>Note: Ensure <code>~/.dotnet/tools</code> is added to the system <code>$PATH</code>.</em></p>
<hr>
<h2>Phase 1: Binary Discovery (Locating the Target DLL)</h2>
<p>When you know a method name (e.g., <code>EnableAutoSetupIfNotUITesting</code>) but do not know which compiled assembly contains it, use standard Linux text-processing tools to query the raw binary files directly. This approach is significantly faster than decompiling every file.</p>
<h3>Primary Approach: <code>grep</code> Binary Forcing</h3>
<p>The fastest method to scan a <code>bin</code> directory. The <code>-a</code> flag forces <code>grep</code> to treat binary files as plain text, while <code>-l</code> ensures only the file paths are returned, preventing terminal corruption from binary output.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">find ./bin -name "*.dll" -exec grep -la "TARGET_METHOD_NAME" {} +
</code></pre>
<ul>
<li><strong><code>find ./bin -name "*.dll"</code></strong>: Recursively locates all compiled assemblies in the current project's output directory.</li>
<li><strong><code>-exec ... {} +</code></strong>: Batches the located files and passes them as arguments to <code>grep</code>.</li>
<li><strong><code>grep -la</code></strong>: Outputs only the file paths (<code>-l</code>) of binaries treated as text (<code>-a</code>) that contain the target string.</li>
</ul>
<h3>Fallback Approach: The <code>strings</code> Utility</h3>
<p>If <code>grep -a</code> fails due to specific binary encoding or unexpected EOF markers, use the <code>strings</code> command. This utility extracts all printable character sequences from a binary file.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">find ./bin -name "*.dll" | while read -r file; do strings "$file" | grep -q "TARGET_METHOD_NAME" &amp;&amp; echo "$file"; done
</code></pre>
<ul>
<li><strong><code>strings "$file"</code></strong>: Extracts readable text from the DLL.</li>
<li><strong><code>grep -q</code></strong>: Runs silently. If a match is found, the loop executes <code>echo "$file"</code> to print the path of the matching assembly.</li>
</ul>
<hr>
<h2>Phase 2: Dependency Tracing (Identifying the NuGet Package)</h2>
<p>Once the specific DLL is identified (e.g., <code>./bin/Debug/net8.0/Lombiq.Tests.UI.AppExtensions.dll</code>), determine exactly how it was introduced into the project.</p>
<h3>Method A: Querying the Project Assets File (Definitive)</h3>
<p>The <code>project.assets.json</code> file acts as a comprehensive dependency graph. Querying this file reveals whether the package is a direct or transitive dependency.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">grep -B 10 "Lombiq.Tests.UI.AppExtensions.dll" obj/project.assets.json
</code></pre>
<ul>
<li><strong><code>-B 10</code></strong>: Prints the 10 lines <em>before</em> the match, exposing the parent JSON node which contains the exact NuGet package name and version (e.g., <code>"Lombiq.Tests.UI.AppExtensions/8.0.0"</code>).</li>
</ul>
<h3>Method B: Querying the Global NuGet Cache</h3>
<p>NuGet extracts downloaded packages into a global cache. Finding the DLL in this cache exposes its origin via the directory structure.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">find ~/.nuget/packages -name "Lombiq.Tests.UI.AppExtensions.dll"
</code></pre>
<ul>
<li><strong>Output Structure:</strong> <code>/home/user/.nuget/packages/{package_name}/{package_version}/lib/...</code></li>
</ul>
<hr>
<h2>Phase 3: Source Code Extraction (Decompilation)</h2>
<p>After locating the correct DLL, use <code>ilspycmd</code> to translate the Intermediate Language (IL) back into human-readable C# source code.</p>
<h3>Option 1: Targeted Context Extraction (Fastest for Reading)</h3>
<p>Decompile the entire DLL into standard output and pipe it directly into <code>grep</code> to extract the specific method and its surrounding context, without creating permanent files.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">ilspycmd /path/to/TargetLibrary.dll | grep -n -A 50 "TARGET_METHOD_NAME"
</code></pre>
<ul>
<li><strong><code>-n</code></strong>: Prints the line number of the source code.</li>
<li><strong><code>-A 50</code></strong>: Prints the 50 lines of code <em>after</em> the match, revealing the method signature and its internal implementation.</li>
<li>Use <code>-B 10</code> in conjunction to see class definitions or attributes located immediately above the method.</li>
</ul>
<h3>Option 2: Full File Decompilation (Best for Deep Inspection)</h3>
<p>Dump the decompiled code into a physical <code>.cs</code> file to navigate it using terminal editors like <code>vim</code>, <code>nano</code>, or <code>less</code>.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash"># Dump the code
ilspycmd /path/to/TargetLibrary.dll &gt; /tmp/decompiled_library.cs

# Open with less and search
less /tmp/decompiled_library.cs
# Type '/' followed by the method name (e.g., /EnableAutoSetupIfNotUITesting) to jump to the code.
</code></pre>
<h3>Option 3: Full Project Decompilation</h3>
<p>If deep architectural inspection is required, <code>ilspycmd</code> can reconstruct an entire <code>.csproj</code> from the compiled binary.</p>
<p><strong>Command:</strong></p>
<pre><code class="language-bash">ilspycmd /path/to/TargetLibrary.dll -p -o /tmp/DecompiledProjectDir
</code></pre>
<ul>
<li><strong><code>-p</code></strong>: Instructs the tool to create a project structure.</li>
<li><strong><code>-o</code></strong>: Specifies the output directory where the <code>.csproj</code> and multiple <code>.cs</code> files will be written.</li>
</ul>
<hr>
<h2>🤖 Agent Execution Flow</h2>
<p>If automating this skill, an agent should follow this deterministic logic tree:</p>
<ol>
<li><strong>Receive Objective:</strong> "Find the implementation of method <code>X</code> in the current project."</li>
<li><strong>Execute Phase 1:</strong> Run the <code>find + grep</code> command on the project's <code>./bin</code> or <code>./obj</code> directories to isolate the target <code>.dll</code>.
<ul>
<li><em>If no <code>.dll</code> is found:</em> Check global NuGet cache (<code>~/.nuget/packages</code>).</li>
</ul>
</li>
<li><strong>Execute Phase 2 (Optional):</strong> If the user needs to know <em>where</em> the code came from, parse <code>obj/project.assets.json</code>.</li>
<li><strong>Execute Phase 3:</strong> Run <code>ilspycmd</code> on the located <code>.dll</code>.
<ul>
<li><em>If <code>ilspycmd</code> is not found:</em> Attempt to install it via <code>dotnet tool install -g ilspycmd</code>.</li>
</ul>
</li>
<li><strong>Output Generation:</strong> Pipe the decompiled source through <code>grep -A</code> to extract the relevant block of code and return it to the context window.</li>
</ol>
]]></description>
      <pubDate>Wed, 15 Apr 2026 03:10:51 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/skill_linux-cli-c-dll-inspection-decompilation</guid>
    </item>
    <item>
      <title>ollama basic consuming</title>
      <link>http://neari.cn/technology-article/ollama-basic-consuming</link>
      <description><![CDATA[<p>Since you already have <code>bge-m3:latest</code> downloaded in Ollama, you can consume it via the REST API or official client libraries. Since your file path (<code>~/Code/DotNest-Core-SDK/...</code>) suggests you are working in a <strong>.NET/C#</strong> environment, I will provide examples for both CLI/Shell and C#.</p>
<h3>1. Test via CLI (cURL)</h3>
<p>The quickest way to verify the model is working is by sending a POST request to Ollama's local endpoint.</p>
<pre><code class="language-bash">curl http://localhost:11434/api/embed -d '{
  "model": "bge-m3",
  "input": "Llamas are members of the camelid family"
}'
</code></pre>
<ul>
<li><strong>Response:</strong> You will receive a JSON object containing a large array of numbers (the vector).</li>
<li><strong>Note:</strong> <code>bge-m3</code> is a high-performance model that supports a sequence length of up to <strong>8192 tokens</strong>, making it great for long documents.</li>
</ul>
<hr>
<h3>2. Consume in .NET (C#)</h3>
<p>Since you are working on the <code>DotNest-Core-SDK</code>, you'll likely want to integrate this programmatically. The most popular library for this is <strong>OllamaSharp</strong>.</p>
<p><strong>Install the package:</strong></p>
<pre><code class="language-bash">dotnet add package OllamaSharp
</code></pre>
<p><strong>Basic Usage:</strong></p>
<pre><code class="language-csharp">using OllamaSharp;

// Initialize the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);

// Set the model you just listed
ollama.SelectedModel = "bge-m3";

// Generate an embedding for a string
var request = new EmbedRequest 
{ 
    Model = "bge-m3", 
    Input = "How do I use embeddings in my SDK?" 
};

var response = await ollama.Embed(request);

// Access the vector
float[] vector = response.Embeddings[0]; 
Console.WriteLine($"Generated vector with {vector.Length} dimensions.");
</code></pre>
<hr>
<h3>3. Usage via Python (Alternative)</h3>
<p>If you are doing data science or preprocessing scripts outside of your SDK:</p>
<p><strong>Install the library:</strong></p>
<pre><code class="language-bash">pip install ollama
</code></pre>
<p><strong>Script:</strong></p>
<pre><code class="language-python">import ollama

response = ollama.embed(
    model='bge-m3',
    input='The sky is blue because of Rayleigh scattering.',
)

print(response['embeddings'])
</code></pre>
<hr>
<h3>Key Technical Details for <code>bge-m3</code></h3>
<ul>
<li><strong>Dimensions:</strong> This model typically outputs vectors with <strong>1024 dimensions</strong>.</li>
<li><strong>Multilingual:</strong> <code>bge-m3</code> stands for <strong>M</strong>ulti-functionality, <strong>M</strong>ulti-linguality, and <strong>M</strong>ulti-granularity. It works exceptionally well for non-English languages.</li>
<li><strong>Context Window:</strong> Unlike standard models (like <code>all-MiniLM-L6-v2</code> which caps at 256 or 512 tokens), <code>bge-m3</code> handles up to <strong>8k tokens</strong>, allowing you to embed entire chapters or long technical docs at once.</li>
</ul>
<p>Are you planning to store these embeddings in a specific vector database (like ChromaDB, Qdrant, or pgvector), or are you performing simple in-memory similarity comparisons?</p>
]]></description>
      <pubDate>Tue, 14 Apr 2026 12:37:02 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ollama-basic-consuming</guid>
    </item>
    <item>
      <title>ollama as openai endpoint</title>
      <link>http://neari.cn/technology-article/ollama-as-openai-endpoint</link>
      <description><![CDATA[<p>Ollama does <strong>not</strong> have a built-in "API Key" authentication system for its local server. By default, it is designed for open local access. However, because Ollama provides an <strong>OpenAI-compatible endpoint</strong>, you can easily put it behind a <strong>Reverse Proxy</strong> (like Nginx) to add an API Key layer.</p>
<p>Here is how to set this up on your Ubuntu machine so other platforms can consume it securely.</p>
<hr>
<h3>Phase 1: Enable Network Access</h3>
<p>By default, Ollama only listens on <code>localhost</code>. To let other platforms connect, you must allow it to listen on your network interface.</p>
<ol>
<li><strong>Edit the Ollama service configuration:</strong>
<pre><code class="language-bash">sudo systemctl edit ollama.service
</code></pre>
</li>
<li><strong>Add these lines</strong> (this opens a blank file or section):
<pre><code class="language-ini">[Service]
Environment="OLLAMA_HOST=0.0.0.0"
</code></pre>
</li>
<li><strong>Reload and Restart:</strong>
<pre><code class="language-bash">sudo systemctl daemon-reload
sudo systemctl restart ollama
</code></pre>
</li>
</ol>
<hr>
<h3>Phase 2: Add API Key Security (Nginx)</h3>
<p>Since Ollama doesn't validate keys, we use Nginx to act as a "bouncer." It will check for a <code>Bearer</code> token before letting the request reach Ollama.</p>
<ol>
<li><strong>Install Nginx:</strong>
<pre><code class="language-bash">sudo apt update &amp;&amp; sudo apt install nginx -y
</code></pre>
</li>
<li><strong>Create a Configuration File:</strong>
Create <code>/etc/nginx/sites-available/ollama-proxy</code>:
<pre><code class="language-nginx">server {
    listen 80; # Or 443 with SSL
    server_name your_ip_or_domain;

    location / {
        # 1. Check for your custom API Key
        if ($http_authorization != "Bearer YOUR_CHOSEN_SECRET_KEY") {
            return 401;
        }

        # 2. Forward request to Ollama
        proxy_pass http://127.0.0.1:11434;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;

        # 3. Necessary for streaming responses
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_buffering off;
        proxy_read_timeout 600s;
    }
}
</code></pre>
</li>
<li><strong>Enable the site and restart Nginx:</strong>
<pre><code class="language-bash">sudo ln -s /etc/nginx/sites-available/ollama-proxy /etc/nginx/sites-enabled/
sudo nginx -t &amp;&amp; sudo systemctl restart nginx
</code></pre>
</li>
</ol>
<hr>
<h3>Phase 3: Consuming it (OpenAI Style)</h3>
<p>Now, any platform (like LangChain, Dify, or a custom SDK) can consume your <code>bge-m3</code> model using the standard OpenAI format.</p>
<h4><strong>Example: cURL</strong></h4>
<pre><code class="language-bash">curl http://&lt;YOUR_SERVER_IP&gt;/v1/embeddings \
  -H "Authorization: Bearer YOUR_CHOSEN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bge-m3",
    "input": "Hello world"
  }'
</code></pre>
<h4><strong>Example: Python (OpenAI SDK)</strong></h4>
<pre><code class="language-python">from openai import OpenAI

client = OpenAI(
    base_url="http://&lt;YOUR_SERVER_IP&gt;/v1",
    api_key="YOUR_CHOSEN_SECRET_KEY" # This is now validated by Nginx!
)

response = client.embeddings.create(
    model="bge-m3",
    input="Testing my secure embedding server"
)
</code></pre>
<h3>Summary Comparison Table</h3>
<table>
<thead>
<tr>
<th style="text-align: left">Feature</th>
<th style="text-align: left">Standard Ollama</th>
<th style="text-align: left">Secured via Proxy (Recommended)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><strong>Endpoint</strong></td>
<td style="text-align: left"><code>http://localhost:11434</code></td>
<td style="text-align: left"><code>http://your-ip-or-domain</code></td>
</tr>
<tr>
<td style="text-align: left"><strong>Auth</strong></td>
<td style="text-align: left">None (Anyone on network can use)</td>
<td style="text-align: left"><strong>Static API Key (Bearer Token)</strong></td>
</tr>
<tr>
<td style="text-align: left"><strong>OpenAI Compatible</strong></td>
<td style="text-align: left">Yes (via <code>/v1</code> path)</td>
<td style="text-align: left">Yes</td>
</tr>
<tr>
<td style="text-align: left"><strong>Security</strong></td>
<td style="text-align: left">Low</td>
<td style="text-align: left">High (Hidden behind Proxy/Firewall)</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>Pro Tip:</strong> For production, you should also set up <strong>SSL (HTTPS)</strong> using Let's Encrypt (<code>certbot</code>) so your API Key isn't sent in plain text over the network.</p>
</blockquote>
<p>Are you planning to expose this over the public internet, or just to other servers within your local private network?</p>
]]></description>
      <pubDate>Tue, 14 Apr 2026 12:36:31 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ollama-as-openai-endpoint</guid>
    </item>
    <item>
      <title>The_Glory_Hour</title>
      <link>http://neari.cn/technology-article/the_glory_hour</link>
      <description><![CDATA[<h1>The Glory Hour: A Complete Guide to Meditation and Dhamma Practice</h1>
<h2>1. The Transition: Leaving the Worldly Behind</h2>
<p>The transition from the chaotic energy of daily work to the serene state of meditation requires a conscious severing of ties with your external responsibilities. As the soothing rhythms and the resonant frequencies of the singing bowls (音钵) begin to echo, they act as a sonic boundary. When you step across this boundary, you are no longer an employee, a manager, or a worker. You drop the heavy plow of your daily tasks and silence the mind's dusty gears. This is not a break to think about work; this is pure meditation.</p>
<h2>2. The Acoustic Environment: The Singing Bowl</h2>
<p>The singing bowl serves as an anchor for your wandering mind. Its sustained, pure tones cut through the mental chatter, providing a focal point. As the reverberations slowly fade into silence, they invite your mind to follow the sound into a state of deep stillness. Let the sound wash over you, clearing the emotional residue and the analytical overdrive of your brain.</p>
<h2>3. The Core Practice: Anapanasati (Mindfulness of Breathing)</h2>
<p>To practice Dhamma is to observe reality as it is, starting with the very breath that sustains you.</p>
<ul>
<li><strong>Begin with the Breath:</strong> Focus entirely on the sensation of breathing. <em>Breathe in. Breathe out.</em> * <strong>Cultivate Energy:</strong> With every conscious inhalation, imagine drawing in pure, focused energy. With every exhalation, release fatigue, stress, and worldly concerns.</li>
<li><strong>Empower the Mind:</strong> Meditation is not simply relaxation; it is the active cultivation of mental power. By repeatedly bringing your attention back to the breath, you build concentration (Samadhi), making your mind sharper, more resilient, and deeply powerful.</li>
</ul>
<h2>4. The Economics of Life: Time vs. Energy</h2>
<p>One of the highest teachings of this practice is the realization of the true value of your resources.</p>
<ul>
<li><strong>Do Not Waste Energy:</strong> Focus your life force on meaningful pursuits. Conserve your energy rather than letting it leak into unmeaningful arguments, anxieties, or trivialities.</li>
<li><strong>The Trap of Distraction:</strong> Do not waste precious hours watching mindless videos or scrolling through endless feeds. These activities drain your mental reserves and fracture your attention span.</li>
<li><strong>Time is Ultimate Wealth:</strong> Society teaches that time is money, but the truth is that time is <em>more</em> important than money. You can always earn another coin, but you can never earn back a wasted hour. Guard your time fiercely. Invest it in your spiritual and mental growth.</li>
</ul>
<hr>
<h2>5. Meditative Reflection: The Lyrics</h2>
<p>Use these lyrics as a focal point for your contemplative practice before entering total silence. Read them slowly, allowing the meaning to settle into your consciousness.</p>
<p><em>Lay down the heavy plow and the mind’s dusty gears,</em>
<em>(Dusty gears)</em>
<em>Still the buzzing worry that has lingered through the years.</em>
<em>(Through the years)</em>
<em>Leave the paper mountains in the valley below,</em>
<em>(Valley below)</em>
<em>Where the thinking stops and the quiet starts to grow.</em></p>
<p><em>Time is a silver coin you can spend or let stay,</em>
<em>Time is a silver coin you can spend or let stay,</em>
<em>Don't you trade your silver for the shadows on the wall,</em>
<em>Don't you trade your silver for the shadows on the wall,</em>
<em>Time is more than money, it's the greatest wealth of all.</em></p>
<p><em>Pull the breath-stream inward from the hollow of your chest,</em>
<em>Pull the breath-stream inward from the hollow of your chest,</em>
<em>Feel the fire rising, leave the hollow for the height,</em>
<em>Feel the fire rising, leave the hollow for the height,</em>
<em>Filling up the spirit with a steady, mountain light.</em></p>
<p><em>Turn away your eyes from the flickering and vain,</em>
<em>Turn away your eyes from the flickering and vain,</em>
<em>Losing energy like water pouring in the rain.</em>
<em>Losing energy like water pouring in the rain.</em></p>
<p><em>Breath out the heavy work, let the thoughts float away,</em>
<em>(Float away)</em>
<em>Keep the silver coin for the glory-hour today.</em>
<em>(Hour today)</em>
<em>Breathe in the quiet.</em>
<em>(In the quiet)</em></p>
]]></description>
      <pubDate>Tue, 14 Apr 2026 12:15:02 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/the_glory_hour</guid>
    </item>
    <item>
      <title>Gemini as Gem skill agent</title>
      <link>http://neari.cn/technology-article/gemini-as-gem-skill-agent</link>
      <description><![CDATA[<p>Configuring "skills" in Gemini can mean two things: setting up your own <strong>Gems</strong> (custom agents) or providing technical <strong>documentation files</strong> so Gemini understands Orchard Core’s specific architecture.</p>
<p>Since you are using <strong>Gemini Online</strong> (the web app) and want to use "skill files," here is the best way to do it in 2026.</p>
<h3>1. The "Gem" Method (Creating a Dedicated Agent)</h3>
<p>If you want a persistent Orchard Core expert, the best way is to create a <strong>Gem</strong>. This allows you to "upload" the skills once so you don't have to re-explain them in every new chat.</p>
<ul>
<li><strong>Step 1:</strong> In the Gemini sidebar, click on <strong>Gems</strong> (or "Create a Gem").</li>
<li><strong>Step 2: Give it a Role.</strong> Name it "Orchard Core Expert."</li>
<li><strong>Step 3: Upload Skills (Knowledge).</strong> Look for the <strong>"+" icon</strong> or <strong>"Upload" button</strong> within the Gem builder. Upload your Orchard Core skill files (Markdown, PDFs, or code snippets).</li>
<li><strong>Step 4: Instructions.</strong> In the instruction box, tell the Gem:
<blockquote>
<p>"You are an expert in Orchard Core. Use the uploaded files as your primary 'Skills' library. When I ask questions, refer to these specific patterns and configurations first."</p>
</blockquote>
</li>
</ul>
<h3>2. The "Direct Upload" Method (For quick sessions)</h3>
<p>If you don't want to build a full Gem, you can upload files directly into your current chat.</p>
<ul>
<li>Click the <strong>"+" plus icon</strong> in the prompt bar.</li>
<li>Select <strong>"Upload files"</strong> and pick your Orchard Core skill files (e.g., <code>OrchardCore-API-Skills.md</code>).</li>
<li><strong>The Prompt:</strong> Once uploaded, type:
<blockquote>
<p>"Read these files. They contain specific skills and patterns for Orchard Core. I want you to act as an agent that uses these rules for all future replies in this thread."</p>
</blockquote>
</li>
</ul>
<hr>
<h3>Tips for "Orchard Core" Skill Files</h3>
<p>To make Gemini understand Orchard Core effectively, ensure your skill files follow this structure:</p>
<table>
<thead>
<tr>
<th style="text-align: left">File Type</th>
<th style="text-align: left">What to include</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><strong>Manifests</strong></td>
<td style="text-align: left">Your custom <code>Module.txt</code> or <code>Project.props</code> patterns.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Liquid/Templates</strong></td>
<td style="text-align: left">Common Liquid tags or shapes you use in your theme.</td>
</tr>
<tr>
<td style="text-align: left"><strong>C# Services</strong></td>
<td style="text-align: left">How you implement <code>IDisplayDriver</code> or <code>IDataMigration</code>.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Logic Rules</strong></td>
<td style="text-align: left">Specific business logic or "skills" (e.g., "Always use Content Item Display Manager for rendering").</td>
</tr>
</tbody>
</table>
<h3>Common Correction</h3>
<p>Be careful with the term "Skills." In Google's developer ecosystem, "Agent Skills" often refers to a directory-based configuration (like <code>SKILL.md</code>) used with the <strong>Gemini CLI</strong>. Since you are using <strong>Gemini Online</strong>, you are essentially using <strong>"Knowledge Files."</strong> If your files are in the <code>.md</code> (Markdown) format, Gemini will read them perfectly. Just make sure the first line of the file clearly states its purpose, for example: <code>--- Skill: Orchard Core Custom Routing ---</code>.</p>
<p><strong>Would you like me to help you draft the specific instructions for your Orchard Core agent?</strong></p>
]]></description>
      <pubDate>Tue, 14 Apr 2026 03:25:04 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/gemini-as-gem-skill-agent</guid>
    </item>
    <item>
      <title>RAG 评估指标（部分）</title>
      <link>http://neari.cn/technology-article/rag-%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87-%E9%83%A8%E5%88%86</link>
      <description><![CDATA[<p>这份文稿详细讲解了评估 AI RAG（检索增强生成）系统的五个核心指标，主要将评估分为了<strong>检索阶段</strong>和<strong>响应（生成）阶段</strong>。</p>
<p>以下是全文的核心内容总结：</p>
<h3>一、 检索阶段评估指标（关注检索的内容好不好）</h3>
<p>在这个阶段，主要评估检索器找出的“上下文”质量，核心看三个指标：</p>
<ul>
<li><strong>1. 上下文相关性 (Context Relevance)</strong>
<ul>
<li><strong>比较对象</strong>：检索出的上下文 vs 用户输入的问题。</li>
<li><strong>核心含义</strong>：看检索出来的文档片段，跟用户提的问题到底沾不沾边。</li>
<li><strong>特点</strong>：它只是一个基础指标，单纯通过特定算法打分看两者是否相关，相对而言不如“精度”和“召回率”重要。</li>
</ul>
</li>
<li><strong>2. 上下文精度 (Context Precision)</strong>
<ul>
<li><strong>比较对象</strong>：检索出的上下文 vs 参考答案。</li>
<li><strong>核心含义</strong>：看检索得**“准不准”**（命中率）。</li>
<li><strong>特点</strong>：不仅评估检索到的内容中包含了多少参考答案的相关信息，还要看这些<strong>相关信息是否排在靠前的位置</strong>。排名越靠前、越准确，精度得分越高。</li>
</ul>
</li>
<li><strong>3. 上下文召回率 (Context Recall)</strong>
<ul>
<li><strong>比较对象</strong>：检索出的上下文 vs 参考答案。</li>
<li><strong>核心含义</strong>：看检索得**“全不全”**。</li>
<li><strong>特点</strong>：看参考答案中包含的“全部关键信息（知识点）”，有多少被成功检索到了。如果你只检索到了部分关键信息，漏掉了其他的，召回率就会偏低。</li>
</ul>
</li>
</ul>
<h3>二、 响应/生成阶段评估指标（关注大模型回答得好不好）</h3>
<p>在这个阶段，主要评估大模型基于检索内容生成的“最终答案”质量，核心看两个指标：</p>
<ul>
<li><strong>4. 忠实度 (Faithfulness)</strong>
<ul>
<li><strong>比较对象</strong>：生成的答案 vs 检索出的上下文。</li>
<li><strong>核心含义</strong>：看大模型**“有没有胡编乱造（幻觉）”**。</li>
<li><strong>特点</strong>：大模型的回答必须老老实实基于提供的上下文。如果上下文里只有 A 和 B，大模型为了凑字数自己编造了 C 和 D，这种行为就会导致忠实度得分极低。</li>
</ul>
</li>
<li><strong>5. 答案相关性 (Answer Relevance)</strong>
<ul>
<li><strong>比较对象</strong>：生成的答案 vs 用户输入的问题。</li>
<li><strong>核心含义</strong>：看大模型**“有没有答非所问”**。</li>
<li><strong>特点</strong>：只关注答案是不是在针对性地回应用户的问题，而<strong>不考虑答案在客观事实上是否绝对正确</strong>。只要它正面回答了问题（没扯东扯西），相关性就高。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>一句话核心提炼：</strong>
RAG 评估就是看它找资料时找得<strong>沾不沾边（上下文相关性）</strong>、<strong>准不准（精度）</strong>、<strong>全不全（召回率）</strong>；并且在回答时看它<strong>老不老实（忠实度）<strong>以及</strong>有没有答非所问（答案相关性）</strong>。</p>
]]></description>
      <pubDate>Mon, 13 Apr 2026 14:10:19 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/rag-%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87-%E9%83%A8%E5%88%86</guid>
    </item>
    <item>
      <title>ragas修改</title>
      <link>http://neari.cn/technology-article/ragas%E4%BF%AE%E6%94%B9</link>
      <description><![CDATA[<p>这份文稿是上一部分内容的延续，主要从<strong>代码实战应用</strong>、<strong>综合评分标准</strong>以及<strong>系统优化策略</strong>三个维度，深入讲解了如何将 RAG 评估落地并在发现问题后进行调优。</p>
<p>以下是核心内容的详细总结：</p>
<h3>一、 评估框架 (Ragas) 的实战应用</h3>
<p>在实际代码中，使用 Ragas 框架进行评估通常遵循一套固定的“套路”：</p>
<ol>
<li><strong>准备数据</strong>：针对实际项目（如金融助手），通常只需要准备**“用户问题”<strong>和对应的</strong>“参考答案”<strong>。将问题输入给你的 RAG 系统，系统会自动生成</strong>“检索的上下文”<strong>和</strong>“最终回答”**。</li>
<li><strong>构建数据集</strong>：将上述四个要素（问题、参考答案、上下文、最终回答）组合成 Ragas 框架要求的数据集格式 (Dataset)。</li>
<li><strong>配置与执行</strong>：导入所需的大模型 (LLM) 和嵌入模型 (Embedding)，配置需要评估的指标，执行评估操作。</li>
<li><strong>结果输出</strong>：将评估结果转换为 Pandas 数据表，并导出为 CSV 文件，方便直观地对比各项指标的得分。</li>
</ol>
<h3>二、 综合评估：F1 分数与行业参考标准</h3>
<p>在实际应用中，很难同时达到完美的“高召回率”和“高精度”，通常的妥协状态是**“高召回率 + 中等精度”**（宁可多找点废话，也不能漏掉关键信息）。</p>
<p>为了综合比较不同模型或不同时期的检索效果，引入了 <strong>F1 分数</strong>：</p>
<ul>
<li><strong>作用</strong>：它是精度 (Precision) 和召回率 (Recall) 的调和平均值，用于在精度和召回率出现一高一低时，给出一个综合评判标准，直观判断哪种方案总体更优。</li>
</ul>
<p><strong>行业常规的指标参考线（经验值）：</strong>
| 评估指标 | 优秀标准 | 及格/中等标准 | 较差标准 |
| :--- | :--- | :--- | :--- |
| <strong>上下文召回率 (Recall)</strong> | <strong>≥ 0.9</strong> (医疗/法律等严谨领域需极高) | - | - |
| <strong>上下文精度 (Precision)</strong> | <strong>≥ 0.8</strong> | 0.5 - 0.8 | &lt; 0.5 |
| <strong>忠实度 (Faithfulness)</strong> | <strong>≥ 0.9</strong> (不能有幻觉) | - | - |
| <strong>答案相关性 (Relevance)</strong> | <strong>≥ 0.9</strong> (不能答非所问) | - | - |</p>
<h3>三、 指标偏低的原因及“对症下药”优化策略</h3>
<p>如果评估跑出来的分数不理想，需要根据具体指标去反推问题所在：</p>
<h4>1. 检索阶段问题（针对上下文）</h4>
<ul>
<li><strong>召回率低（找不全）</strong>：
<ul>
<li><strong>原因</strong>：知识库本身缺失该信息、嵌入(Embedding)模型能力不足、检索策略设置返回的文档数量过少。</li>
<li><strong>优化</strong>：扩充/更新知识库、更换更高维度的嵌入模型、采用多路召回策略。</li>
</ul>
</li>
<li><strong>精度低（找得不准、噪声大）</strong>：
<ul>
<li><strong>原因</strong>：相似度阈值设置太低（召回了太多无关文档）、文档分块(Chunking)过大或过小、索引构建不合理。</li>
<li><strong>优化</strong>：优化分块策略、使用重排序 (Rerank) 技术、调整检索相似度阈值。</li>
</ul>
</li>
</ul>
<h4>2. 生成阶段问题（针对最终答案）</h4>
<ul>
<li><strong>忠实度低（胡编乱造）</strong>：
<ul>
<li><strong>原因</strong>：检索到的上下文太长导致关键信息被稀释（大模型抓不住重点）、提示词(Prompt)约束力不够。</li>
<li><strong>优化</strong>：在 Prompt 中加强约束（“严格基于以下上下文回答”）、精简和提炼送给大模型的上下文。</li>
</ul>
</li>
<li><strong>答案相关性低（答非所问）</strong>：
<ul>
<li><strong>原因</strong>：大模型没有理解用户的真实意图，特别是面对复杂多步的问题。</li>
<li><strong>优化</strong>：增加问题意图识别环节、对复杂问题进行改写 (Query Rewriting) 或拆解后再进行检索和回答。</li>
</ul>
</li>
</ul>
<h3>四、 核心答疑 (Q&amp;A) 精华总结</h3>
<ul>
<li><strong>上下文与文档块的关系</strong>：它们本质是同一个东西。上下文就是由检索器找出来的、与问题相关的多个“文档块”组合而成的。</li>
<li><strong>评估的时机</strong>：通常在应用构建完成后进行系统性评估；但在开发阶段也可以对单个小模块（如单纯测检索）进行边做边测。</li>
<li><strong>数据更新与重新评估</strong>：知识库动态更新后，不需要全部推翻重来，只需对新增的数据进行定期抽样评估即可；如果发现某个环节（如分块策略）有严重问题，才需要推翻该环节重新构建索引。</li>
</ul>
]]></description>
      <pubDate>Mon, 13 Apr 2026 14:10:12 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/ragas%E4%BF%AE%E6%94%B9</guid>
    </item>
    <item>
      <title>Breathe_Out_The_Day</title>
      <link>http://neari.cn/technology-article/breathe_out_the_day</link>
      <description><![CDATA[<h1>Breathe Out The Day: Meditative Ambient Soundscape</h1>
<h2>🌿 The Intention</h2>
<p>Designed specifically for the crucial transition between a high-stress workday and a peaceful evening, this soundscape serves as a sonic bridge to relaxation. It gently guides the mind away from professional pressures, racing thoughts, and the tension of the day, bringing the focus back to the present moment and the steady rhythm of your breath.</p>
<h2>🎵 Sound Design &amp; Atmosphere</h2>
<p>The composition is built upon a foundation of high-fidelity environmental recordings. The dry, crisp rustle of forest leaves and the continuous, soothing flow of a gentle stream create a wide-spectrum "white noise" floor that immediately grounds the listener.</p>
<p>Layered above this natural sanctuary are warm, minimalist analog synthesizer pads that swell with long, billowy attacks. Ethereal electric piano notes play suspended chords that echo into a massive hall reverb, creating a profound sense of cavernous depth and safety.</p>
<p>Crucially, the track is completely beatless and un-metered. The absence of drums or rhythmic percussion ensures a non-linear, fluid harmonic surface that deliberately prevents the brain from latching onto a predictable pattern, naturally coaxing it out of analytical thinking.</p>
<h2>🌬️ The Journey</h2>
<ul>
<li><strong>Grounding:</strong> The journey begins in the heart of a lush forest. The water sounds act as an anchor for your attention.</li>
<li><strong>Breathing:</strong> As the warm synths bloom, a distant, velvety female vocal provides gentle guidance, mimicking a sigh of relief.</li>
<li><strong>Letting Go:</strong> The texture slowly thins out over time. The ethereal notes drift further apart, and the vocal fragments encourage you to surrender the day's weight, eventually fading back into the pure, uninterrupted sounds of the forest stream.</li>
</ul>
<h2>🎼 Lyrics</h2>
<p><em>Let it go...</em>
<em>Let the tension leave your mind.</em>
<em>(Let it go)</em>
<em>In the stillness, peace you'll find.</em>
<em>(Let it go)</em></p>
<p><em>Flowing like the silver stream,</em>
<em>Drifting through a waking dream.</em>
<em>Breathe in the light, breathe out the day,</em>
<em>Watch the heavy shadows fade away.</em>
<em>(Fade away...)</em></p>
<p><em>No more pressure, no more noise.</em>
<em>Rediscover inner poise.</em>
<em>Let it go...</em>
<em>Let it go...</em>
<em>Let it go...</em></p>
]]></description>
      <pubDate>Mon, 13 Apr 2026 10:51:43 GMT</pubDate>
      <guid isPermaLink="true">http://neari.cn/technology-article/breathe_out_the_day</guid>
    </item>
  </channel>
</rss>