<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Knowledge Base on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/knowledge-base/</link>
        <description>Recent content in Knowledge Base on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sun, 17 May 2026 17:15:08 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/knowledge-base/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>OpenKB: Compiling Documents into a Continuously Updated LLM Knowledge Base</title>
        <link>https://knightli.com/en/2026/05/17/openkb-llm-knowledge-base/</link>
        <pubDate>Sun, 17 May 2026 17:15:08 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/17/openkb-llm-knowledge-base/</guid>
        <description>&lt;p&gt;OpenKB is an open-source LLM knowledge base tool from VectifyAI.&lt;/p&gt;
&lt;p&gt;It is not a traditional RAG system that chunks documents, vectorizes them, and then stitches context back together at query time. Instead, it first compiles raw documents into a structured wiki: document summaries, concept pages, cross-references, follow-up queries, and lint checks. In other words, it feels more like a knowledge-base CLI that keeps organizing your material over time.&lt;/p&gt;
&lt;p&gt;Project link: &lt;a class=&#34;link&#34; href=&#34;https://github.com/VectifyAI/OpenKB&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/VectifyAI/OpenKB&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-short-version&#34;&gt;The Short Version
&lt;/h2&gt;&lt;p&gt;OpenKB is worth watching for three reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It outputs the knowledge base as ordinary Markdown files instead of locking it inside a dedicated database.&lt;/li&gt;
&lt;li&gt;It uses PageIndex for long PDFs, focusing on vector-database-free retrieval for long documents.&lt;/li&gt;
&lt;li&gt;It emphasizes &amp;ldquo;knowledge compilation&amp;rdquo;: the LLM generates summaries, concept pages, and cross-links instead of retrieving from scratch on every question.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That makes OpenKB better suited to long-term knowledge accumulation: paper reading, project documentation, internal company materials, technical standards, product research, and personal knowledge bases.&lt;/p&gt;
&lt;p&gt;It is not a universal replacement. If you need high-concurrency online Q&amp;amp;A, complex permissions, a web admin console, enterprise audit trails, or large-scale multi-tenancy, OpenKB currently looks more like a developer tool and knowledge-base prototype than a complete enterprise knowledge platform.&lt;/p&gt;
&lt;h2 id=&#34;what-openkb-is&#34;&gt;What OpenKB Is
&lt;/h2&gt;&lt;p&gt;OpenKB stands for Open Knowledge Base.&lt;/p&gt;
&lt;p&gt;It works as a CLI: it converts, organizes, summarizes, and writes documents into a set of wiki files. The official README describes it directly: OpenKB uses LLMs to compile raw documents into a structured, interlinked wiki-style knowledge base, with PageIndex providing vectorless long-document retrieval.&lt;/p&gt;
&lt;p&gt;Supported input formats include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PDF&lt;/li&gt;
&lt;li&gt;Word&lt;/li&gt;
&lt;li&gt;Markdown&lt;/li&gt;
&lt;li&gt;PowerPoint&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;Excel&lt;/li&gt;
&lt;li&gt;Plain text&lt;/li&gt;
&lt;li&gt;Other formats that markitdown can convert&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The generated knowledge base lives under &lt;code&gt;wiki/&lt;/code&gt; and mainly includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;index.md&lt;/code&gt;: knowledge base overview&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log.md&lt;/code&gt;: operation timeline&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;: knowledge base structure and maintenance instructions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sources/&lt;/code&gt;: converted source text&lt;/li&gt;
&lt;li&gt;&lt;code&gt;summaries/&lt;/code&gt;: summaries for each document&lt;/li&gt;
&lt;li&gt;&lt;code&gt;concepts/&lt;/code&gt;: cross-document concept pages&lt;/li&gt;
&lt;li&gt;&lt;code&gt;explorations/&lt;/code&gt;: saved query results&lt;/li&gt;
&lt;li&gt;&lt;code&gt;reports/&lt;/code&gt;: lint reports&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The biggest benefit of this design is transparency. You can open the Markdown files directly instead of only receiving answers through a black-box retrieval interface.&lt;/p&gt;
&lt;h2 id=&#34;how-it-differs-from-traditional-rag&#34;&gt;How It Differs from Traditional RAG
&lt;/h2&gt;&lt;p&gt;A typical traditional RAG pipeline looks like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Chunk the documents.&lt;/li&gt;
&lt;li&gt;Generate embeddings.&lt;/li&gt;
&lt;li&gt;Store them in a vector database.&lt;/li&gt;
&lt;li&gt;Retrieve relevant chunks at query time.&lt;/li&gt;
&lt;li&gt;Feed those chunks to the LLM to generate an answer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That workflow is mature and works well for Q&amp;amp;A systems. But it has one problem: the knowledge itself does not really accumulate. Every question repeats the work of finding chunks, assembling context, and generating an answer.&lt;/p&gt;
&lt;p&gt;OpenKB is closer to &amp;ldquo;organize first, ask later&amp;rdquo;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Documents enter &lt;code&gt;raw/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Short documents are converted to Markdown with markitdown.&lt;/li&gt;
&lt;li&gt;Long PDFs go through PageIndex to produce tree indexes and summaries.&lt;/li&gt;
&lt;li&gt;The LLM generates document summaries.&lt;/li&gt;
&lt;li&gt;The LLM reads existing concept pages and creates or updates cross-document concepts.&lt;/li&gt;
&lt;li&gt;The knowledge base index, log, and cross-links are updated.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As a result, adding one document does more than create another searchable file. It may update a dozen wiki pages. Knowledge is written into concept pages and connected to existing material.&lt;/p&gt;
&lt;p&gt;This is closer to how humans maintain knowledge bases: when new material arrives, you do not just archive it; you update topic pages, summarize differences, and add references.&lt;/p&gt;
&lt;h2 id=&#34;what-pageindex-solves&#34;&gt;What PageIndex Solves
&lt;/h2&gt;&lt;p&gt;Long documents have always been difficult for RAG and LLM knowledge bases.&lt;/p&gt;
&lt;p&gt;If you simply split a long PDF into many chunks, several problems appear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Chapter relationships are lost.&lt;/li&gt;
&lt;li&gt;Tables, images, and footnotes are hard to handle.&lt;/li&gt;
&lt;li&gt;Retrieved snippets are too fragmented, so answers lack global structure.&lt;/li&gt;
&lt;li&gt;Even a large context window is not ideal for stuffing an entire document into the prompt.&lt;/li&gt;
&lt;li&gt;Long summary chains can compress away important details.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OpenKB uses PageIndex for long PDFs. According to the project description, PageIndex builds tree indexes and summaries for long documents, letting the LLM reason over the document tree instead of reading the whole document directly.&lt;/p&gt;
&lt;p&gt;The focus is not &amp;ldquo;the few text snippets with the highest vector similarity.&amp;rdquo; It is about helping the model use document hierarchy to find relevant content. For research reports, papers, manuals, prospectuses, and compliance documents, this direction makes a lot of sense.&lt;/p&gt;
&lt;p&gt;OpenKB can use the open-source PageIndex locally by default. If you need OCR, complex PDF handling, or faster structure generation, you can configure &lt;code&gt;PAGEINDEX_API_KEY&lt;/code&gt; to use PageIndex Cloud.&lt;/p&gt;
&lt;h2 id=&#34;install-and-quick-start&#34;&gt;Install and Quick Start
&lt;/h2&gt;&lt;p&gt;Install OpenKB with pip:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install openkb
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or install the latest GitHub version:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install git+https://github.com/VectifyAI/OpenKB.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For editable source installation:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/VectifyAI/OpenKB.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; OpenKB
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install -e .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Create a knowledge base directory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir my-kb &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; my-kb
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb init
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Add documents:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb add paper.pdf
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb add ~/papers/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Ask a question:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb query &lt;span class=&#34;s2&#34;&gt;&amp;#34;What are the main findings?&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Start an interactive chat:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb chat
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want OpenKB to process new files automatically, use watch mode:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;openkb watch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After that, drop files into &lt;code&gt;raw/&lt;/code&gt;, and OpenKB will update the wiki automatically.&lt;/p&gt;
&lt;h2 id=&#34;llm-configuration&#34;&gt;LLM Configuration
&lt;/h2&gt;&lt;p&gt;OpenKB uses LiteLLM to support multiple model providers, including OpenAI, Claude, and Gemini.&lt;/p&gt;
&lt;p&gt;You can set the model during initialization, or configure it in &lt;code&gt;.openkb/config.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;gpt-5.4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;language&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;en&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;pageindex_threshold&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Model names follow LiteLLM&amp;rsquo;s &lt;code&gt;provider/model&lt;/code&gt; format. OpenAI models can omit the provider prefix:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;gpt-5.4&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Models such as Anthropic and Gemini are usually written like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;anthropic/claude-sonnet-4-6&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;gemini/gemini-3.1-pro-preview&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Put the API key in &lt;code&gt;.env&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;LLM_API_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;your_llm_api_key
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you enable PageIndex Cloud, add:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;PAGEINDEX_API_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;your_pageindex_api_key
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;common-commands&#34;&gt;Common Commands
&lt;/h2&gt;&lt;p&gt;OpenKB&amp;rsquo;s commands are developer-friendly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;openkb init&lt;/code&gt;: initialize a knowledge base.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb add &amp;lt;file_or_dir&amp;gt;&lt;/code&gt;: add a file or directory.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb remove &amp;lt;doc&amp;gt;&lt;/code&gt;: remove a document and clean up related wiki pages, images, registry entries, and PageIndex state.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb query &amp;quot;question&amp;quot;&lt;/code&gt;: ask a one-off question against the knowledge base.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb chat&lt;/code&gt;: enter a multi-turn conversation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb watch&lt;/code&gt;: monitor &lt;code&gt;raw/&lt;/code&gt; and update automatically.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb lint&lt;/code&gt;: check knowledge base structure and content health.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb list&lt;/code&gt;: list indexed documents and concepts.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;openkb status&lt;/code&gt;: show knowledge base statistics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;openkb chat&lt;/code&gt; is better than &lt;code&gt;openkb query&lt;/code&gt; for continuous exploration. It supports session resume, session listing, deletion, and slash commands such as &lt;code&gt;/status&lt;/code&gt;, &lt;code&gt;/list&lt;/code&gt;, &lt;code&gt;/add &amp;lt;path&amp;gt;&lt;/code&gt;, &lt;code&gt;/save&lt;/code&gt;, and &lt;code&gt;/lint&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;why-a-markdown-wiki-matters&#34;&gt;Why a Markdown Wiki Matters
&lt;/h2&gt;&lt;p&gt;Many knowledge-base tools are painful because of migration cost.&lt;/p&gt;
&lt;p&gt;Once material enters a proprietary database, index, or format, it becomes hard to inspect, edit, back up, or migrate directly. OpenKB writes the result as ordinary Markdown, which makes it naturally compatible with existing tools.&lt;/p&gt;
&lt;p&gt;The most direct use is opening &lt;code&gt;wiki/&lt;/code&gt; in Obsidian:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Summary pages can be read directly.&lt;/li&gt;
&lt;li&gt;Concept pages can connect through &lt;code&gt;[[wikilinks]]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Graph view can show relationships between knowledge items.&lt;/li&gt;
&lt;li&gt;Query results can be saved to &lt;code&gt;explorations/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AGENTS.md&lt;/code&gt; can define how the knowledge base should be maintained.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That makes OpenKB more than a Q&amp;amp;A tool. It can become a knowledge-organizing pipeline for individuals or teams.&lt;/p&gt;
&lt;h2 id=&#34;best-fit-scenarios&#34;&gt;Best-Fit Scenarios
&lt;/h2&gt;&lt;p&gt;OpenKB is especially useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reading papers and technical reports.&lt;/li&gt;
&lt;li&gt;Organizing project documentation.&lt;/li&gt;
&lt;li&gt;Building product research archives.&lt;/li&gt;
&lt;li&gt;Creating documentation knowledge bases around open-source projects.&lt;/li&gt;
&lt;li&gt;Organizing internal policies, meeting notes, and explanatory documents.&lt;/li&gt;
&lt;li&gt;Maintaining a personal Obsidian knowledge base automatically.&lt;/li&gt;
&lt;li&gt;Structuring long PDFs, PPTs, Word files, and web materials.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you often face piles of documents and want more than &amp;ldquo;ask one question, get one answer,&amp;rdquo; OpenKB&amp;rsquo;s direction is a good fit: it gradually turns material into a browsable, reusable, and traceable knowledge base.&lt;/p&gt;
&lt;h2 id=&#34;what-to-watch-out-for&#34;&gt;What to Watch Out For
&lt;/h2&gt;&lt;p&gt;First, OpenKB depends on LLM quality.&lt;/p&gt;
&lt;p&gt;Summaries, concept pages, and cross-links are generated by models. Stronger models usually produce more stable knowledge compilation; weaker models may struggle with concept extraction, contradiction detection, and cross-document synthesis.&lt;/p&gt;
&lt;p&gt;Second, estimate cost early.&lt;/p&gt;
&lt;p&gt;If you import many long documents at once, LLM calls may become expensive. Start with a small dataset, check the output structure and quality, and then expand.&lt;/p&gt;
&lt;p&gt;Third, the generated wiki still needs human review.&lt;/p&gt;
&lt;p&gt;OpenKB can organize material, but it does not automatically guarantee factual correctness. Important knowledge bases still need humans to review summaries, concept pages, and references.&lt;/p&gt;
&lt;p&gt;Fourth, be careful with sensitive material.&lt;/p&gt;
&lt;p&gt;If you use cloud LLMs or PageIndex Cloud, pay attention to privacy, trade secrets, and compliance requirements. For internal materials, confirm the model provider, data retention policy, and access boundaries first.&lt;/p&gt;
&lt;p&gt;Fifth, it is currently more of a CLI tool.&lt;/p&gt;
&lt;p&gt;The roadmap mentions a future Web UI, database-backed storage, support for large collections, and hierarchical concept indexing. At this stage, if teammates are not comfortable with the command line, there is still some adoption friction.&lt;/p&gt;
&lt;h2 id=&#34;relationship-with-obsidian-notebooklm-and-enterprise-rag&#34;&gt;Relationship with Obsidian, NotebookLM, and Enterprise RAG
&lt;/h2&gt;&lt;p&gt;OpenKB and Obsidian are best understood as an &amp;ldquo;automatic organization layer&amp;rdquo; plus a &amp;ldquo;reading and editing layer.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Obsidian is good for humans to write, edit, browse, and link notes. OpenKB is good for turning raw documents into a wiki that can enter Obsidian.&lt;/p&gt;
&lt;p&gt;OpenKB and NotebookLM differ more around local control and open file formats.&lt;/p&gt;
&lt;p&gt;NotebookLM is more direct for quickly asking questions and generating summaries after dropping in materials. OpenKB is better for developers who want the organized result to remain in a local directory and continue evolving as Markdown.&lt;/p&gt;
&lt;p&gt;OpenKB does not replace enterprise RAG; it complements it.&lt;/p&gt;
&lt;p&gt;Enterprise RAG cares more about permissions, auditability, service deployment, access isolation, monitoring, and stable throughput. OpenKB is better for building a readable, editable, long-lived knowledge layer. If you later build online Q&amp;amp;A, the wiki generated by OpenKB can also become a higher-quality corpus.&lt;/p&gt;
&lt;h2 id=&#34;a-recommended-workflow&#34;&gt;A Recommended Workflow
&lt;/h2&gt;&lt;p&gt;If you want to try OpenKB, start like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a test knowledge base directory.&lt;/li&gt;
&lt;li&gt;Add 3 to 5 documents on the same topic.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;openkb add&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;wiki/&lt;/code&gt; and inspect the summaries and concept pages.&lt;/li&gt;
&lt;li&gt;Ask a few specific questions with &lt;code&gt;openkb query&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;openkb lint&lt;/code&gt; to check knowledge-base health.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;wiki/&lt;/code&gt; in Obsidian and see whether the link graph is meaningful.&lt;/li&gt;
&lt;li&gt;Once quality looks good, import a larger document collection.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Do not throw in hundreds of files at the beginning. First see whether it understands your material type well, especially tables, images, long PDFs, and multi-document concept merging.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;OpenKB&amp;rsquo;s value is that it moves an LLM knowledge base one step earlier than &amp;ldquo;assemble context at query time&amp;rdquo;: organize the material into a wiki first, then ask questions, chat, lint, and keep maintaining that wiki.&lt;/p&gt;
&lt;p&gt;This direction is not right for every Q&amp;amp;A system, but it is well suited to knowledge work that needs long-term accumulation. Markdown files, Obsidian compatibility, PageIndex long-document handling, multi-model support, and a CLI workflow combine into a useful tool for developers and research-oriented users.&lt;/p&gt;
&lt;p&gt;If you have many PDFs, reports, web pages, papers, and project documents, OpenKB is worth trying. It may not immediately replace a mature enterprise knowledge base, but it can become a practical entry point for organizing material: first turn documents into readable, linked, traceable knowledge, then let the LLM work on top of that knowledge.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/VectifyAI/OpenKB&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;VectifyAI/OpenKB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://openkb.ai/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;OpenKB project page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://pageindex.ai/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;PageIndex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/microsoft/markitdown&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;markitdown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.litellm.ai/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;LiteLLM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>RAGFlow Project Notes: Features and Usage of an Open-Source RAG Engine</title>
        <link>https://knightli.com/en/2026/04/15/ragflow-rag-engine-guide/</link>
        <pubDate>Wed, 15 Apr 2026 22:09:25 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/15/ragflow-rag-engine-guide/</guid>
        <description>&lt;p&gt;&lt;code&gt;RAGFlow&lt;/code&gt; is an open-source RAG engine from &lt;code&gt;infiniflow&lt;/code&gt;. Its goal is not merely to provide a thin “upload documents and ask questions” shell, but to bring document parsing, chunking, retrieval, reranking, citation tracing, model configuration, agent capabilities, and API integration into one complete workflow.&lt;/p&gt;
&lt;p&gt;If you are building an enterprise knowledge base, document Q&amp;amp;A, a support assistant, internal information retrieval, or you want to give an LLM a more reliable context layer, RAGFlow is one of the open-source options worth serious attention.&lt;/p&gt;
&lt;h2 id=&#34;01-what-problem-ragflow-solves&#34;&gt;01 What Problem RAGFlow Solves
&lt;/h2&gt;&lt;p&gt;Most RAG systems run into three common issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Document parsing is unstable, especially for PDFs, scanned files, tables, images, and complex layouts.&lt;/li&gt;
&lt;li&gt;Chunking strategy is opaque, so retrieval may look correct while the actual context is incomplete.&lt;/li&gt;
&lt;li&gt;Answers lack trustworthy citations, making it hard for users to verify where the response came from.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;RAGFlow focuses on exactly these problems. The project README emphasizes &lt;code&gt;Deep document understanding&lt;/code&gt;, template-based chunking, chunk visualization, citation grounding, and multi-path retrieval with reranking. In other words, it cares more about “high-quality input leads to high-quality answers” than simply wiring a vector database to a chat UI.&lt;/p&gt;
&lt;h2 id=&#34;02-core-features&#34;&gt;02 Core Features
&lt;/h2&gt;&lt;h3 id=&#34;1-deep-document-understanding&#34;&gt;1. Deep Document Understanding
&lt;/h3&gt;&lt;p&gt;RAGFlow can extract knowledge from complex unstructured data. The README lists formats such as Word, PPT, Excel, TXT, images, scanned documents, structured data, and web pages.&lt;/p&gt;
&lt;p&gt;This matters a lot for enterprise knowledge bases. Real-world material is rarely clean Markdown. It is usually a mix of contracts, reports, tables, scanned PDFs, product manuals, screenshots, and web content. If parsing quality is weak, retrieval and LLM answers will both suffer.&lt;/p&gt;
&lt;h3 id=&#34;2-template-based-chunking&#34;&gt;2. Template-Based Chunking
&lt;/h3&gt;&lt;p&gt;RAGFlow provides template-based chunking. The value here is that chunking is not a black box; different document types can use different strategies.&lt;/p&gt;
&lt;p&gt;For example, articles, papers, tables, Q&amp;amp;A documents, image explanations, and contract clauses all need different chunk boundaries and granularity. Template-based chunking helps reduce problems like broken sentences, lost table context, and separated headings and body text.&lt;/p&gt;
&lt;h3 id=&#34;3-traceable-citations&#34;&gt;3. Traceable Citations
&lt;/h3&gt;&lt;p&gt;RAGFlow emphasizes grounded citations, meaning answers can be traced back to source passages. It also offers chunk visualization, making it easier for people to inspect and adjust parsing and chunking results.&lt;/p&gt;
&lt;p&gt;This is especially important in production. Internal enterprise Q&amp;amp;A is not only about producing something that “looks right”; it also has to be verifiable. For policy, compliance, finance, technical documents, and customer support content, citations and traceability are close to mandatory.&lt;/p&gt;
&lt;h3 id=&#34;4-automated-rag-workflow&#34;&gt;4. Automated RAG Workflow
&lt;/h3&gt;&lt;p&gt;RAGFlow turns the RAG lifecycle into a more complete workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a knowledge base&lt;/li&gt;
&lt;li&gt;Upload or sync data&lt;/li&gt;
&lt;li&gt;Parse documents&lt;/li&gt;
&lt;li&gt;Review and adjust chunks&lt;/li&gt;
&lt;li&gt;Configure LLM and embedding models&lt;/li&gt;
&lt;li&gt;Run multi-path retrieval and reranking&lt;/li&gt;
&lt;li&gt;Build chat assistants&lt;/li&gt;
&lt;li&gt;Integrate through APIs into business systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That makes it closer to a RAG platform than a single library. For teams, both the UI and the API matter: non-engineers can maintain the knowledge base, while engineers can integrate the capability into existing systems.&lt;/p&gt;
&lt;h3 id=&#34;5-agent-mcp-and-workflow-extensions&#34;&gt;5. Agent, MCP, and Workflow Extensions
&lt;/h3&gt;&lt;p&gt;Recent RAGFlow updates already include Agentic workflow, MCP, Agent Memory, and code execution components. That suggests it is no longer limited to traditional knowledge-base Q&amp;amp;A and is also moving toward agent-oriented scenarios.&lt;/p&gt;
&lt;p&gt;A typical pattern is that an agent can use RAGFlow as a reliable enterprise knowledge layer: retrieve from the knowledge base when it needs context, generate answers with citations, and combine that with tools or workflow steps when necessary.&lt;/p&gt;
&lt;h2 id=&#34;03-basic-usage-flow&#34;&gt;03 Basic Usage Flow
&lt;/h2&gt;&lt;p&gt;According to the official quickstart documentation, the common usage path for RAGFlow can be summarized in the following steps.&lt;/p&gt;
&lt;h3 id=&#34;1-prepare-the-environment&#34;&gt;1. Prepare the Environment
&lt;/h3&gt;&lt;p&gt;The basic requirements listed in the official README are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU &amp;gt;= 4 cores&lt;/li&gt;
&lt;li&gt;RAM &amp;gt;= 16 GB&lt;/li&gt;
&lt;li&gt;Disk &amp;gt;= 50 GB&lt;/li&gt;
&lt;li&gt;Docker &amp;gt;= 24.0.0&lt;/li&gt;
&lt;li&gt;Docker Compose &amp;gt;= v2.26.1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to use the sandbox for the code executor, you also need &lt;code&gt;gVisor&lt;/code&gt;. Another practical note is that the official Docker images mainly target x86 platforms. For ARM64, the project documentation recommends building the image yourself.&lt;/p&gt;
&lt;h3 id=&#34;2-clone-the-project&#34;&gt;2. Clone the Project
&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone https://github.com/infiniflow/ragflow.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; ragflow/docker
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;3-check-vmmax_map_count&#34;&gt;3. Check &lt;code&gt;vm.max_map_count&lt;/code&gt;
&lt;/h3&gt;&lt;p&gt;RAGFlow deployment depends on components such as Elasticsearch or OpenSearch, so on Linux you usually need to verify:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sysctl vm.max_map_count
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If the value is below &lt;code&gt;262144&lt;/code&gt;, you can set it temporarily:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo sysctl -w vm.max_map_count&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;262144&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want the change to persist after reboot, add it to &lt;code&gt;/etc/sysctl.conf&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;4-start-with-docker-compose&#34;&gt;4. Start with Docker Compose
&lt;/h3&gt;&lt;p&gt;You can start the CPU mode directly:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker compose -f docker-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want GPU acceleration for DeepDoc tasks, the README shows enabling &lt;code&gt;DEVICE=gpu&lt;/code&gt; in &lt;code&gt;.env&lt;/code&gt; before startup:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sed -i &lt;span class=&#34;s1&#34;&gt;&amp;#39;1i DEVICE=gpu&amp;#39;&lt;/span&gt; .env
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker compose -f docker-compose.yml up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then inspect the logs:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker logs -f docker-ragflow-cpu-1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Once the services are ready, open the machine address in your browser. Under the default configuration, that is typically:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://IP_OF_YOUR_MACHINE
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;5-configure-model-api-keys&#34;&gt;5. Configure Model API Keys
&lt;/h3&gt;&lt;p&gt;RAGFlow needs LLM and embedding model configuration. The README mentions choosing the default LLM factory in &lt;code&gt;service_conf.yaml.template&lt;/code&gt; and updating the corresponding &lt;code&gt;API_KEY&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In practice, you need to configure models according to your provider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Chat model&lt;/li&gt;
&lt;li&gt;Embedding model&lt;/li&gt;
&lt;li&gt;Rerank model&lt;/li&gt;
&lt;li&gt;Multimodal model, if you want to understand images inside PDFs or DOCX files&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;6-create-the-knowledge-base-and-upload-documents&#34;&gt;6. Create the Knowledge Base and Upload Documents
&lt;/h3&gt;&lt;p&gt;After the service starts, the typical workflow is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to the Web UI.&lt;/li&gt;
&lt;li&gt;Create a dataset or knowledge base.&lt;/li&gt;
&lt;li&gt;Upload documents or configure a data source sync.&lt;/li&gt;
&lt;li&gt;Wait for parsing to finish.&lt;/li&gt;
&lt;li&gt;Inspect chunk results and adjust them when necessary.&lt;/li&gt;
&lt;li&gt;Create a chat assistant and attach the knowledge base.&lt;/li&gt;
&lt;li&gt;Test answer quality and citation sources.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you need to integrate with a business system, you can continue with the RAGFlow API or SDK and connect retrieval and chat capabilities to your own application.&lt;/p&gt;
&lt;h2 id=&#34;04-suitable-scenarios&#34;&gt;04 Suitable Scenarios
&lt;/h2&gt;&lt;p&gt;RAGFlow fits these kinds of needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enterprise internal knowledge-base Q&amp;amp;A&lt;/li&gt;
&lt;li&gt;Product manuals, technical documentation, and FAQ retrieval&lt;/li&gt;
&lt;li&gt;Customer support and pre-sales assistants&lt;/li&gt;
&lt;li&gt;Traceable Q&amp;amp;A over contracts, reports, and policy documents&lt;/li&gt;
&lt;li&gt;Unified handling of multi-format materials&lt;/li&gt;
&lt;li&gt;Teams that want both UI-based maintenance and API integration&lt;/li&gt;
&lt;li&gt;Systems that want to use RAG as the context layer for agents&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is especially suitable when document formats are complex, citations matter, and people want to inspect or intervene in parsing results.&lt;/p&gt;
&lt;h2 id=&#34;05-what-to-watch-out-for&#34;&gt;05 What to Watch Out For
&lt;/h2&gt;&lt;p&gt;First, RAGFlow is not a lightweight script. It has real infrastructure requirements. The official recommendation is at least 4 CPU cores, 16 GB RAM, and 50 GB disk. If you only want Q&amp;amp;A over a small amount of Markdown, a full platform may be unnecessary.&lt;/p&gt;
&lt;p&gt;Second, document quality still matters. RAGFlow can improve parsing and chunking, but it cannot magically make low-quality, outdated, or contradictory source material reliable. Knowledge-base governance still matters before production.&lt;/p&gt;
&lt;p&gt;Third, model selection directly affects quality. Embedding, rerank, chat, and multimodal model choices all influence retrieval and answer quality. RAGFlow gives you the workflow, but the final result still depends on data, models, and tuning.&lt;/p&gt;
&lt;p&gt;Fourth, production deployments need careful attention to permissions and data security. Enterprise knowledge bases often contain internal documents, so deployment model, access control, logs, API keys, and model-provider data policy all need to be designed in advance.&lt;/p&gt;
&lt;h2 id=&#34;06-quick-take&#34;&gt;06 Quick Take
&lt;/h2&gt;&lt;p&gt;RAGFlow’s strength is that it turns the hardest parts of RAG into platform capabilities: complex document parsing, explainable chunking, citation grounding, multi-path retrieval, reranking, model configuration, Web UI, API access, and agent extensions.&lt;/p&gt;
&lt;p&gt;If what you need is a verifiable, maintainable enterprise knowledge base that can connect to business systems, RAGFlow is more complete than a “vector database plus a simple chat UI” setup. On the other hand, if you only need small-scale personal Q&amp;amp;A over simple data, a lighter RAG framework may be more resource-efficient.&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related Links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;GitHub project: &lt;a class=&#34;link&#34; href=&#34;https://github.com/infiniflow/ragflow&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://github.com/infiniflow/ragflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Official docs: &lt;a class=&#34;link&#34; href=&#34;https://ragflow.io/docs/dev/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://ragflow.io/docs/dev/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Online demo: &lt;a class=&#34;link&#34; href=&#34;https://cloud.ragflow.io&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://cloud.ragflow.io&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
