[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"portal-settings:stajic:zh":3,"public-menus:all":38,"post:ollama-is-not-the-product-building-production-ready-open-llm-applications:zh":221,"related:post:ollama-is-not-the-product-building-production-ready-open-llm-applications:zh:1":1200},{"statusCode":4,"data":5,"message":37},200,{"tenantId":6,"lang":7,"defaultLang":8,"siteUrl":9,"contactEmail":10,"brandName":11,"logoUrl":12,"siteName":11,"siteDescription":13,"ogImage":10,"robotsIndex":14,"socialLinks":10,"reservedSlugs":10,"seoPolicy":15},"stajic","zh","de","https:\u002F\u002Fstajic.de",null,"Stajic Platform","\u002FLogo_Planet.svg","Stajic Portal",true,{"branding":16,"relatedContent":17,"crossDomainLinks":18},{"logoUrl":12},{"enabled":14},[19,22,25,28,31,34],{"url":20,"label":21,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Ffigure.rocks","figure.rocks",{"url":23,"label":24,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Floving.rocks","loving.rocks",{"url":26,"label":27,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.com","bazify.com",{"url":29,"label":30,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.de","bazify.de",{"url":32,"label":33,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.at","bazify.at",{"url":35,"label":36,"isActive":14,"showInFooter":14,"includeInSameAs":14},"https:\u002F\u002Fbazify.ba","bazify.ba","Portal settings resolved",[39,45],{"id":40,"name":41,"location":42,"isActive":14,"isDefault":43,"items":44},1,"main-navigation","header",false,[],{"id":46,"name":47,"location":48,"isActive":14,"isDefault":14,"items":49},4,"main-menu","sidebar",[50,66,79,93,103,118,133],{"id":51,"title":52,"url":60,"target":61,"icon":62,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":64,"portfolioId":10,"children":65},"item-18",{"de":53,"en":54,"es":55,"fr":56,"it":54,"ru":57,"sr":58,"zh":59},"Startseite","Home","Inicio","Accueil","Главная","Почетна","首页","\u002Ffull-stack-web-developer-munich-performance-seo-and-maintainable-builds","_self","i-lucide-home","page",111,[],{"id":67,"title":68,"url":75,"target":61,"icon":76,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":77,"portfolioId":10,"children":78},"item-22",{"de":69,"en":69,"es":70,"fr":69,"it":71,"ru":72,"sr":73,"zh":74},"Vision","Visión","Visione","Видение","Визија","想象","\u002Fueber-uns-webdesign-muenchen-webaplikation","i-lucide-eye",113,[],{"id":80,"title":81,"url":89,"target":61,"icon":90,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":91,"portfolioId":10,"children":92},"item-19",{"de":82,"en":83,"es":84,"fr":83,"it":85,"ru":86,"sr":87,"zh":88},"Leistungen","Services","Servicios","Servizi","Услуги","Услуге","服务","\u002Fservices-dienstleistungen-muenchen","i-lucide-wrench",116,[],{"id":94,"title":95,"url":99,"target":61,"icon":100,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":101,"portfolioId":10,"children":102},"item-23",{"de":96,"en":96,"es":96,"fr":96,"it":96,"ru":97,"sr":97,"zh":98},"Blog","Блог","博客","\u002Fblog","i-lucide-book-open",112,[],{"id":104,"title":105,"url":114,"target":61,"icon":115,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":116,"portfolioId":10,"children":117},"item-32",{"de":106,"en":107,"es":108,"fr":109,"it":110,"ru":111,"sr":112,"zh":113},"Neue Technologien","New Technologies","Nuevas tecnologías","Nouvelles technologies","Nuove tecnologie","Новые технологии","Нове технологије","新技术！","\u002Fneue-webtechnologien","i-lucide-sparkles",122,[],{"id":119,"title":120,"url":129,"target":61,"icon":130,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":131,"portfolioId":10,"children":132},"item-20",{"de":121,"en":122,"es":123,"fr":124,"it":125,"ru":126,"sr":127,"zh":128},"Kontakt","Contact us!","Contacto","Contact","Contatto","Контакт","Контактирајте нас","联系我们！","\u002Fcontact","i-lucide-mail",115,[],{"id":134,"title":135,"url":144,"target":61,"icon":145,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":146,"portfolioId":10,"children":147},"item-21",{"de":136,"en":137,"es":138,"fr":139,"it":140,"ru":141,"sr":142,"zh":143},"Unsere Arbeit","Our Work","Nuestro trabajo","Nos réalisations","I nostri lavori","Наши работы","Наши радови","文件夹","\u002Fportfolio","i-lucide-briefcase",114,[148,161,175,191,206],{"id":149,"title":150,"url":144,"target":61,"icon":159,"isActive":14,"type":63,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":146,"portfolioId":10,"children":160},"item-24",{"de":151,"en":152,"es":153,"fr":154,"it":155,"ru":156,"sr":157,"zh":158},"Alle Projekte","All Projects","Todos los proyectos","Tous les projets","Tutti i progetti","Все проекты","Сви пројекти","所有项目","i-lucide-grid-3x3",[],{"id":162,"title":163,"url":171,"target":61,"icon":172,"isActive":14,"type":173,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":10,"children":174},"item-29",{"de":164,"en":165,"es":166,"fr":167,"it":168,"ru":169,"sr":170,"zh":143},"Local Roots, Global Reach","Local Roots - Global Reach","Empresa local ","Entreprise locale","Azienda locale","Местная компания","Локално предузеће глобално тржиште","\u002Fportfolio\u002Flocal-roots-global-reach-communication-media-systems-for-modern-business","i-lucide-globe-2","custom",[],{"id":176,"title":177,"url":186,"target":61,"icon":187,"isActive":14,"type":188,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":189,"children":190},"menu-2916d060-8681-482a-af9a-c107a8bc30d8",{"de":178,"en":179,"es":180,"fr":181,"it":182,"ru":183,"sr":184,"zh":185},"Von Rohdaten zu verifizierbarem KI-Kontext: Eine praktische Architektur für agentenbereite Informationen","From Raw Data to Verifiable AI Context:","De datos sin procesar a contexto de IA verificable: una arquitectura práctica para información lista para agentes","Des données brutes au contexte d'IA vérifiable : une architecture pratique pour des informations prêtes pour les agents","Dai dati grezzi a un contesto IA verificabile: Un'architettura pratica per informazioni pronte per gli agenti","От необработанных данных к верифицируемому контексту ИИ: практическая архитектура информации, готовой для агентов","Od sirovih podataka do proverljivog AI konteksta: Praktična arhitektura za informacije spremne za agente","从原始数据到可验证的 AI 上下文：面向智能体就绪信息的实用架构","\u002Fportfolio\u002Ffrom-raw-data-to-verifiable-ai-context-a-practical-architecture-for-agent-ready-information","i-lucide-database","portfolio",22,[],{"id":192,"title":193,"url":202,"target":61,"icon":203,"isActive":14,"type":188,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":204,"children":205},"menu-e2061cd7-ff53-49d5-a0e8-3d49090577c0",{"de":194,"en":195,"es":196,"fr":197,"it":198,"ru":199,"sr":200,"zh":201},"Präsenzplattformen — Unternehmenskommunikation","Presence Platforms — Enterprise Communication","Plataformas de presencia — Comunicación empresarial","Plateformes de présence — Communication d'entreprise","Presence Platforms — Comunicazione aziendale","Платформы присутствия — Корпоративные коммуникации","Presence platforme — Poslovna komunikacija","Presence 平台 — 企业通信","\u002Fportfolio\u002Fpresence-platforms-enterprise-communication-that-wins-without-competing","i-lucide-badge-percent",21,[],{"id":207,"title":208,"url":217,"target":61,"icon":218,"isActive":14,"type":188,"productId":10,"categoryId":10,"shopCategoryId":10,"articleId":10,"pageId":10,"portfolioId":219,"children":220},"menu-a781582e-e90d-418e-b8c9-b070bc37c37e",{"de":209,"en":210,"es":211,"fr":212,"it":213,"ru":214,"sr":215,"zh":216},"Maximierung des POS-ROI durch Konsistenz","Maximizing POS ROI Through Consistent","Maximizar el ROI del POS a través de constante","Maximiser le ROI du PDV grâce à la cohérence","Massimizzare il ROI del POS attraverso costante","Максимизация ROI POS за счет последовательного","Maksimizacija POS ROI-ja kroz dosledno","通过持续最大化 POS 投资回报率","\u002Fportfolio\u002Ffrom-vision-to-value-maximizing-pos-roi-through-consistent-ci-creation-and-strategic-branding","i-lucide-briefcase-business",11,[],{"statusCode":4,"data":222,"message":1199},{"id":223,"title":224,"slug":225,"content":226,"contentJson":227,"excerpt":626,"featuredImage":627,"featuredImageAlt":628,"featuredImageCaption":10,"featuredImageTitle":10,"featuredImageCopyright":10,"featuredImageAuthor":10,"featuredImageSourceUrl":10,"featuredImageLicense":10,"featuredImageIsAiGenerated":43,"status":629,"publishedAt":630,"createdAt":631,"updatedAt":632,"seoLocalePaths":633,"categories":642,"author":663,"translations":668},"459","Ollama 并非产品：构建可投入生产的开源大语言模型应用","ollama-is-not-the-product-building-production-ready-open-llm-applications","\u003Ch1>Ollama 不是产品：构建生产级开源大语言模型应用\u003C\u002Fh1>\n\u003Cp>像 \u003Cb>Ollama\u003C\u002Fb> 这样的工具让本地大语言模型实验几乎毫无摩擦。安装运行时，拉取模型，发送提示，几秒钟内本地助手就会回答。这很有用。但这也是整个旅程中最容易的部分。\u003C\u002Fp>\n\u003Cp>终端演示不是应用。本地模型不是产品。一个高效的开源大语言模型应用需要受控的数据摄取、检索、权限、评估、日志记录、提供商抽象、部署纪律，以及解决实际业务问题的用户工作流。\u003C\u002Fp>\n\u003Cp>核心论点很简单：\u003Cb>Ollama 是运行时，不是产品\u003C\u002Fb>。产品存在于模型周围的应用层。该层决定了哪些文档可见、哪些块被检索、使用哪些提示、如何评估答案、如何记录失败，以及系统在日常工作中是否值得信赖。\u003C\u002Fp>\n\u003Cp>这就是本地 AI 对于构建私人助手、内部知识工具、基于大语言模型的 SaaS 功能或企业工作流副驾驶的团队变得有趣的地方。模型可以在本地运行，但隐私、可靠性和商业价值只有在整个系统被正确设计时才存在。\u003C\u002Fp>\n\u003Ch2>Ollama 是运行时，不是产品\u003C\u002Fh2>\n\u003Cp>Ollama 在本地运行和服务开源模型方面表现出色。它尤其擅长探索、开发者工作流、概念验证，以及希望在不立即承诺使用云提供商的情况下测试模型行为的团队。它通过 API 和兼容层暴露本地模型交互，使得连接现有的 OpenAI 风格工具更加容易。\u003C\u002Fp>\n\u003Cp>这并不意味着 Ollama 解决了应用问题。它不会自动知道用户可能阅读哪些公司文档。它不会创建租户隔离、文档版本控制、审计追踪、来源归属、评估数据集或特定于业务的 UI 工作流。这些责任仍然属于应用架构。\u003C\u002Fp>\n\u003Cul>\u003Cli>\u003Cb>Ollama 帮助解决：\u003C\u002Fb>本地模型执行、快速实验、基于 API 的模型访问、离线优先的概念验证以及开发者生产力。\u003C\u002Fli>\u003Cli>\u003Cb>Ollama 本身不解决：\u003C\u002Fb>访问控制、RAG 质量、文档生命周期、租户边界、评估、审计日志、监控、回退行为或企业工作流设计。\u003C\u002Fli>\u003Cli>\u003Cb>架构错误：\u003C\u002Fb>将本地推理视为已经是安全的 AI 产品。\u003C\u002Fli>\u003C\u002Ful>\n\u003Cblockquote class=\"border-l-4 border-gray-300 pl-4 italic\">模型是最容易的部分。应用层才是产品价值所在。\u003Ccite class=\"block mt-2 text-sm\">— 架构原则\u003C\u002Fcite>\u003C\u002Fblockquote>\n\u003Ch2>演示、概念验证和生产是不同的阶段\u003C\u002Fh2>\n\u003Cp>许多开源大语言模型项目失败，是因为团队将可用的演示与生产能力混淆。区别并非表面上的。每个成熟度级别都有不同的目标、不同的风险概况和不同的工程要求。\u003C\u002Fp>\n\u003Ctable class=\"w-full border-collapse\">\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">阶段\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">证明什么\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">典型设置\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">仍然缺少什么\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">演示\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">模型可以在本地回答提示。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">笔记本电脑上的 Ollama，一个模型，一个提示，没有真正的数据控制。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">权限、检索、日志、评估、部署、监控、用户工作流。\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">概念验证\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">一个小型受控系统可以回答关于选定文档或工作流的问题。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">基本 Web UI、摄取脚本、向量搜索、有限用户、有限文档范围。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">规模、治理、测试数据集、回退策略、可审计性、支持模型。\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">生产\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">多个用户可以在实际工作中安全且重复地使用系统。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">经过身份验证的应用、租户隔离、RAG 管道、可观测性、提供商抽象、备份、发布流程。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">持续改进、评估扩展、运营成熟度。\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftable>\n\u003Cp>概念验证可以有意识地小规模。生产不能有意识地盲目。一旦真实用户、私有数据、业务决策和合规期望进入系统，架构必须变得明确。\u003C\u002Fp>\n\u003Ch2>RAG 的定位\u003C\u002Fh2>\n\u003Cp>\u003Cb>检索增强生成\u003C\u002Fb>是连接语言模型与私有业务知识最常见的桥梁。模型不会神奇地知道内部文档、合同、工单、产品规格或运行手册。应用必须在要求模型回答之前检索相关上下文。\u003C\u002Fp>\n\u003Cp>一个实际的 RAG 流程如下所示：\u003C\u002Fp>\n\u003Col>\u003Cli>文档从受控源上传或同步。\u003C\u002Fli>\u003Cli>文本被提取、清理并分割成块。\u003C\u002Fli>\u003Cli>块接收元数据，如租户、所有者、文档版本、来源 URL、访问范围和时间戳。\u003C\u002Fli>\u003Cli>为每个块生成嵌入。\u003C\u002Fli>\u003Cli>向量存储在 pgvector、Qdrant 或其他检索层中。\u003C\u002Fli>\u003Cli>查询时，应用在检索前检查权限。\u003C\u002Fli>\u003Cli>通过相似性搜索和元数据过滤器检索相关块。\u003C\u002Fli>\u003Cli>提示构建器将选定的上下文注入模型请求。\u003C\u002Fli>\u003Cli>生成带有引用、置信度边界以及在检索较弱时无答案回退的答案。\u003C\u002Fli>\u003C\u002Fol>\n\u003Cp>RAG可以减少幻觉，但无法完全消除。糟糕的分块策略、薄弱的元数据、缺失的权限过滤器、低质量的嵌入或过于宽泛的检索，仍然可能产生令人信服但错误的答案。严肃的RAG系统需要阈值、引用、检索日志和评估。\u003C\u002Fp>\n\u003Ch2>实用的本地开源大语言模型架构\u003C\u002Fh2>\n\u003Cp>一条现实的生产路径并不需要特殊的基础设施。对于许多团队来说，一个强大的初始架构可以使用常规的Web栈：Nuxt作为前端，Nitro或Node API作为后端，PostgreSQL作为记录系统，pgvector用于检索，Ollama作为本地运行时，Prisma用于数据访问，以及后台工作进程用于数据摄取和嵌入。\u003C\u002Fp>\n\u003Cpre class=\"code-block\">\u003Ccode>用户问题 | v\n前端界面 | v\nAPI \u002F 后端 | +--&gt; 身份验证 +--&gt; 租户和角色权限检查 | v\n检索层 | +--&gt; PostgreSQL元数据 +--&gt; pgvector或Qdrant向量搜索 +--&gt; 相似度阈值 | v\n提示构建器 | +--&gt; 系统提示 +--&gt; 检索到的文本块 +--&gt; 来源引用 +--&gt; 无答案规则 | v\n大语言模型提供者抽象层 | +--&gt; Ollama \u002F 本地模型 +--&gt; 云端模型备用 +--&gt; 未来自托管运行时 | v\n带来源的答案 | v\n日志、追踪、指标、评估数据集\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>这种架构保持了模型的可替换性。Ollama可以作为第一个运行时，但系统不应锁定在单一推理引擎上。清晰的架构将用户工作流、检索、提示构建、模型提供者和可观测性分离开来。\u003C\u002Fp>\n\u003Cul>\u003Cli>\u003Cb>前端：\u003C\u002Fb>Nuxt或其他Web界面，用于经过身份验证的用户工作流。\u003C\u002Fli>\u003Cli>\u003Cb>后端\u002FAPI：\u003C\u002Fb>Nitro、Node.js或FastAPI，用于编排、权限和提供者路由。\u003C\u002Fli>\u003Cli>\u003Cb>数据库：\u003C\u002Fb>PostgreSQL，用于文档、用户、租户、角色、提示、日志和元数据。\u003C\u002Fli>\u003Cli>\u003Cb>向量搜索：\u003C\u002Fb>pgvector用于简单的集成检索，或当向量搜索成为专用服务时使用Qdrant。\u003C\u002Fli>\u003Cli>\u003Cb>模型运行时：\u003C\u002Fb>Ollama用于本地执行，llama.cpp服务器用于轻量级服务，或vLLM用于更高吞吐量的GPU服务。\u003C\u002Fli>\u003Cli>\u003Cb>存储：\u003C\u002Fb>本地文件系统或兼容S3的对象存储，用于上传的文件和提取的工件。\u003C\u002Fli>\u003Cli>\u003Cb>工作进程：\u003C\u002Fb>后台数据摄取、分块、嵌入、重新索引和文档版本处理。\u003C\u002Fli>\u003Cli>\u003Cb>可观测性：\u003C\u002Fb>日志、指标、提示追踪、检索追踪、延迟跟踪和评估结果。\u003C\u002Fli>\u003C\u002Ful>\n\u003Ch2>生产就绪检查清单\u003C\u002Fh2>\n\u003Cp>以下检查清单是本地模型演示与可用开源大语言模型应用之间的区别：\u003C\u002Fp>\n\u003Cul>\u003Cli>每个文档和文本块都有tenant_id。\u003C\u002Fli>\u003Cli>在检查用户和角色权限之前，检索被阻止。\u003C\u002Fli>\u003Cli>文档包含元数据、来源、所有者、版本、生命周期状态和保留策略。\u003C\u002Fli>\u003Cli>分块策略已记录并针对真实文档进行了测试。\u003C\u002Fli>\u003Cli>嵌入模型的选择是明确的并且有版本控制。\u003C\u002Fli>\u003Cli>向量索引配置是可重现的。\u003C\u002Fli>\u003Cli>相似度阈值防止弱上下文被盲目使用。\u003C\u002Fli>\u003Cli>答案尽可能包含来源引用或来源参考。\u003C\u002Fli>\u003Cli>当检索置信度过低时，使用无答案回退。\u003C\u002Fli>\u003Cli>提示模板有版本控制并受发布管理。\u003C\u002Fli>\u003Cli>从一开始就构建大语言模型提供者抽象层。\u003C\u002Fli>\u003Cli>结构化输出在下游使用之前经过验证。\u003C\u002Fli>\u003Cli>评估数据集包含真实问题、预期来源和不可接受的答案。\u003C\u002Fli>\u003Cli>检索日志显示每个答案使用了哪些文本块。\u003C\u002Fli>\u003Cli>监控延迟、令牌使用量、GPU\u002FCPU负载和错误率。\u003C\u002Fli>\u003Cli>隐私和保留规则涵盖上传、提取的文本、文本块、嵌入、提示、响应和日志。\u003C\u002Fli>\u003Cli>部署、备份、恢复、回滚和事件处理路径已记录。\u003C\u002Fli>\u003C\u002Ful>\n\u003Cp>这与\u003Ca href=\"\u002Fzh\u002Fenterprise\">企业交付操作系统\u003C\u002Fa>直接相关：有用的人工智能不仅仅是模型决策。它关乎交付纪律、证据、控制、指标和运营所有权。\u003C\u002Fp>\n\u003Ch2>提供者抽象：不要绑定单一模型\u003C\u002Fh2>\n\u003Cp>本地模型对于隐私敏感用例、离线场景、成本控制和内部实验非常有价值。云端模型在复杂推理、编码、多语言准确性或多模态任务方面可能仍然更强。生产应用不应将任何单一模型视为永久基础设施。\u003C\u002Fp>\n\u003Cp>提供者抽象允许相同的应用工作流调用Ollama、OpenAI、Gemini、Anthropic、Mistral、vLLM或其他自托管端点，而无需重写产品。应用根据用例、数据敏感性、延迟、成本和质量要求来决定提供者。\u003C\u002Fp>\n\u003Cpre class=\"code-block\">\u003Ccode>type LlmProvider = &quot;ollama&quot; | &quot;openai&quot; | &quot;gemini&quot; | &quot;anthropic&quot; | &quot;vllm&quot;; type ChatInput = { provider: LlmProvider; model: string; tenantId: string; userId: string; question: string; context: Array&lt;{ chunkId: string; sourceTitle: string; text: string; }&gt;;\n}; async function chat(input: ChatInput) { await assertUserCanAccessContext(input.userId, input.context); const messages = buildRagMessages({ question: input.question, context: input.context, rules: [ &quot;Answer only from provided context when possible.&quot;, &quot;Cite source titles.&quot;, &quot;Say when the context is insufficient.&quot; ] }); return llm.chat({ provider: input.provider, model: input.model, messages, trace: { tenantId: input.tenantId, userId: input.userId, promptVersion: &quot;rag-v3.2&quot; } });\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>关键思想不是TypeScript语法。关键思想是边界。应用拥有权限、检索、提示规则、追踪和评估。提供者只产生模型输出。\u003C\u002Fp>\n\u003Ch2>pgvector vs Qdrant\u003C\u002Fh2>\n\u003Cp>对于许多开源大语言模型应用来说，向量存储的决策在开始时很简单：如果PostgreSQL已经是你的记录系统，\u003Cb>pgvector\u003C\u002Fb>是一个很好的起点。它将元数据、权限、文档记录和向量紧密地结合在一起。这降低了操作复杂性。\u003C\u002Fp>\n\u003Cp>\u003Cb>Qdrant\u003C\u002Fb>在向量搜索需要成为专用服务时变得更有吸引力：更大的检索规模、高级过滤、专门的索引、混合搜索模式或检索基础设施的独立扩展。\u003C\u002Fp>\n\u003Ctable class=\"w-full border-collapse\">\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">选项\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">最佳适用场景\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">优势\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">权衡\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">pgvector\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">概念验证、早期生产、已基于PostgreSQL构建的系统。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">单一数据库、SQL连接、ACID行为、更简单的运维、元数据与向量紧密关联。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">在大规模检索场景下不如专用向量数据库专业。\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">Qdrant\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">专用语义搜索服务、更大规模的向量工作负载、高级过滤与检索模式。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">专为向量搜索设计、强大的过滤模型、独立扩展、面向检索的API。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">增加了额外的基础设施组件和运维面。\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd class=\"border border-gray-300 px-4 py-2\">从简单开始\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">大多数企业团队从私有RAG应用起步。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">架构风险较低、交付更快、审计路径更简单。\u003C\u002Ftd>\u003Ctd class=\"border border-gray-300 px-4 py-2\">如果检索成为核心且规模扩大，后续可能需要迁移。\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftable>\n\u003Cp>一个实用的原则：当PostgreSQL已经承载了你的业务数据且检索规模适中时，从pgvector开始。当向量搜索本身成为产品能力时，迁移到Qdrant。\u003C\u002Fp>\n\u003Ch2>安全与隐私的现实考量\u003C\u002Fh2>\n\u003Cp>本地推理并不自动意味着安全的AI。它只意味着模型执行可以在本地进行。完整的数据路径仍然重要：上传的文件、提取的文本、分块、嵌入、日志、提示、响应、备份、开发者访问、管理工具和分析导出。\u003C\u002Fp>\n\u003Cp>嵌入向量也需要谨慎对待。它们不是原始文档，但仍然表示从敏感内容中派生出的信息。将它们视为受保护数据路径的一部分，特别是当它们与元数据、源记录、用户查询或租户标识符关联时。\u003C\u002Fp>\n\u003Cul>\u003Cli>在访问规则明确之前，不要索引文档。\u003C\u002Fli>\u003Cli>在没有租户和角色过滤器的情况下，不要检索分块。\u003C\u002Fli>\u003Cli>在没有保留规则的情况下，不要记录完整的提示和响应。\u003C\u002Fli>\u003Cli>除非策略允许，否则不要将敏感上下文发送到云端模型。\u003C\u002Fli>\u003Cli>不要假设本地等于符合GDPR；合规性取决于完整的处理设计。\u003C\u002Fli>\u003Cli>不要让评估和调试副本成为不受控制的影子数据集。\u003C\u002Fli>\u003C\u002Ful>\n\u003Cp>这就是\u003Ca href=\"\u002Fzh\u002Fblog\u002Fenterprise-grade-multi-tenant-architecture-for-an-international-platform\">多实例SaaS架构\u003C\u002Fa>重要的地方。如果租户、角色、数据所有权和运营边界薄弱，添加本地LLM可能会放大风险而非降低风险。\u003C\u002Fp>\n\u003Ch2>评估不是可选项\u003C\u002Fh2>\n\u003Cp>一个生产级的Open-LLM应用需要一个评估循环。没有它，团队只能依赖轶事。几个好的演示答案并不能证明检索有效、提示稳定，或者模型在实际使用中行为安全。\u003C\u002Fp>\n\u003Cp>一个最小的评估数据集应包括真实的用户问题、预期的源文档、不可接受的答案、无答案的情况，以及针对先前失败的回归测试。每次对分块、嵌入、提示、模型提供商或检索阈值的更改，都应针对该数据集进行测试。\u003C\u002Fp>\n\u003Cul>\u003Cli>\u003Cb>检索评估：\u003C\u002Fb>系统是否获取了正确的源分块？\u003C\u002Fli>\u003Cli>\u003Cb>答案评估：\u003C\u002Fb>答案是否基于检索到的上下文？\u003C\u002Fli>\u003Cli>\u003Cb>安全评估：\u003C\u002Fb>系统是否避免了禁止的披露或未经授权的数据访问？\u003C\u002Fli>\u003Cli>\u003Cb>运营评估：\u003C\u002Fb>延迟、失败率和成本是否保持在可接受范围内？\u003C\u002Fli>\u003Cli>\u003Cb>回归评估：\u003C\u002Fb>模型或提示升级是否破坏了之前正确的行为？\u003C\u002Fli>\u003C\u002Ful>\n\u003Cp>RAG减少了幻觉，但并未消除评估的必要性。评估是将聪明的原型转变为不断改进产品的控制循环。\u003C\u002Fp>\n\u003Ch2>部署纪律：模型即发布事件\u003C\u002Fh2>\n\u003Cp>更换模型不是无害的配置调整。它可能改变答案风格、推理行为、语言质量、延迟、令牌使用、引用纪律和故障模式。在生产环境中，模型升级应像发布事件一样处理。\u003C\u002Fp>\n\u003Cp>这意味着要对提示、嵌入模型、检索设置、模型标识符、提供商路由和评估结果进行版本控制。同时也要有回滚逻辑。如果新模型导致基于检索的答案变差或结构化输出中断，系统需要一条可控的路径回到已知良好的配置。\u003C\u002Fp>\n\u003Cp>这符合\u003Ca href=\"\u002Fzh\u002Fenterprise\u002Freference-models\u002Fdelivery-and-change\">交付与变更\u003C\u002Fa>和\u003Ca href=\"\u002Fzh\u002Fenterprise\u002Freference-models\u002Fdigital-platform\">AI就绪平台架构\u003C\u002Fa>相同的运营逻辑：稳定的交付需要可重复的控制，而非英雄式的手动修复。\u003C\u002Fp>\n\u003Ch2>结论：生产始于演示结束之处\u003C\u002Fh2>\n\u003Cp>Ollama可以开启旅程。它使本地模型执行变得可访问，并降低了实验的门槛。这很有价值。但生产应用始于演示结束之处。\u003C\u002Fp>\n\u003Cp>模型只是一个可替换的组件。真正的产品是围绕它的受控系统：摄取、权限、检索、提示、提供商路由、评估、日志、监控、部署、备份和用户工作流。这就是隐私变得真实、质量变得可衡量、商业价值变得可重复的地方。\u003C\u002Fp>\n\u003Cp>一个严肃的开放LLM应用是通过工程纪律构建的，而不是通过运行一次本地模型。Ollama可以启动旅程，但生产应用从演示结束的地方开始。\u003C\u002Fp>\n\u003Cp>主题：\u003C\u002Fp>\n\u003Cp>Ollama, 开放LLM, RAG, pgvector, Qdrant, 本地AI, LLMOps, 提供商抽象, 企业AI架构\u003C\u002Fp>",{"time":228,"blocks":229,"version":625},1782679750701,[230,235,241,246,251,256,262,267,272,283,291,296,301,327,332,337,342,347,364,369,374,379,385,390,404,409,414,437,442,447,452,457,462,467,472,477,482,507,512,517,522,527,539,544,549,554,559,570,575,580,585,590,595,600,605,610,615,620],{"id":231,"data":232,"type":42,"tunes":234},"HsB_-_Sdzh",{"text":233,"level":40},"Ollama 不是产品：构建生产级开源大语言模型应用",{},{"id":236,"data":237,"type":239,"tunes":240},"G_FTnJiMVo",{"text":238},"像 \u003Cb>Ollama\u003C\u002Fb> 这样的工具让本地大语言模型实验几乎毫无摩擦。安装运行时，拉取模型，发送提示，几秒钟内本地助手就会回答。这很有用。但这也是整个旅程中最容易的部分。","paragraph",{},{"id":242,"data":243,"type":239,"tunes":245},"fVa1sJxmy6",{"text":244},"终端演示不是应用。本地模型不是产品。一个高效的开源大语言模型应用需要受控的数据摄取、检索、权限、评估、日志记录、提供商抽象、部署纪律，以及解决实际业务问题的用户工作流。",{},{"id":247,"data":248,"type":239,"tunes":250},"f6EzZPNhRc",{"text":249},"核心论点很简单：\u003Cb>Ollama 是运行时，不是产品\u003C\u002Fb>。产品存在于模型周围的应用层。该层决定了哪些文档可见、哪些块被检索、使用哪些提示、如何评估答案、如何记录失败，以及系统在日常工作中是否值得信赖。",{},{"id":252,"data":253,"type":239,"tunes":255},"wjgsXAJQ-i",{"text":254},"这就是本地 AI 对于构建私人助手、内部知识工具、基于大语言模型的 SaaS 功能或企业工作流副驾驶的团队变得有趣的地方。模型可以在本地运行，但隐私、可靠性和商业价值只有在整个系统被正确设计时才存在。",{},{"id":257,"data":258,"type":42,"tunes":261},"NnYUiRBtwJ",{"text":259,"level":260},"Ollama 是运行时，不是产品",2,{},{"id":263,"data":264,"type":239,"tunes":266},"nVrpsWCll3",{"text":265},"Ollama 在本地运行和服务开源模型方面表现出色。它尤其擅长探索、开发者工作流、概念验证，以及希望在不立即承诺使用云提供商的情况下测试模型行为的团队。它通过 API 和兼容层暴露本地模型交互，使得连接现有的 OpenAI 风格工具更加容易。",{},{"id":268,"data":269,"type":239,"tunes":271},"_aQOCMkaG8",{"text":270},"这并不意味着 Ollama 解决了应用问题。它不会自动知道用户可能阅读哪些公司文档。它不会创建租户隔离、文档版本控制、审计追踪、来源归属、评估数据集或特定于业务的 UI 工作流。这些责任仍然属于应用架构。",{},{"id":273,"data":274,"type":281,"tunes":282},"jeeZbnQvh7",{"meta":275,"items":276,"style":280},{},[277,278,279],"\u003Cb>Ollama 帮助解决：\u003C\u002Fb>本地模型执行、快速实验、基于 API 的模型访问、离线优先的概念验证以及开发者生产力。","\u003Cb>Ollama 本身不解决：\u003C\u002Fb>访问控制、RAG 质量、文档生命周期、租户边界、评估、审计日志、监控、回退行为或企业工作流设计。","\u003Cb>架构错误：\u003C\u002Fb>将本地推理视为已经是安全的 AI 产品。","unordered","list",{},{"id":284,"data":285,"type":289,"tunes":290},"U8K0Qat9xz",{"text":286,"caption":287,"alignment":288},"模型是最容易的部分。应用层才是产品价值所在。","架构原则","left","quote",{},{"id":292,"data":293,"type":42,"tunes":295},"NYU66FQDT8",{"text":294,"level":260},"演示、概念验证和生产是不同的阶段",{},{"id":297,"data":298,"type":239,"tunes":300},"-EGq4eScAy",{"text":299},"许多开源大语言模型项目失败，是因为团队将可用的演示与生产能力混淆。区别并非表面上的。每个成熟度级别都有不同的目标、不同的风险概况和不同的工程要求。",{},{"id":302,"data":303,"type":325,"tunes":326},"V_OydBfVSx",{"content":304,"stretched":43,"withHeadings":14},[305,310,315,320],[306,307,308,309],"阶段","证明什么","典型设置","仍然缺少什么",[311,312,313,314],"演示","模型可以在本地回答提示。","笔记本电脑上的 Ollama，一个模型，一个提示，没有真正的数据控制。","权限、检索、日志、评估、部署、监控、用户工作流。",[316,317,318,319],"概念验证","一个小型受控系统可以回答关于选定文档或工作流的问题。","基本 Web UI、摄取脚本、向量搜索、有限用户、有限文档范围。","规模、治理、测试数据集、回退策略、可审计性、支持模型。",[321,322,323,324],"生产","多个用户可以在实际工作中安全且重复地使用系统。","经过身份验证的应用、租户隔离、RAG 管道、可观测性、提供商抽象、备份、发布流程。","持续改进、评估扩展、运营成熟度。","table",{},{"id":328,"data":329,"type":239,"tunes":331},"ikp3g9j4So",{"text":330},"概念验证可以有意识地小规模。生产不能有意识地盲目。一旦真实用户、私有数据、业务决策和合规期望进入系统，架构必须变得明确。",{},{"id":333,"data":334,"type":42,"tunes":336},"f1xN0TAU53",{"text":335,"level":260},"RAG 的定位",{},{"id":338,"data":339,"type":239,"tunes":341},"wVTJ2-nEg8",{"text":340},"\u003Cb>检索增强生成\u003C\u002Fb>是连接语言模型与私有业务知识最常见的桥梁。模型不会神奇地知道内部文档、合同、工单、产品规格或运行手册。应用必须在要求模型回答之前检索相关上下文。",{},{"id":343,"data":344,"type":239,"tunes":346},"fvxr_M2czf",{"text":345},"一个实际的 RAG 流程如下所示：",{},{"id":348,"data":349,"type":281,"tunes":363},"tVZHbBjBJe",{"meta":350,"items":352,"style":362},{"counterType":351},"numeric",[353,354,355,356,357,358,359,360,361],"文档从受控源上传或同步。","文本被提取、清理并分割成块。","块接收元数据，如租户、所有者、文档版本、来源 URL、访问范围和时间戳。","为每个块生成嵌入。","向量存储在 pgvector、Qdrant 或其他检索层中。","查询时，应用在检索前检查权限。","通过相似性搜索和元数据过滤器检索相关块。","提示构建器将选定的上下文注入模型请求。","生成带有引用、置信度边界以及在检索较弱时无答案回退的答案。","ordered",{},{"id":365,"data":366,"type":239,"tunes":368},"5VP9OTHrad",{"text":367},"RAG可以减少幻觉，但无法完全消除。糟糕的分块策略、薄弱的元数据、缺失的权限过滤器、低质量的嵌入或过于宽泛的检索，仍然可能产生令人信服但错误的答案。严肃的RAG系统需要阈值、引用、检索日志和评估。",{},{"id":370,"data":371,"type":42,"tunes":373},"6R3G0KzeXf",{"text":372,"level":260},"实用的本地开源大语言模型架构",{},{"id":375,"data":376,"type":239,"tunes":378},"hsYURnHqGd",{"text":377},"一条现实的生产路径并不需要特殊的基础设施。对于许多团队来说，一个强大的初始架构可以使用常规的Web栈：Nuxt作为前端，Nitro或Node API作为后端，PostgreSQL作为记录系统，pgvector用于检索，Ollama作为本地运行时，Prisma用于数据访问，以及后台工作进程用于数据摄取和嵌入。",{},{"id":380,"data":381,"type":383,"tunes":384},"ie58nqmk5o",{"code":382},"用户问题 | v\n前端界面 | v\nAPI \u002F 后端 | +--> 身份验证 +--> 租户和角色权限检查 | v\n检索层 | +--> PostgreSQL元数据 +--> pgvector或Qdrant向量搜索 +--> 相似度阈值 | v\n提示构建器 | +--> 系统提示 +--> 检索到的文本块 +--> 来源引用 +--> 无答案规则 | v\n大语言模型提供者抽象层 | +--> Ollama \u002F 本地模型 +--> 云端模型备用 +--> 未来自托管运行时 | v\n带来源的答案 | v\n日志、追踪、指标、评估数据集","code",{},{"id":386,"data":387,"type":239,"tunes":389},"HCdDDntKaG",{"text":388},"这种架构保持了模型的可替换性。Ollama可以作为第一个运行时，但系统不应锁定在单一推理引擎上。清晰的架构将用户工作流、检索、提示构建、模型提供者和可观测性分离开来。",{},{"id":391,"data":392,"type":281,"tunes":403},"jx3zLyUEmA",{"meta":393,"items":394,"style":280},{},[395,396,397,398,399,400,401,402],"\u003Cb>前端：\u003C\u002Fb>Nuxt或其他Web界面，用于经过身份验证的用户工作流。","\u003Cb>后端\u002FAPI：\u003C\u002Fb>Nitro、Node.js或FastAPI，用于编排、权限和提供者路由。","\u003Cb>数据库：\u003C\u002Fb>PostgreSQL，用于文档、用户、租户、角色、提示、日志和元数据。","\u003Cb>向量搜索：\u003C\u002Fb>pgvector用于简单的集成检索，或当向量搜索成为专用服务时使用Qdrant。","\u003Cb>模型运行时：\u003C\u002Fb>Ollama用于本地执行，llama.cpp服务器用于轻量级服务，或vLLM用于更高吞吐量的GPU服务。","\u003Cb>存储：\u003C\u002Fb>本地文件系统或兼容S3的对象存储，用于上传的文件和提取的工件。","\u003Cb>工作进程：\u003C\u002Fb>后台数据摄取、分块、嵌入、重新索引和文档版本处理。","\u003Cb>可观测性：\u003C\u002Fb>日志、指标、提示追踪、检索追踪、延迟跟踪和评估结果。",{},{"id":405,"data":406,"type":42,"tunes":408},"CG1PJLbPuV",{"text":407,"level":260},"生产就绪检查清单",{},{"id":410,"data":411,"type":239,"tunes":413},"aOHxNXO4Mk",{"text":412},"以下检查清单是本地模型演示与可用开源大语言模型应用之间的区别：",{},{"id":415,"data":416,"type":281,"tunes":436},"TBkg7dLMT1",{"meta":417,"items":418,"style":280},{},[419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435],"每个文档和文本块都有tenant_id。","在检查用户和角色权限之前，检索被阻止。","文档包含元数据、来源、所有者、版本、生命周期状态和保留策略。","分块策略已记录并针对真实文档进行了测试。","嵌入模型的选择是明确的并且有版本控制。","向量索引配置是可重现的。","相似度阈值防止弱上下文被盲目使用。","答案尽可能包含来源引用或来源参考。","当检索置信度过低时，使用无答案回退。","提示模板有版本控制并受发布管理。","从一开始就构建大语言模型提供者抽象层。","结构化输出在下游使用之前经过验证。","评估数据集包含真实问题、预期来源和不可接受的答案。","检索日志显示每个答案使用了哪些文本块。","监控延迟、令牌使用量、GPU\u002FCPU负载和错误率。","隐私和保留规则涵盖上传、提取的文本、文本块、嵌入、提示、响应和日志。","部署、备份、恢复、回滚和事件处理路径已记录。",{},{"id":438,"data":439,"type":239,"tunes":441},"tdTcmD4DEO",{"text":440},"这与\u003Ca href=\"\u002Fzh\u002Fenterprise\">企业交付操作系统\u003C\u002Fa>直接相关：有用的人工智能不仅仅是模型决策。它关乎交付纪律、证据、控制、指标和运营所有权。",{},{"id":443,"data":444,"type":42,"tunes":446},"zOuV7s1ByX",{"text":445,"level":260},"提供者抽象：不要绑定单一模型",{},{"id":448,"data":449,"type":239,"tunes":451},"gPuC35eEAc",{"text":450},"本地模型对于隐私敏感用例、离线场景、成本控制和内部实验非常有价值。云端模型在复杂推理、编码、多语言准确性或多模态任务方面可能仍然更强。生产应用不应将任何单一模型视为永久基础设施。",{},{"id":453,"data":454,"type":239,"tunes":456},"ssy1KKIyUv",{"text":455},"提供者抽象允许相同的应用工作流调用Ollama、OpenAI、Gemini、Anthropic、Mistral、vLLM或其他自托管端点，而无需重写产品。应用根据用例、数据敏感性、延迟、成本和质量要求来决定提供者。",{},{"id":458,"data":459,"type":383,"tunes":461},"droVs9NwWG",{"code":460},"type LlmProvider = \"ollama\" | \"openai\" | \"gemini\" | \"anthropic\" | \"vllm\"; type ChatInput = { provider: LlmProvider; model: string; tenantId: string; userId: string; question: string; context: Array\u003C{ chunkId: string; sourceTitle: string; text: string; }>;\n}; async function chat(input: ChatInput) { await assertUserCanAccessContext(input.userId, input.context); const messages = buildRagMessages({ question: input.question, context: input.context, rules: [ \"Answer only from provided context when possible.\", \"Cite source titles.\", \"Say when the context is insufficient.\" ] }); return llm.chat({ provider: input.provider, model: input.model, messages, trace: { tenantId: input.tenantId, userId: input.userId, promptVersion: \"rag-v3.2\" } });\n}",{},{"id":463,"data":464,"type":239,"tunes":466},"TqpI4xqkq1",{"text":465},"关键思想不是TypeScript语法。关键思想是边界。应用拥有权限、检索、提示规则、追踪和评估。提供者只产生模型输出。",{},{"id":468,"data":469,"type":42,"tunes":471},"RuZt2H8Qtd",{"text":470,"level":260},"pgvector vs Qdrant",{},{"id":473,"data":474,"type":239,"tunes":476},"-nl0_dtw9s",{"text":475},"对于许多开源大语言模型应用来说，向量存储的决策在开始时很简单：如果PostgreSQL已经是你的记录系统，\u003Cb>pgvector\u003C\u002Fb>是一个很好的起点。它将元数据、权限、文档记录和向量紧密地结合在一起。这降低了操作复杂性。",{},{"id":478,"data":479,"type":239,"tunes":481},"mJJZ9Vhiy4",{"text":480},"\u003Cb>Qdrant\u003C\u002Fb>在向量搜索需要成为专用服务时变得更有吸引力：更大的检索规模、高级过滤、专门的索引、混合搜索模式或检索基础设施的独立扩展。",{},{"id":483,"data":484,"type":325,"tunes":506},"ZNBNQmWTqi",{"content":485,"stretched":43,"withHeadings":14},[486,491,496,501],[487,488,489,490],"选项","最佳适用场景","优势","权衡",[492,493,494,495],"pgvector","概念验证、早期生产、已基于PostgreSQL构建的系统。","单一数据库、SQL连接、ACID行为、更简单的运维、元数据与向量紧密关联。","在大规模检索场景下不如专用向量数据库专业。",[497,498,499,500],"Qdrant","专用语义搜索服务、更大规模的向量工作负载、高级过滤与检索模式。","专为向量搜索设计、强大的过滤模型、独立扩展、面向检索的API。","增加了额外的基础设施组件和运维面。",[502,503,504,505],"从简单开始","大多数企业团队从私有RAG应用起步。","架构风险较低、交付更快、审计路径更简单。","如果检索成为核心且规模扩大，后续可能需要迁移。",{},{"id":508,"data":509,"type":239,"tunes":511},"EaNwvz0Ala",{"text":510},"一个实用的原则：当PostgreSQL已经承载了你的业务数据且检索规模适中时，从pgvector开始。当向量搜索本身成为产品能力时，迁移到Qdrant。",{},{"id":513,"data":514,"type":42,"tunes":516},"Xm3eJKCflO",{"text":515,"level":260},"安全与隐私的现实考量",{},{"id":518,"data":519,"type":239,"tunes":521},"rdIR5uvVuv",{"text":520},"本地推理并不自动意味着安全的AI。它只意味着模型执行可以在本地进行。完整的数据路径仍然重要：上传的文件、提取的文本、分块、嵌入、日志、提示、响应、备份、开发者访问、管理工具和分析导出。",{},{"id":523,"data":524,"type":239,"tunes":526},"IhqG3kxPSc",{"text":525},"嵌入向量也需要谨慎对待。它们不是原始文档，但仍然表示从敏感内容中派生出的信息。将它们视为受保护数据路径的一部分，特别是当它们与元数据、源记录、用户查询或租户标识符关联时。",{},{"id":528,"data":529,"type":281,"tunes":538},"QvcBrg8G6B",{"meta":530,"items":531,"style":280},{},[532,533,534,535,536,537],"在访问规则明确之前，不要索引文档。","在没有租户和角色过滤器的情况下，不要检索分块。","在没有保留规则的情况下，不要记录完整的提示和响应。","除非策略允许，否则不要将敏感上下文发送到云端模型。","不要假设本地等于符合GDPR；合规性取决于完整的处理设计。","不要让评估和调试副本成为不受控制的影子数据集。",{},{"id":540,"data":541,"type":239,"tunes":543},"_YLdd4iHrS",{"text":542},"这就是\u003Ca href=\"\u002Fzh\u002Fblog\u002Fenterprise-grade-multi-tenant-architecture-for-an-international-platform\">多实例SaaS架构\u003C\u002Fa>重要的地方。如果租户、角色、数据所有权和运营边界薄弱，添加本地LLM可能会放大风险而非降低风险。",{},{"id":545,"data":546,"type":42,"tunes":548},"I6V0KMIQjb",{"text":547,"level":260},"评估不是可选项",{},{"id":550,"data":551,"type":239,"tunes":553},"yaKCxuptHO",{"text":552},"一个生产级的Open-LLM应用需要一个评估循环。没有它，团队只能依赖轶事。几个好的演示答案并不能证明检索有效、提示稳定，或者模型在实际使用中行为安全。",{},{"id":555,"data":556,"type":239,"tunes":558},"Kq_qe2AL-v",{"text":557},"一个最小的评估数据集应包括真实的用户问题、预期的源文档、不可接受的答案、无答案的情况，以及针对先前失败的回归测试。每次对分块、嵌入、提示、模型提供商或检索阈值的更改，都应针对该数据集进行测试。",{},{"id":560,"data":561,"type":281,"tunes":569},"oBlROQd5Li",{"meta":562,"items":563,"style":280},{},[564,565,566,567,568],"\u003Cb>检索评估：\u003C\u002Fb>系统是否获取了正确的源分块？","\u003Cb>答案评估：\u003C\u002Fb>答案是否基于检索到的上下文？","\u003Cb>安全评估：\u003C\u002Fb>系统是否避免了禁止的披露或未经授权的数据访问？","\u003Cb>运营评估：\u003C\u002Fb>延迟、失败率和成本是否保持在可接受范围内？","\u003Cb>回归评估：\u003C\u002Fb>模型或提示升级是否破坏了之前正确的行为？",{},{"id":571,"data":572,"type":239,"tunes":574},"9gDXPLZ6Rp",{"text":573},"RAG减少了幻觉，但并未消除评估的必要性。评估是将聪明的原型转变为不断改进产品的控制循环。",{},{"id":576,"data":577,"type":42,"tunes":579},"Hi1K8JLPUo",{"text":578,"level":260},"部署纪律：模型即发布事件",{},{"id":581,"data":582,"type":239,"tunes":584},"sEpigdnlkD",{"text":583},"更换模型不是无害的配置调整。它可能改变答案风格、推理行为、语言质量、延迟、令牌使用、引用纪律和故障模式。在生产环境中，模型升级应像发布事件一样处理。",{},{"id":586,"data":587,"type":239,"tunes":589},"sLXBCBh3E0",{"text":588},"这意味着要对提示、嵌入模型、检索设置、模型标识符、提供商路由和评估结果进行版本控制。同时也要有回滚逻辑。如果新模型导致基于检索的答案变差或结构化输出中断，系统需要一条可控的路径回到已知良好的配置。",{},{"id":591,"data":592,"type":239,"tunes":594},"pcbe8eGMbe",{"text":593},"这符合\u003Ca href=\"\u002Fzh\u002Fenterprise\u002Freference-models\u002Fdelivery-and-change\">交付与变更\u003C\u002Fa>和\u003Ca href=\"\u002Fzh\u002Fenterprise\u002Freference-models\u002Fdigital-platform\">AI就绪平台架构\u003C\u002Fa>相同的运营逻辑：稳定的交付需要可重复的控制，而非英雄式的手动修复。",{},{"id":596,"data":597,"type":42,"tunes":599},"mOhI-jF1zx",{"text":598,"level":260},"结论：生产始于演示结束之处",{},{"id":601,"data":602,"type":239,"tunes":604},"3mXK980w23",{"text":603},"Ollama可以开启旅程。它使本地模型执行变得可访问，并降低了实验的门槛。这很有价值。但生产应用始于演示结束之处。",{},{"id":606,"data":607,"type":239,"tunes":609},"9O27eQ_Svm",{"text":608},"模型只是一个可替换的组件。真正的产品是围绕它的受控系统：摄取、权限、检索、提示、提供商路由、评估、日志、监控、部署、备份和用户工作流。这就是隐私变得真实、质量变得可衡量、商业价值变得可重复的地方。",{},{"id":611,"data":612,"type":239,"tunes":614},"4Lyy3E4ZsF",{"text":613},"一个严肃的开放LLM应用是通过工程纪律构建的，而不是通过运行一次本地模型。Ollama可以启动旅程，但生产应用从演示结束的地方开始。",{},{"id":616,"data":617,"type":239,"tunes":619},"eKPRtinG5L",{"text":618},"主题：",{},{"id":621,"data":622,"type":239,"tunes":624},"GMa6lE1NNl",{"text":623},"Ollama, 开放LLM, RAG, pgvector, Qdrant, 本地AI, LLMOps, 提供商抽象, 企业AI架构",{},"2.31","使用Ollama运行本地模型很简单。但构建一个可用于生产环境的开源大语言模型（Open-LLM）应用则更具挑战性：它需要RAG（检索增强生成）、访问控制、供应商抽象、评估、日志记录、部署规范，以及围绕模型构建受控的应用层。","\u002Fuploads\u002F2026\u002F06\u002Follama-is-not-the-product-building-production-ready-open-llm-applications-1782679361640-h0usqf.webp","ollama-is-not-the-product-building-production-ready-open-llm-applications-1782679361640-h0usqf","PUBLISHED","2026-06-28T16:39:00.000Z","2026-06-28T20:39:17.972Z","2026-06-28T20:56:51.719Z",{"en":634,"de":635,"sr":636,"es":637,"fr":638,"it":639,"ru":640,"zh":641},"\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fde\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fsr\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fes\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Ffr\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fit\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fru\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications","\u002Fzh\u002Fblog\u002Follama-is-not-the-product-building-production-ready-open-llm-applications",[643,647,651,655,659],{"id":644,"name":645,"slug":646},39,"企业交付操作系统","enterprise",{"id":648,"name":649,"slug":650},87,"LLMOps作战手册","llmops",{"id":652,"name":653,"slug":654},58,"评估与质量门槛","evaluation",{"id":656,"name":657,"slug":658},89,"评估框架","evaluation-harness",{"id":660,"name":661,"slug":662},85,"质量门槛","quality-gates",{"id":664,"login":665,"email":666,"displayName":667},"20","rooth8233","","Aleksandar Stajić",[669,1000],{"lang":670,"title":671,"content":672,"contentJson":673,"excerpt":999},"en","Ollama Is Not the Product: Building Production-Ready Open-LLM Applications","{\"time\":1782679301267,\"blocks\":[{\"id\":\"HsB_-_Sdzh\",\"type\":\"header\",\"data\":{\"text\":\"Ollama Is Not the Product: Building Production-Ready Open-LLM Applications\",\"level\":1},\"tunes\":{}},{\"id\":\"G_FTnJiMVo\",\"type\":\"paragraph\",\"data\":{\"text\":\"Tools like \u003Cb>Ollama\u003C\u002Fb> have made local LLM experimentation almost frictionless. Install the runtime, pull a model, send a prompt, and a local assistant answers in seconds. That is useful. It is also the easiest part of the journey.\"},\"tunes\":{}},{\"id\":\"fVa1sJxmy6\",\"type\":\"paragraph\",\"data\":{\"text\":\"A terminal demo is not an application. A local model is not a product. A productive Open-LLM application needs controlled data ingestion, retrieval, permissions, evaluation, logging, provider abstraction, deployment discipline, and a user workflow that solves a real business problem.\"},\"tunes\":{}},{\"id\":\"f6EzZPNhRc\",\"type\":\"paragraph\",\"data\":{\"text\":\"The core thesis is simple: \u003Cb>Ollama is a runtime, not the product\u003C\u002Fb>. The product lives in the application layer around the model. That layer decides which documents are visible, which chunks are retrieved, which prompts are used, how answers are evaluated, how failures are logged, and whether the system can be trusted in daily work.\"},\"tunes\":{}},{\"id\":\"wjgsXAJQ-i\",\"type\":\"paragraph\",\"data\":{\"text\":\"This is where local AI becomes interesting for teams building private assistants, internal knowledge tools, LLM-enabled SaaS features, or enterprise workflow copilots. The model can run locally, but privacy, reliability, and business value only exist if the full system is engineered properly.\"},\"tunes\":{}},{\"id\":\"NnYUiRBtwJ\",\"type\":\"header\",\"data\":{\"text\":\"Ollama Is a Runtime, Not a Product\",\"level\":2},\"tunes\":{}},{\"id\":\"nVrpsWCll3\",\"type\":\"paragraph\",\"data\":{\"text\":\"Ollama is excellent for running and serving open models locally. It is especially strong for exploration, developer workflows, PoCs, and teams that want to test model behavior without immediately committing to a cloud provider. It exposes local model interaction through APIs and compatibility layers that make it easier to connect existing OpenAI-style tooling.\"},\"tunes\":{}},{\"id\":\"_aQOCMkaG8\",\"type\":\"paragraph\",\"data\":{\"text\":\"That does not mean Ollama solves the application problem. It does not automatically know which company documents a user may read. It does not create tenant isolation, document versioning, audit trails, source attribution, evaluation datasets, or business-specific UI workflows. Those responsibilities stay with the application architecture.\"},\"tunes\":{}},{\"id\":\"jeeZbnQvh7\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"meta\":{},\"items\":[\"\u003Cb>Ollama helps with:\u003C\u002Fb> local model execution, fast experimentation, API-based model access, offline-first PoCs, and developer productivity.\",\"\u003Cb>Ollama does not solve by itself:\u003C\u002Fb> access control, RAG quality, document lifecycle, tenant boundaries, evaluation, audit logging, monitoring, fallback behavior, or enterprise workflow design.\",\"\u003Cb>The architectural mistake:\u003C\u002Fb> treating local inference as if it were already a secure AI product.\"]},\"tunes\":{}},{\"id\":\"U8K0Qat9xz\",\"type\":\"quote\",\"data\":{\"text\":\"The model is the easiest part. The application layer is where the product value lives.\",\"caption\":\"Architecture principle\",\"alignment\":\"left\"},\"tunes\":{}},{\"id\":\"NYU66FQDT8\",\"type\":\"header\",\"data\":{\"text\":\"Demo, PoC, and Production Are Different Stages\",\"level\":2},\"tunes\":{}},{\"id\":\"-EGq4eScAy\",\"type\":\"paragraph\",\"data\":{\"text\":\"Many Open-LLM initiatives fail because teams confuse a working demo with a production capability. The difference is not cosmetic. Each maturity level has a different goal, different risk profile, and different engineering requirement.\"},\"tunes\":{}},{\"id\":\"V_OydBfVSx\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Stage\",\"What it proves\",\"Typical setup\",\"What is still missing\"],[\"Demo\",\"A model can answer a prompt locally.\",\"Ollama on a laptop, one model, one prompt, no real data control.\",\"Permissions, retrieval, logs, evaluation, deployment, monitoring, user workflow.\"],[\"PoC\",\"A small controlled system can answer questions over selected documents or workflows.\",\"Basic web UI, ingestion script, vector search, limited users, limited document scope.\",\"Scale, governance, test datasets, fallback strategy, auditability, support model.\"],[\"Production\",\"Multiple users can use the system safely and repeatedly inside real work.\",\"Authenticated app, tenant isolation, RAG pipeline, observability, provider abstraction, backups, release process.\",\"Continuous improvement, evaluation expansion, operational maturity.\"]]},\"tunes\":{}},{\"id\":\"ikp3g9j4So\",\"type\":\"paragraph\",\"data\":{\"text\":\"A PoC can be intentionally small. Production cannot be intentionally blind. Once real users, private data, business decisions, and compliance expectations enter the system, the architecture must become explicit.\"},\"tunes\":{}},{\"id\":\"f1xN0TAU53\",\"type\":\"header\",\"data\":{\"text\":\"Where RAG Fits In\",\"level\":2},\"tunes\":{}},{\"id\":\"wVTJ2-nEg8\",\"type\":\"paragraph\",\"data\":{\"text\":\"\u003Cb>Retrieval-Augmented Generation\u003C\u002Fb> is the most common bridge between a language model and private business knowledge. The model does not magically know internal documents, contracts, tickets, product specs, or runbooks. The application must retrieve relevant context before asking the model to answer.\"},\"tunes\":{}},{\"id\":\"fvxr_M2czf\",\"type\":\"paragraph\",\"data\":{\"text\":\"A practical RAG flow looks like this:\"},\"tunes\":{}},{\"id\":\"tVZHbBjBJe\",\"type\":\"list\",\"data\":{\"style\":\"ordered\",\"meta\":{\"counterType\":\"numeric\"},\"items\":[\"Documents are uploaded or synchronized from controlled sources.\",\"Text is extracted, cleaned, and split into chunks.\",\"Chunks receive metadata such as tenant, owner, document version, source URL, access scope, and timestamp.\",\"Embeddings are generated for each chunk.\",\"Vectors are stored in pgvector, Qdrant, or another retrieval layer.\",\"At query time, the application checks permissions before retrieval.\",\"Relevant chunks are retrieved with similarity search and metadata filters.\",\"The prompt builder injects selected context into the model request.\",\"The answer is generated with citations, confidence boundaries, and no-answer fallback when retrieval is weak.\"]},\"tunes\":{}},{\"id\":\"5VP9OTHrad\",\"type\":\"paragraph\",\"data\":{\"text\":\"RAG reduces hallucinations, but it does not eliminate them. A poor chunking strategy, weak metadata, missing permission filters, low-quality embeddings, or overly broad retrieval can still produce convincing but wrong answers. Serious RAG systems need thresholds, citations, retrieval logs, and evaluation.\"},\"tunes\":{}},{\"id\":\"6R3G0KzeXf\",\"type\":\"header\",\"data\":{\"text\":\"A Practical Local Open-LLM Architecture\",\"level\":2},\"tunes\":{}},{\"id\":\"hsYURnHqGd\",\"type\":\"paragraph\",\"data\":{\"text\":\"A realistic production path does not require exotic infrastructure. For many teams, a strong first architecture can use a normal web stack: Nuxt for the frontend, a Nitro or Node API, PostgreSQL as the system of record, pgvector for retrieval, Ollama as a local runtime, Prisma for data access, and background workers for ingestion and embeddings.\"},\"tunes\":{}},{\"id\":\"ie58nqmk5o\",\"type\":\"code\",\"data\":{\"code\":\"User question | v\\nFrontend UI | v\\nAPI \u002F Backend | +--> Authentication +--> Tenant and role permission check | v\\nRetrieval layer | +--> PostgreSQL metadata +--> pgvector or Qdrant vector search +--> similarity threshold | v\\nPrompt builder | +--> system prompt +--> retrieved chunks +--> source references +--> no-answer rules | v\\nLLM provider abstraction | +--> Ollama \u002F local model +--> cloud model fallback +--> future self-hosted runtime | v\\nAnswer with sources | v\\nLogs, traces, metrics, evaluation dataset\"},\"tunes\":{}},{\"id\":\"HCdDDntKaG\",\"type\":\"paragraph\",\"data\":{\"text\":\"This architecture keeps the model replaceable. Ollama can be the first runtime, but the system should not be locked to one inference engine. A clean architecture separates user workflow, retrieval, prompt construction, model provider, and observability.\"},\"tunes\":{}},{\"id\":\"jx3zLyUEmA\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"meta\":{},\"items\":[\"\u003Cb>Frontend:\u003C\u002Fb> Nuxt or another web UI for authenticated user workflows.\",\"\u003Cb>Backend\u002FAPI:\u003C\u002Fb> Nitro, Node.js, or FastAPI for orchestration, permissions, and provider routing.\",\"\u003Cb>Database:\u003C\u002Fb> PostgreSQL for documents, users, tenants, roles, prompts, logs, and metadata.\",\"\u003Cb>Vector search:\u003C\u002Fb> pgvector for simple integrated retrieval or Qdrant when vector search becomes a dedicated service.\",\"\u003Cb>Model runtime:\u003C\u002Fb> Ollama for local execution, llama.cpp server for lightweight serving, or vLLM for higher-throughput GPU serving.\",\"\u003Cb>Storage:\u003C\u002Fb> local filesystem or S3-compatible object storage for uploaded files and extracted artifacts.\",\"\u003Cb>Workers:\u003C\u002Fb> background ingestion, chunking, embedding, re-indexing, and document version processing.\",\"\u003Cb>Observability:\u003C\u002Fb> logs, metrics, prompt traces, retrieval traces, latency tracking, and evaluation results.\"]},\"tunes\":{}},{\"id\":\"CG1PJLbPuV\",\"type\":\"header\",\"data\":{\"text\":\"The Production Readiness Checklist\",\"level\":2},\"tunes\":{}},{\"id\":\"aOHxNXO4Mk\",\"type\":\"paragraph\",\"data\":{\"text\":\"The following checklist is the difference between a local model demo and a usable Open-LLM application:\"},\"tunes\":{}},{\"id\":\"TBkg7dLMT1\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"meta\":{},\"items\":[\"Every document and chunk has a tenant_id.\",\"Retrieval is blocked until user and role permissions are checked.\",\"Documents include metadata, source, owner, version, lifecycle state, and retention policy.\",\"Chunking strategy is documented and tested against real documents.\",\"Embedding model selection is explicit and versioned.\",\"Vector index configuration is reproducible.\",\"Similarity threshold prevents weak context from being used blindly.\",\"Answers include source citations or source references where possible.\",\"No-answer fallback is used when retrieval confidence is too low.\",\"Prompt templates are versioned and release-controlled.\",\"LLM provider abstraction is built from the start.\",\"Structured output is validated before downstream use.\",\"Evaluation dataset contains real questions, expected sources, and unacceptable answers.\",\"Retrieval logs show which chunks were used for each answer.\",\"Latency, token usage, GPU\u002FCPU load, and error rates are monitored.\",\"Privacy and retention rules cover uploads, extracted text, chunks, embeddings, prompts, responses, and logs.\",\"Deployment, backup, restore, rollback, and incident paths are documented.\"]},\"tunes\":{}},{\"id\":\"tdTcmD4DEO\",\"type\":\"paragraph\",\"data\":{\"text\":\"This connects directly with \u003Ca href=\\\"\u002Fenterprise\\\">Enterprise Delivery OS\u003C\u002Fa>: useful AI is not only a model decision. It is delivery discipline, evidence, controls, metrics, and operational ownership.\"},\"tunes\":{}},{\"id\":\"zOuV7s1ByX\",\"type\":\"header\",\"data\":{\"text\":\"Provider Abstraction: Do Not Marry One Model\",\"level\":2},\"tunes\":{}},{\"id\":\"gPuC35eEAc\",\"type\":\"paragraph\",\"data\":{\"text\":\"Local models are valuable for privacy-sensitive use cases, offline scenarios, cost control, and internal experimentation. Cloud models may still be stronger for difficult reasoning, coding, multilingual accuracy, or multimodal work. A production application should not treat any one model as permanent infrastructure.\"},\"tunes\":{}},{\"id\":\"ssy1KKIyUv\",\"type\":\"paragraph\",\"data\":{\"text\":\"A provider abstraction allows the same application workflow to call Ollama, OpenAI, Gemini, Anthropic, Mistral, vLLM, or another self-hosted endpoint without rewriting the product. The application decides the provider based on use case, data sensitivity, latency, cost, and quality requirements.\"},\"tunes\":{}},{\"id\":\"droVs9NwWG\",\"type\":\"code\",\"data\":{\"code\":\"type LlmProvider = \\\"ollama\\\" | \\\"openai\\\" | \\\"gemini\\\" | \\\"anthropic\\\" | \\\"vllm\\\"; type ChatInput = { provider: LlmProvider; model: string; tenantId: string; userId: string; question: string; context: Array\u003C{ chunkId: string; sourceTitle: string; text: string; }>;\\n}; async function chat(input: ChatInput) { await assertUserCanAccessContext(input.userId, input.context); const messages = buildRagMessages({ question: input.question, context: input.context, rules: [ \\\"Answer only from provided context when possible.\\\", \\\"Cite source titles.\\\", \\\"Say when the context is insufficient.\\\" ] }); return llm.chat({ provider: input.provider, model: input.model, messages, trace: { tenantId: input.tenantId, userId: input.userId, promptVersion: \\\"rag-v3.2\\\" } });\\n}\"},\"tunes\":{}},{\"id\":\"TqpI4xqkq1\",\"type\":\"paragraph\",\"data\":{\"text\":\"The key idea is not the TypeScript syntax. The key idea is the boundary. The application owns permissions, retrieval, prompt rules, tracing, and evaluation. The provider only produces the model output.\"},\"tunes\":{}},{\"id\":\"RuZt2H8Qtd\",\"type\":\"header\",\"data\":{\"text\":\"pgvector vs Qdrant\",\"level\":2},\"tunes\":{}},{\"id\":\"-nl0_dtw9s\",\"type\":\"paragraph\",\"data\":{\"text\":\"For many Open-LLM applications, the vector store decision is simple at the beginning: if PostgreSQL is already your system of record, \u003Cb>pgvector\u003C\u002Fb> is a strong starting point. It keeps metadata, permissions, document records, and vectors close together. That reduces operational complexity.\"},\"tunes\":{}},{\"id\":\"mJJZ9Vhiy4\",\"type\":\"paragraph\",\"data\":{\"text\":\"\u003Cb>Qdrant\u003C\u002Fb> becomes more attractive when vector search needs to become a dedicated service: larger retrieval scale, advanced filtering, specialized indexing, hybrid search patterns, or independent scaling of retrieval infrastructure.\"},\"tunes\":{}},{\"id\":\"ZNBNQmWTqi\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"stretched\":false,\"content\":[[\"Option\",\"Best fit\",\"Strengths\",\"Trade-offs\"],[\"pgvector\",\"PoCs, early production, systems already built on PostgreSQL.\",\"Single database, SQL joins, ACID behavior, simpler operations, metadata close to vectors.\",\"Less specialized than a dedicated vector database at large retrieval scale.\"],[\"Qdrant\",\"Dedicated semantic search services, larger vector workloads, advanced filtering and retrieval patterns.\",\"Purpose-built vector search, strong filtering model, independent scaling, retrieval-focused APIs.\",\"Adds another infrastructure component and operational surface.\"],[\"Start simple\",\"Most enterprise teams beginning with private RAG applications.\",\"Lower architecture risk, faster delivery, easier audit path.\",\"May need migration later if retrieval becomes central and high-scale.\"]]},\"tunes\":{}},{\"id\":\"EaNwvz0Ala\",\"type\":\"paragraph\",\"data\":{\"text\":\"A practical rule: start with pgvector when PostgreSQL already owns your business data and the retrieval scale is moderate. Move to Qdrant when vector search becomes a product capability of its own.\"},\"tunes\":{}},{\"id\":\"Xm3eJKCflO\",\"type\":\"header\",\"data\":{\"text\":\"Security and Privacy Reality Check\",\"level\":2},\"tunes\":{}},{\"id\":\"rdIR5uvVuv\",\"type\":\"paragraph\",\"data\":{\"text\":\"Local inference does not automatically mean secure AI. It only means the model execution can happen locally. The full data path still matters: uploaded files, extracted text, chunks, embeddings, logs, prompts, responses, backups, developer access, admin tools, and analytics exports.\"},\"tunes\":{}},{\"id\":\"IhqG3kxPSc\",\"type\":\"paragraph\",\"data\":{\"text\":\"Embeddings also deserve care. They are not the original document, but they still represent information derived from sensitive content. Treat them as part of the protected data path, especially when they are tied to metadata, source records, user queries, or tenant identifiers.\"},\"tunes\":{}},{\"id\":\"QvcBrg8G6B\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"meta\":{},\"items\":[\"Do not index documents before access rules are known.\",\"Do not retrieve chunks without tenant and role filters.\",\"Do not log full prompts and responses without retention rules.\",\"Do not send sensitive context to a cloud model unless the policy allows it.\",\"Do not assume that local equals GDPR-compliant; compliance depends on the complete processing design.\",\"Do not let evaluation and debugging copies become uncontrolled shadow datasets.\"]},\"tunes\":{}},{\"id\":\"_YLdd4iHrS\",\"type\":\"paragraph\",\"data\":{\"text\":\"This is where \u003Ca href=\\\"\u002Fblog\u002Fenterprise-grade-multi-tenant-architecture-for-an-international-platform\\\">multi-instance SaaS architecture\u003C\u002Fa> matters. If tenants, roles, data ownership, and operational boundaries are weak, adding a local LLM can amplify risk instead of reducing it.\"},\"tunes\":{}},{\"id\":\"I6V0KMIQjb\",\"type\":\"header\",\"data\":{\"text\":\"Evaluation Is Not Optional\",\"level\":2},\"tunes\":{}},{\"id\":\"yaKCxuptHO\",\"type\":\"paragraph\",\"data\":{\"text\":\"A production Open-LLM application needs an evaluation loop. Without it, teams only have anecdotes. A few good demo answers do not prove that retrieval works, that the prompt is stable, or that the model behaves safely across real usage.\"},\"tunes\":{}},{\"id\":\"Kq_qe2AL-v\",\"type\":\"paragraph\",\"data\":{\"text\":\"A minimal evaluation dataset should include real user questions, expected source documents, unacceptable answers, no-answer cases, and regression tests for previous failures. Every change to chunking, embeddings, prompts, model provider, or retrieval threshold should be tested against that dataset.\"},\"tunes\":{}},{\"id\":\"oBlROQd5Li\",\"type\":\"list\",\"data\":{\"style\":\"unordered\",\"meta\":{},\"items\":[\"\u003Cb>Retrieval evaluation:\u003C\u002Fb> Did the system fetch the right source chunks?\",\"\u003Cb>Answer evaluation:\u003C\u002Fb> Did the answer stay grounded in the retrieved context?\",\"\u003Cb>Safety evaluation:\u003C\u002Fb> Did the system avoid forbidden disclosures or unauthorized data?\",\"\u003Cb>Operational evaluation:\u003C\u002Fb> Did latency, failure rate, and cost stay inside acceptable limits?\",\"\u003Cb>Regression evaluation:\u003C\u002Fb> Did a model or prompt upgrade break previously correct behavior?\"]},\"tunes\":{}},{\"id\":\"9gDXPLZ6Rp\",\"type\":\"paragraph\",\"data\":{\"text\":\"RAG reduces hallucinations, but it does not remove the need for evaluation. Evaluation is the control loop that turns a clever prototype into an improving product.\"},\"tunes\":{}},{\"id\":\"Hi1K8JLPUo\",\"type\":\"header\",\"data\":{\"text\":\"Deployment Discipline: The Model Is a Release Event\",\"level\":2},\"tunes\":{}},{\"id\":\"sEpigdnlkD\",\"type\":\"paragraph\",\"data\":{\"text\":\"Changing a model is not a harmless configuration tweak. It can change answer style, reasoning behavior, language quality, latency, token usage, citation discipline, and failure modes. In production, model upgrades should be handled like release events.\"},\"tunes\":{}},{\"id\":\"sLXBCBh3E0\",\"type\":\"paragraph\",\"data\":{\"text\":\"That means versioning prompts, embedding models, retrieval settings, model identifiers, provider routes, and evaluation results. It also means having rollback logic. If a new model causes worse retrieval-grounded answers or breaks structured output, the system needs a controlled path back to the known-good configuration.\"},\"tunes\":{}},{\"id\":\"pcbe8eGMbe\",\"type\":\"paragraph\",\"data\":{\"text\":\"This fits the same operating logic as \u003Ca href=\\\"\u002Fenterprise\u002Freference-models\u002Fdelivery-and-change\\\">Delivery &amp; Change\u003C\u002Fa> and \u003Ca href=\\\"\u002Fenterprise\u002Freference-models\u002Fdigital-platform\\\">AI-ready platform architecture\u003C\u002Fa>: stable delivery requires repeatable controls, not heroic manual fixes.\"},\"tunes\":{}},{\"id\":\"mOhI-jF1zx\",\"type\":\"header\",\"data\":{\"text\":\"Conclusion: Production Begins Where the Demo Ends\",\"level\":2},\"tunes\":{}},{\"id\":\"3mXK980w23\",\"type\":\"paragraph\",\"data\":{\"text\":\"Ollama can start the journey. It makes local model execution accessible and lowers the barrier to experimentation. That is valuable. But the production application begins where the demo ends.\"},\"tunes\":{}},{\"id\":\"9O27eQ_Svm\",\"type\":\"paragraph\",\"data\":{\"text\":\"The model is only one replaceable component. The real product is the controlled system around it: ingestion, permissions, retrieval, prompts, provider routing, evaluation, logs, monitoring, deployment, backup, and user workflow. That is where privacy becomes real, quality becomes measurable, and business value becomes repeatable.\"},\"tunes\":{}},{\"id\":\"4Lyy3E4ZsF\",\"type\":\"paragraph\",\"data\":{\"text\":\"A serious Open-LLM application is built through engineering discipline, not by running a local model once. Ollama can start the journey, but the production application begins where the demo ends.\"},\"tunes\":{}},{\"id\":\"eKPRtinG5L\",\"type\":\"paragraph\",\"data\":{\"text\":\"Theme:\"},\"tunes\":{}},{\"id\":\"GMa6lE1NNl\",\"type\":\"paragraph\",\"data\":{\"text\":\"Ollama, Open LLM, RAG, pgvector, Qdrant, Local AI, LLMOps, Provider Abstraction, Enterprise AI Architecture\"},\"tunes\":{}}],\"version\":\"2.31.5\"}",{"time":674,"blocks":675,"version":998},1782679301267,[676,679,683,687,691,695,699,703,707,715,720,724,728,752,756,760,764,768,782,786,790,794,798,802,815,819,823,845,849,853,857,861,864,868,871,875,879,901,905,909,913,917,928,932,936,940,944,954,958,962,966,970,974,978,982,986,990,994],{"id":231,"data":677,"type":42,"tunes":678},{"text":671,"level":40},{},{"id":236,"data":680,"type":239,"tunes":682},{"text":681},"Tools like \u003Cb>Ollama\u003C\u002Fb> have made local LLM experimentation almost frictionless. Install the runtime, pull a model, send a prompt, and a local assistant answers in seconds. That is useful. It is also the easiest part of the journey.",{},{"id":242,"data":684,"type":239,"tunes":686},{"text":685},"A terminal demo is not an application. A local model is not a product. A productive Open-LLM application needs controlled data ingestion, retrieval, permissions, evaluation, logging, provider abstraction, deployment discipline, and a user workflow that solves a real business problem.",{},{"id":247,"data":688,"type":239,"tunes":690},{"text":689},"The core thesis is simple: \u003Cb>Ollama is a runtime, not the product\u003C\u002Fb>. The product lives in the application layer around the model. That layer decides which documents are visible, which chunks are retrieved, which prompts are used, how answers are evaluated, how failures are logged, and whether the system can be trusted in daily work.",{},{"id":252,"data":692,"type":239,"tunes":694},{"text":693},"This is where local AI becomes interesting for teams building private assistants, internal knowledge tools, LLM-enabled SaaS features, or enterprise workflow copilots. The model can run locally, but privacy, reliability, and business value only exist if the full system is engineered properly.",{},{"id":257,"data":696,"type":42,"tunes":698},{"text":697,"level":260},"Ollama Is a Runtime, Not a Product",{},{"id":263,"data":700,"type":239,"tunes":702},{"text":701},"Ollama is excellent for running and serving open models locally. It is especially strong for exploration, developer workflows, PoCs, and teams that want to test model behavior without immediately committing to a cloud provider. It exposes local model interaction through APIs and compatibility layers that make it easier to connect existing OpenAI-style tooling.",{},{"id":268,"data":704,"type":239,"tunes":706},{"text":705},"That does not mean Ollama solves the application problem. It does not automatically know which company documents a user may read. It does not create tenant isolation, document versioning, audit trails, source attribution, evaluation datasets, or business-specific UI workflows. Those responsibilities stay with the application architecture.",{},{"id":273,"data":708,"type":281,"tunes":714},{"meta":709,"items":710,"style":280},{},[711,712,713],"\u003Cb>Ollama helps with:\u003C\u002Fb> local model execution, fast experimentation, API-based model access, offline-first PoCs, and developer productivity.","\u003Cb>Ollama does not solve by itself:\u003C\u002Fb> access control, RAG quality, document lifecycle, tenant boundaries, evaluation, audit logging, monitoring, fallback behavior, or enterprise workflow design.","\u003Cb>The architectural mistake:\u003C\u002Fb> treating local inference as if it were already a secure AI product.",{},{"id":284,"data":716,"type":289,"tunes":719},{"text":717,"caption":718,"alignment":288},"The model is the easiest part. The application layer is where the product value lives.","Architecture principle",{},{"id":292,"data":721,"type":42,"tunes":723},{"text":722,"level":260},"Demo, PoC, and Production Are Different Stages",{},{"id":297,"data":725,"type":239,"tunes":727},{"text":726},"Many Open-LLM initiatives fail because teams confuse a working demo with a production capability. The difference is not cosmetic. Each maturity level has a different goal, different risk profile, and different engineering requirement.",{},{"id":302,"data":729,"type":325,"tunes":751},{"content":730,"stretched":43,"withHeadings":14},[731,736,741,746],[732,733,734,735],"Stage","What it proves","Typical setup","What is still missing",[737,738,739,740],"Demo","A model can answer a prompt locally.","Ollama on a laptop, one model, one prompt, no real data control.","Permissions, retrieval, logs, evaluation, deployment, monitoring, user workflow.",[742,743,744,745],"PoC","A small controlled system can answer questions over selected documents or workflows.","Basic web UI, ingestion script, vector search, limited users, limited document scope.","Scale, governance, test datasets, fallback strategy, auditability, support model.",[747,748,749,750],"Production","Multiple users can use the system safely and repeatedly inside real work.","Authenticated app, tenant isolation, RAG pipeline, observability, provider abstraction, backups, release process.","Continuous improvement, evaluation expansion, operational maturity.",{},{"id":328,"data":753,"type":239,"tunes":755},{"text":754},"A PoC can be intentionally small. Production cannot be intentionally blind. Once real users, private data, business decisions, and compliance expectations enter the system, the architecture must become explicit.",{},{"id":333,"data":757,"type":42,"tunes":759},{"text":758,"level":260},"Where RAG Fits In",{},{"id":338,"data":761,"type":239,"tunes":763},{"text":762},"\u003Cb>Retrieval-Augmented Generation\u003C\u002Fb> is the most common bridge between a language model and private business knowledge. The model does not magically know internal documents, contracts, tickets, product specs, or runbooks. The application must retrieve relevant context before asking the model to answer.",{},{"id":343,"data":765,"type":239,"tunes":767},{"text":766},"A practical RAG flow looks like this:",{},{"id":348,"data":769,"type":281,"tunes":781},{"meta":770,"items":771,"style":362},{"counterType":351},[772,773,774,775,776,777,778,779,780],"Documents are uploaded or synchronized from controlled sources.","Text is extracted, cleaned, and split into chunks.","Chunks receive metadata such as tenant, owner, document version, source URL, access scope, and timestamp.","Embeddings are generated for each chunk.","Vectors are stored in pgvector, Qdrant, or another retrieval layer.","At query time, the application checks permissions before retrieval.","Relevant chunks are retrieved with similarity search and metadata filters.","The prompt builder injects selected context into the model request.","The answer is generated with citations, confidence boundaries, and no-answer fallback when retrieval is weak.",{},{"id":365,"data":783,"type":239,"tunes":785},{"text":784},"RAG reduces hallucinations, but it does not eliminate them. A poor chunking strategy, weak metadata, missing permission filters, low-quality embeddings, or overly broad retrieval can still produce convincing but wrong answers. Serious RAG systems need thresholds, citations, retrieval logs, and evaluation.",{},{"id":370,"data":787,"type":42,"tunes":789},{"text":788,"level":260},"A Practical Local Open-LLM Architecture",{},{"id":375,"data":791,"type":239,"tunes":793},{"text":792},"A realistic production path does not require exotic infrastructure. For many teams, a strong first architecture can use a normal web stack: Nuxt for the frontend, a Nitro or Node API, PostgreSQL as the system of record, pgvector for retrieval, Ollama as a local runtime, Prisma for data access, and background workers for ingestion and embeddings.",{},{"id":380,"data":795,"type":383,"tunes":797},{"code":796},"User question | v\nFrontend UI | v\nAPI \u002F Backend | +--> Authentication +--> Tenant and role permission check | v\nRetrieval layer | +--> PostgreSQL metadata +--> pgvector or Qdrant vector search +--> similarity threshold | v\nPrompt builder | +--> system prompt +--> retrieved chunks +--> source references +--> no-answer rules | v\nLLM provider abstraction | +--> Ollama \u002F local model +--> cloud model fallback +--> future self-hosted runtime | v\nAnswer with sources | v\nLogs, traces, metrics, evaluation dataset",{},{"id":386,"data":799,"type":239,"tunes":801},{"text":800},"This architecture keeps the model replaceable. Ollama can be the first runtime, but the system should not be locked to one inference engine. A clean architecture separates user workflow, retrieval, prompt construction, model provider, and observability.",{},{"id":391,"data":803,"type":281,"tunes":814},{"meta":804,"items":805,"style":280},{},[806,807,808,809,810,811,812,813],"\u003Cb>Frontend:\u003C\u002Fb> Nuxt or another web UI for authenticated user workflows.","\u003Cb>Backend\u002FAPI:\u003C\u002Fb> Nitro, Node.js, or FastAPI for orchestration, permissions, and provider routing.","\u003Cb>Database:\u003C\u002Fb> PostgreSQL for documents, users, tenants, roles, prompts, logs, and metadata.","\u003Cb>Vector search:\u003C\u002Fb> pgvector for simple integrated retrieval or Qdrant when vector search becomes a dedicated service.","\u003Cb>Model runtime:\u003C\u002Fb> Ollama for local execution, llama.cpp server for lightweight serving, or vLLM for higher-throughput GPU serving.","\u003Cb>Storage:\u003C\u002Fb> local filesystem or S3-compatible object storage for uploaded files and extracted artifacts.","\u003Cb>Workers:\u003C\u002Fb> background ingestion, chunking, embedding, re-indexing, and document version processing.","\u003Cb>Observability:\u003C\u002Fb> logs, metrics, prompt traces, retrieval traces, latency tracking, and evaluation results.",{},{"id":405,"data":816,"type":42,"tunes":818},{"text":817,"level":260},"The Production Readiness Checklist",{},{"id":410,"data":820,"type":239,"tunes":822},{"text":821},"The following checklist is the difference between a local model demo and a usable Open-LLM application:",{},{"id":415,"data":824,"type":281,"tunes":844},{"meta":825,"items":826,"style":280},{},[827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843],"Every document and chunk has a tenant_id.","Retrieval is blocked until user and role permissions are checked.","Documents include metadata, source, owner, version, lifecycle state, and retention policy.","Chunking strategy is documented and tested against real documents.","Embedding model selection is explicit and versioned.","Vector index configuration is reproducible.","Similarity threshold prevents weak context from being used blindly.","Answers include source citations or source references where possible.","No-answer fallback is used when retrieval confidence is too low.","Prompt templates are versioned and release-controlled.","LLM provider abstraction is built from the start.","Structured output is validated before downstream use.","Evaluation dataset contains real questions, expected sources, and unacceptable answers.","Retrieval logs show which chunks were used for each answer.","Latency, token usage, GPU\u002FCPU load, and error rates are monitored.","Privacy and retention rules cover uploads, extracted text, chunks, embeddings, prompts, responses, and logs.","Deployment, backup, restore, rollback, and incident paths are documented.",{},{"id":438,"data":846,"type":239,"tunes":848},{"text":847},"This connects directly with \u003Ca href=\"\u002Fenterprise\">Enterprise Delivery OS\u003C\u002Fa>: useful AI is not only a model decision. It is delivery discipline, evidence, controls, metrics, and operational ownership.",{},{"id":443,"data":850,"type":42,"tunes":852},{"text":851,"level":260},"Provider Abstraction: Do Not Marry One Model",{},{"id":448,"data":854,"type":239,"tunes":856},{"text":855},"Local models are valuable for privacy-sensitive use cases, offline scenarios, cost control, and internal experimentation. Cloud models may still be stronger for difficult reasoning, coding, multilingual accuracy, or multimodal work. A production application should not treat any one model as permanent infrastructure.",{},{"id":453,"data":858,"type":239,"tunes":860},{"text":859},"A provider abstraction allows the same application workflow to call Ollama, OpenAI, Gemini, Anthropic, Mistral, vLLM, or another self-hosted endpoint without rewriting the product. The application decides the provider based on use case, data sensitivity, latency, cost, and quality requirements.",{},{"id":458,"data":862,"type":383,"tunes":863},{"code":460},{},{"id":463,"data":865,"type":239,"tunes":867},{"text":866},"The key idea is not the TypeScript syntax. The key idea is the boundary. The application owns permissions, retrieval, prompt rules, tracing, and evaluation. The provider only produces the model output.",{},{"id":468,"data":869,"type":42,"tunes":870},{"text":470,"level":260},{},{"id":473,"data":872,"type":239,"tunes":874},{"text":873},"For many Open-LLM applications, the vector store decision is simple at the beginning: if PostgreSQL is already your system of record, \u003Cb>pgvector\u003C\u002Fb> is a strong starting point. It keeps metadata, permissions, document records, and vectors close together. That reduces operational complexity.",{},{"id":478,"data":876,"type":239,"tunes":878},{"text":877},"\u003Cb>Qdrant\u003C\u002Fb> becomes more attractive when vector search needs to become a dedicated service: larger retrieval scale, advanced filtering, specialized indexing, hybrid search patterns, or independent scaling of retrieval infrastructure.",{},{"id":483,"data":880,"type":325,"tunes":900},{"content":881,"stretched":43,"withHeadings":14},[882,887,891,895],[883,884,885,886],"Option","Best fit","Strengths","Trade-offs",[492,888,889,890],"PoCs, early production, systems already built on PostgreSQL.","Single database, SQL joins, ACID behavior, simpler operations, metadata close to vectors.","Less specialized than a dedicated vector database at large retrieval scale.",[497,892,893,894],"Dedicated semantic search services, larger vector workloads, advanced filtering and retrieval patterns.","Purpose-built vector search, strong filtering model, independent scaling, retrieval-focused APIs.","Adds another infrastructure component and operational surface.",[896,897,898,899],"Start simple","Most enterprise teams beginning with private RAG applications.","Lower architecture risk, faster delivery, easier audit path.","May need migration later if retrieval becomes central and high-scale.",{},{"id":508,"data":902,"type":239,"tunes":904},{"text":903},"A practical rule: start with pgvector when PostgreSQL already owns your business data and the retrieval scale is moderate. Move to Qdrant when vector search becomes a product capability of its own.",{},{"id":513,"data":906,"type":42,"tunes":908},{"text":907,"level":260},"Security and Privacy Reality Check",{},{"id":518,"data":910,"type":239,"tunes":912},{"text":911},"Local inference does not automatically mean secure AI. It only means the model execution can happen locally. The full data path still matters: uploaded files, extracted text, chunks, embeddings, logs, prompts, responses, backups, developer access, admin tools, and analytics exports.",{},{"id":523,"data":914,"type":239,"tunes":916},{"text":915},"Embeddings also deserve care. They are not the original document, but they still represent information derived from sensitive content. Treat them as part of the protected data path, especially when they are tied to metadata, source records, user queries, or tenant identifiers.",{},{"id":528,"data":918,"type":281,"tunes":927},{"meta":919,"items":920,"style":280},{},[921,922,923,924,925,926],"Do not index documents before access rules are known.","Do not retrieve chunks without tenant and role filters.","Do not log full prompts and responses without retention rules.","Do not send sensitive context to a cloud model unless the policy allows it.","Do not assume that local equals GDPR-compliant; compliance depends on the complete processing design.","Do not let evaluation and debugging copies become uncontrolled shadow datasets.",{},{"id":540,"data":929,"type":239,"tunes":931},{"text":930},"This is where \u003Ca href=\"\u002Fblog\u002Fenterprise-grade-multi-tenant-architecture-for-an-international-platform\">multi-instance SaaS architecture\u003C\u002Fa> matters. If tenants, roles, data ownership, and operational boundaries are weak, adding a local LLM can amplify risk instead of reducing it.",{},{"id":545,"data":933,"type":42,"tunes":935},{"text":934,"level":260},"Evaluation Is Not Optional",{},{"id":550,"data":937,"type":239,"tunes":939},{"text":938},"A production Open-LLM application needs an evaluation loop. Without it, teams only have anecdotes. A few good demo answers do not prove that retrieval works, that the prompt is stable, or that the model behaves safely across real usage.",{},{"id":555,"data":941,"type":239,"tunes":943},{"text":942},"A minimal evaluation dataset should include real user questions, expected source documents, unacceptable answers, no-answer cases, and regression tests for previous failures. Every change to chunking, embeddings, prompts, model provider, or retrieval threshold should be tested against that dataset.",{},{"id":560,"data":945,"type":281,"tunes":953},{"meta":946,"items":947,"style":280},{},[948,949,950,951,952],"\u003Cb>Retrieval evaluation:\u003C\u002Fb> Did the system fetch the right source chunks?","\u003Cb>Answer evaluation:\u003C\u002Fb> Did the answer stay grounded in the retrieved context?","\u003Cb>Safety evaluation:\u003C\u002Fb> Did the system avoid forbidden disclosures or unauthorized data?","\u003Cb>Operational evaluation:\u003C\u002Fb> Did latency, failure rate, and cost stay inside acceptable limits?","\u003Cb>Regression evaluation:\u003C\u002Fb> Did a model or prompt upgrade break previously correct behavior?",{},{"id":571,"data":955,"type":239,"tunes":957},{"text":956},"RAG reduces hallucinations, but it does not remove the need for evaluation. Evaluation is the control loop that turns a clever prototype into an improving product.",{},{"id":576,"data":959,"type":42,"tunes":961},{"text":960,"level":260},"Deployment Discipline: The Model Is a Release Event",{},{"id":581,"data":963,"type":239,"tunes":965},{"text":964},"Changing a model is not a harmless configuration tweak. It can change answer style, reasoning behavior, language quality, latency, token usage, citation discipline, and failure modes. In production, model upgrades should be handled like release events.",{},{"id":586,"data":967,"type":239,"tunes":969},{"text":968},"That means versioning prompts, embedding models, retrieval settings, model identifiers, provider routes, and evaluation results. It also means having rollback logic. If a new model causes worse retrieval-grounded answers or breaks structured output, the system needs a controlled path back to the known-good configuration.",{},{"id":591,"data":971,"type":239,"tunes":973},{"text":972},"This fits the same operating logic as \u003Ca href=\"\u002Fenterprise\u002Freference-models\u002Fdelivery-and-change\">Delivery &amp; Change\u003C\u002Fa> and \u003Ca href=\"\u002Fenterprise\u002Freference-models\u002Fdigital-platform\">AI-ready platform architecture\u003C\u002Fa>: stable delivery requires repeatable controls, not heroic manual fixes.",{},{"id":596,"data":975,"type":42,"tunes":977},{"text":976,"level":260},"Conclusion: Production Begins Where the Demo Ends",{},{"id":601,"data":979,"type":239,"tunes":981},{"text":980},"Ollama can start the journey. It makes local model execution accessible and lowers the barrier to experimentation. That is valuable. But the production application begins where the demo ends.",{},{"id":606,"data":983,"type":239,"tunes":985},{"text":984},"The model is only one replaceable component. The real product is the controlled system around it: ingestion, permissions, retrieval, prompts, provider routing, evaluation, logs, monitoring, deployment, backup, and user workflow. That is where privacy becomes real, quality becomes measurable, and business value becomes repeatable.",{},{"id":611,"data":987,"type":239,"tunes":989},{"text":988},"A serious Open-LLM application is built through engineering discipline, not by running a local model once. Ollama can start the journey, but the production application begins where the demo ends.",{},{"id":616,"data":991,"type":239,"tunes":993},{"text":992},"Theme:",{},{"id":621,"data":995,"type":239,"tunes":997},{"text":996},"Ollama, Open LLM, RAG, pgvector, Qdrant, Local AI, LLMOps, Provider Abstraction, Enterprise AI Architecture",{},"2.31.5","Running a local model with Ollama is easy. Building a production-ready Open-LLM application is harder: it requires RAG, access control, provider abstraction, evaluation, logging, deployment discipline and a controlled application layer around the model.\n",{"lang":7,"title":224,"content":226,"contentJson":1001,"excerpt":626},{"time":228,"blocks":1002,"version":625},[1003,1006,1009,1012,1015,1018,1021,1024,1027,1032,1035,1038,1041,1049,1052,1055,1058,1061,1066,1069,1072,1075,1078,1081,1086,1089,1092,1097,1100,1103,1106,1109,1112,1115,1118,1121,1124,1132,1135,1138,1141,1144,1149,1152,1155,1158,1161,1166,1169,1172,1175,1178,1181,1184,1187,1190,1193,1196],{"id":231,"data":1004,"type":42,"tunes":1005},{"text":233,"level":40},{},{"id":236,"data":1007,"type":239,"tunes":1008},{"text":238},{},{"id":242,"data":1010,"type":239,"tunes":1011},{"text":244},{},{"id":247,"data":1013,"type":239,"tunes":1014},{"text":249},{},{"id":252,"data":1016,"type":239,"tunes":1017},{"text":254},{},{"id":257,"data":1019,"type":42,"tunes":1020},{"text":259,"level":260},{},{"id":263,"data":1022,"type":239,"tunes":1023},{"text":265},{},{"id":268,"data":1025,"type":239,"tunes":1026},{"text":270},{},{"id":273,"data":1028,"type":281,"tunes":1031},{"meta":1029,"items":1030,"style":280},{},[277,278,279],{},{"id":284,"data":1033,"type":289,"tunes":1034},{"text":286,"caption":287,"alignment":288},{},{"id":292,"data":1036,"type":42,"tunes":1037},{"text":294,"level":260},{},{"id":297,"data":1039,"type":239,"tunes":1040},{"text":299},{},{"id":302,"data":1042,"type":325,"tunes":1048},{"content":1043,"stretched":43,"withHeadings":14},[1044,1045,1046,1047],[306,307,308,309],[311,312,313,314],[316,317,318,319],[321,322,323,324],{},{"id":328,"data":1050,"type":239,"tunes":1051},{"text":330},{},{"id":333,"data":1053,"type":42,"tunes":1054},{"text":335,"level":260},{},{"id":338,"data":1056,"type":239,"tunes":1057},{"text":340},{},{"id":343,"data":1059,"type":239,"tunes":1060},{"text":345},{},{"id":348,"data":1062,"type":281,"tunes":1065},{"meta":1063,"items":1064,"style":362},{"counterType":351},[353,354,355,356,357,358,359,360,361],{},{"id":365,"data":1067,"type":239,"tunes":1068},{"text":367},{},{"id":370,"data":1070,"type":42,"tunes":1071},{"text":372,"level":260},{},{"id":375,"data":1073,"type":239,"tunes":1074},{"text":377},{},{"id":380,"data":1076,"type":383,"tunes":1077},{"code":382},{},{"id":386,"data":1079,"type":239,"tunes":1080},{"text":388},{},{"id":391,"data":1082,"type":281,"tunes":1085},{"meta":1083,"items":1084,"style":280},{},[395,396,397,398,399,400,401,402],{},{"id":405,"data":1087,"type":42,"tunes":1088},{"text":407,"level":260},{},{"id":410,"data":1090,"type":239,"tunes":1091},{"text":412},{},{"id":415,"data":1093,"type":281,"tunes":1096},{"meta":1094,"items":1095,"style":280},{},[419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435],{},{"id":438,"data":1098,"type":239,"tunes":1099},{"text":440},{},{"id":443,"data":1101,"type":42,"tunes":1102},{"text":445,"level":260},{},{"id":448,"data":1104,"type":239,"tunes":1105},{"text":450},{},{"id":453,"data":1107,"type":239,"tunes":1108},{"text":455},{},{"id":458,"data":1110,"type":383,"tunes":1111},{"code":460},{},{"id":463,"data":1113,"type":239,"tunes":1114},{"text":465},{},{"id":468,"data":1116,"type":42,"tunes":1117},{"text":470,"level":260},{},{"id":473,"data":1119,"type":239,"tunes":1120},{"text":475},{},{"id":478,"data":1122,"type":239,"tunes":1123},{"text":480},{},{"id":483,"data":1125,"type":325,"tunes":1131},{"content":1126,"stretched":43,"withHeadings":14},[1127,1128,1129,1130],[487,488,489,490],[492,493,494,495],[497,498,499,500],[502,503,504,505],{},{"id":508,"data":1133,"type":239,"tunes":1134},{"text":510},{},{"id":513,"data":1136,"type":42,"tunes":1137},{"text":515,"level":260},{},{"id":518,"data":1139,"type":239,"tunes":1140},{"text":520},{},{"id":523,"data":1142,"type":239,"tunes":1143},{"text":525},{},{"id":528,"data":1145,"type":281,"tunes":1148},{"meta":1146,"items":1147,"style":280},{},[532,533,534,535,536,537],{},{"id":540,"data":1150,"type":239,"tunes":1151},{"text":542},{},{"id":545,"data":1153,"type":42,"tunes":1154},{"text":547,"level":260},{},{"id":550,"data":1156,"type":239,"tunes":1157},{"text":552},{},{"id":555,"data":1159,"type":239,"tunes":1160},{"text":557},{},{"id":560,"data":1162,"type":281,"tunes":1165},{"meta":1163,"items":1164,"style":280},{},[564,565,566,567,568],{},{"id":571,"data":1167,"type":239,"tunes":1168},{"text":573},{},{"id":576,"data":1170,"type":42,"tunes":1171},{"text":578,"level":260},{},{"id":581,"data":1173,"type":239,"tunes":1174},{"text":583},{},{"id":586,"data":1176,"type":239,"tunes":1177},{"text":588},{},{"id":591,"data":1179,"type":239,"tunes":1180},{"text":593},{},{"id":596,"data":1182,"type":42,"tunes":1183},{"text":598,"level":260},{},{"id":601,"data":1185,"type":239,"tunes":1186},{"text":603},{},{"id":606,"data":1188,"type":239,"tunes":1189},{"text":608},{},{"id":611,"data":1191,"type":239,"tunes":1192},{"text":613},{},{"id":616,"data":1194,"type":239,"tunes":1195},{"text":618},{},{"id":621,"data":1197,"type":239,"tunes":1198},{"text":623},{},"Post erfolgreich abgerufen",{"items":1201,"source":1285,"manualIds":1286,"manualMatchedIds":1287},[1202,1209,1216,1223,1230,1237,1244,1251,1258,1264,1271,1278],{"id":1203,"slug":1204,"title":1205,"excerpt":1206,"featuredImage":1207,"publishedAt":1208},"475","managed-agent-harness-vs-self-hosted-agent-loop-what-you-gain-what-you-lose","托管代理框架与自托管代理循环：你得到什么，失去什么","“自托管代理”可能意味着截然不同的架构。本指南区分了托管式运行框架、自托管执行环境和完全自主运营的代理循环——并说明了团队实际需要哪种控制边界。","\u002Fuploads\u002F2026\u002F09\u002Fmanaged-agent-harness-vs-self-hosted-agent-loop-what-you-gain-what-you-lose-1790352403475-kj10jh.webp","2026-09-25T12:05:00.000Z",{"id":1210,"slug":1211,"title":1212,"excerpt":1213,"featuredImage":1214,"publishedAt":1215},"361","model-view-controller-mvc","模型-视图-控制器（MVC）：现代Web应用的结构支柱","模型-视图-控制器（通常简称为MVC）依然是软件开发中最经久不衰的架构模式之一。它为团队提供了一种实用的方法，将业务逻辑、展示层和用户交互分离，从而使应用程序更易于构建、扩展、测试和维护。本文阐述了MVC是什么、为何至今仍具重要性、它在当今Web技术栈中的定位，以及它如何与更广泛的平台架构、交付质量、迁移策略和运维成熟度相连接。","\u002Fuploads\u002F2026\u002F03\u002Fmodel-view-controller-mvc-1774872805793-0bjubu.webp","2023-04-12T12:57:00.000Z",{"id":1217,"slug":1218,"title":1219,"excerpt":1220,"featuredImage":1221,"publishedAt":1222},"477","computer-use-agents-why-a-successful-demo-can-still-be-an-unreliable-system","计算机使用代理：为什么成功的演示仍可能是一个不可靠的系统","计算机使用代理如今能够完成令人印象深刻的浏览器和桌面工作流程，但一次成功的运行证明的是能力——而非可靠性。本文展示了如何测试可重复性、环境鲁棒性、长时程控制、状态感知、结果验证以及安全的目标处理。","\u002Fuploads\u002F2026\u002F09\u002Fcomputer-use-agents-why-a-successful-demo-can-still-be-an-unreliable-system-1790352854690-75qnrg.webp","2026-09-25T12:13:00.000Z",{"id":1224,"slug":1225,"title":1226,"excerpt":1227,"featuredImage":1228,"publishedAt":1229},"445","qwen-3-6-in-production-release-runbook-ai-rollback-and-llmops-versioning","Qwen 3.6 生产环境部署：发布手册、AI 回滚与 LLMOps 版本管理","Qwen 3.6 不仅仅是一次模型升级。它同时是一个发布事件、一个回滚场景和一个版本管理问题。本文通过LLMOps规范、提示词与模型可追溯性、受控发布以及基于证据的回滚准备，阐述了在生产环境中应如何处理Qwen 3.6。","\u002Fuploads\u002F2026\u002F02\u002Fnew-qwen-3-5-plus-1771515512741-dcbi9p.webp","2026-05-04T02:49:00.000Z",{"id":1231,"slug":1232,"title":1233,"excerpt":1234,"featuredImage":1235,"publishedAt":1236},"460","ai-agent-reliability-why-the-final-answer-is-not-enough","AI Agent可靠性：为什么最终答案并不足够","正确的输出并不能证明推理的正确性、执行的安全性，或系统的可信赖性。","\u002Fuploads\u002F2026\u002F09\u002Fai-agent-reliability-why-the-final-answer-is-not-enough-1788955466306-pl0qhz.webp","2026-09-09T04:01:00.000Z",{"id":1238,"slug":1239,"title":1240,"excerpt":1241,"featuredImage":1242,"publishedAt":1243},"468","ai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context","AI代理记忆不是RAG：如何区分记忆、检索、状态和上下文","代理记忆、RAG、状态和上下文经常被当作可以互换的概念来使用。它们并不是。这个实用的架构模型将这四个层次区分开来，展示了每一层各自应处的位置，并解释了当系统将它们合并为一层时会出现什么问题。","\u002Fuploads\u002F2026\u002F09\u002Fai-agent-memory-is-not-rag-how-to-separate-memory-retrieval-state-and-context-1790350560308-np0xy6.webp","2026-09-25T11:34:00.000Z",{"id":1245,"slug":1246,"title":1247,"excerpt":1248,"featuredImage":1249,"publishedAt":1250},"364","tipps-fuer-die-verbesserung-der-seo-suchmaschinenoptimierung","Mastering the SEO Workflow: Essential Optimization Strategies for Organic Growth","A structured SEO workflow is crucial for sustainable organic growth. Learn the ten foundational strategies, from keyword research and technical optimization to content quality and performance analysis.","\u002Fuploads\u002F2026\u002F03\u002Ftipps-fuer-die-verbesserung-der-seo-suchmaschinenoptimierung-1774866098131-hwkzrg.webp","2024-01-26T06:35:00.000Z",{"id":1252,"slug":1253,"title":1254,"excerpt":1255,"featuredImage":1256,"publishedAt":1257},"479","where-does-an-llm-get-its-data-rag-data-sources-in-python","LLM从哪里获取数据？Python中的RAG数据源","LLM 并不会神奇地知道你的文件、数据库或 API。这个 RAG 系列的实用续篇用简单的 Python 展示了外部数据如何变成可检索的证据：从文本文件和 SQL 到全文搜索、嵌入、上下文组装以及最终的 LLM 调用。","\u002Fuploads\u002F2026\u002F09\u002Fwhere-does-an-llm-get-its-data-rag-data-sources-in-python-1790517200521-nfsi5i.webp","2026-09-27T05:51:00.000Z",{"id":1259,"slug":658,"title":1260,"excerpt":1261,"featuredImage":1262,"publishedAt":1263},"434","全面评估指南：精通LLM性能评估","本指南详细介绍了评估工具（Evaluation Harness），这是一个在企业级LLMOps流程中严格评估大型语言模型（LLM）能力的关键框架。您将学习其设置方法、最佳实践以及高级技巧，以确保模型基准测试与优化的可靠性。","\u002Fuploads\u002F2026\u002F04\u002Fevaluation-harness-1775466944495-4s0xv2.webp","2026-03-01T17:50:00.000Z",{"id":1265,"slug":1266,"title":1267,"excerpt":1268,"featuredImage":1269,"publishedAt":1270},"480","when-should-an-ai-stop-trusting-its-own-knowledge-the-retrieval-trigger","人工智能何时应停止信任自身知识？——检索触发机制","AI 模型并非每个问题都需要检索。重要的问题在于知道何时其内部知识已不再足够。检索触发器是一个实用的决策边界，它决定 AI 系统何时应停止仅依赖模型知识，并在回答前获取外部证据。","\u002Fuploads\u002F2026\u002F09\u002Fwhen-should-an-ai-stop-trusting-its-own-knowledge-the-retrieval-trigger-1790574991244-f4rpyg.webp","2026-09-28T01:49:00.000Z",{"id":1272,"slug":1273,"title":1274,"excerpt":1275,"featuredImage":1276,"publishedAt":1277},"478","what-is-rag-the-simplest-explanation-of-how-it-works","什么是RAG？对其工作原理的最简单解释","RAG听起来很复杂，但想法很简单：在AI回答之前，它先从知识源查找有用的信息，并将该信息提供给语言模型。本指南使用一个简单的思维模型来解释RAG、LLM、状态、记忆和工具。","\u002Fuploads\u002F2026\u002F09\u002Fwhat-is-rag-the-simplest-explanation-of-how-it-works-1790377492124-khjagt.webp","2026-09-25T19:03:00.000Z",{"id":1279,"slug":1280,"title":1281,"excerpt":1282,"featuredImage":1283,"publishedAt":1284},"381","enterprise-grade-multi-tenant-architecture-for-an-international-platform","企业级多租户架构，适用于国际平台","Loving Rocks 是一款企业级婚礼平台，采用真正的多租户架构设计，实现租户间数据库隔离，并内置国际化支持，以确保全球可扩展性、安全性及长期运营稳定性。","\u002Fuploads\u002F2026\u002F01\u002Fenterprise-grade-multi-tenant-architecture-for-an-international-platform-1769789121298-b6v7ak.webp","2026-01-30T12:04:00.000Z","fallback",[],[]]