
# Knowledge Base

I set up a Knowledge Base/KB to help on other projects, 
the KB helps the development of it's own framework.
My projects include codings and system maintainings.

User write down some ideas, AI build the knowledge base, KB.

User focus on his own knowledge, 
AI do the implementations, extend the map of knowledge.

So, Now, many tasks turns into **management of knowledge**.

```mermaid
---
title: The three
---
flowchart LR

    user((USER has ideas))
    ai[(AI work on seeds of ideas)]
    kb[/ Knowledge Base \]
    extend@{ shape: docs, label: "WIKIs, Translations, Websites, charts, mind maps..."}

    user <---> ai 
    user --> kb
    ai --- kb
    ai ---> extend

```


AI can do a lot once the kb is setup, 
from design to coding, testing, help me keep learning and problem solving, etc.. 

The kb works as inter mediate layer between user and AI.

But the most important is kb offers a map for users to know how to
achieve their desired targets.

I think this is temprary 

# Basics of the work flow

User talks, chats, writes,... ends up with --> Some files and folders

AI works on user's contents, make up WIKI, RAG, knowledge graphs

This is how user + AI to build the knowledge base.

```mermaid
---
title: Knowledge Base
config:
  theme: 'dark'
---

mindmap
    root((user))

        ai[AI, LLM, Agent, claws, bots]
            Online AI Agents
            Local LLM
        kb))Knowledge Base((
            Wiki, website, docviewers
            Concepts, terminologies, ontology, vertex
            connections, edges, pathes


```

The knowledge base is going to be a map, 
user can explore and expand the map,
so to find possible routines leading to desired destinations.

```mermaid
---
title: User + AI on KB
config:
  theme: 'dark'
---
flowchart LR
    user[USER] 
    ai(Agents, LLM, claws, bots)
    user --> ai

    subgraph kb["Knowledge Base"]
      user_docs["user docs"]
      ai_space[wiki, RAG, web sites, lists and charts, map and graph, ...]
    end

    user --> kb
    user --> user_docs
    ai --> ai_space
    ai --> kb

```

This KB is my toy project,
"localllm is a tmp repository",
it is to set up a test ground for personal Knowledge Base.

Similar products, ideas, implementations.
LLM + wiki, RAG, RAG GRAPH
Obsidian, Office suite with copilot ai, 
notes apps + ai 

Why i build it from scratch?
-- ai changes processes, it's not hard anymore, i'd like to do it.

Files and folders, 
user write files, maintaining folders, links

AI manage the kb

## functionalities

- WIKI - mkdocs, ollama and LLM ，
- RAG - ChromaDB
- Ontology graph, map of concepts - python
- Translation - local LLM
- web search - DDGS, urllib
- TTS/STT, text to speech - piper
- vim/nvim plugin - vimscript, .lua

network agent?

## Network Manager and GFW

What's good if the knowledge base been jailed inside a prison?
It has no connection to outside world.
We need good network agents to break through the jail.

```mermaid
---
title: Where AI get knowledge?
---
flowchart TD
    web((facts, logics, truth and freedom))
    nm[(Network, proxy, vpn, bypassings, channels and camourflages)]
    subgraph gfw["GFW, firewalls and jails"]
      evil_kb[[Evil Mindset defined as superficial knowledge, and they call it as civilization]]
      so_called_kb{What's this Knowledge base??}
      dark_mindset[cheating, persecution, censorships, no SOS signals allowed ...]
    end

    style gfw fill:#1e1e1e,stroke:#888,color:#ffffff

    nm -.- so_called_kb

```

